New test.
[mono.git] / mono / metadata / ChangeLog
1 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
2
3         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
4         sequences which can be unbounded in size. Fixes #79583.
5
6 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7
8         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
9         static initialization.
10
11         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
12
13         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
14
15         * domain.c (mono_domain_free): Free up type_init_exception_hash.
16
17         * object.c (mono_runtime_class_init): Implement correct semantics when a static
18         ctor fails, i.e. throw the same exception on subsequent accesses.
19         
20 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
21
22         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
23         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
24         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
25         Handle marshalling of interfaces and VARIANTs contained in structs.
26         
27         Code is contributed under MIT/X11 license.
28         
29 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
30
31         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
32         
33         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
34         mempool.
35
36 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
37
38         * console-io.c: ignore previous SIGINT handler.
39
40 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
41
42         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
43         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
44         #79460, #79461, #79485.
45
46         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
47
48         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
49         #79217.
50
51 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
52
53         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
54         could be generated from it.
55
56 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
57
58         * rand.c: fix read loop to correctly handle EINTR.
59
60 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
61
62         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
63         internal calls are defined to keep methods closer to the declaring
64         type and allow a significant reduction in runtime relocations and
65         memory usage.
66
67 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
68
69         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
70         exception message to have FileNotFoundException use the default
71         assembly load error message. Fixes bug #79426.
72         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
73
74 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
75
76         * threadpool.c: (start_thread_or_queue) use the root domain when
77         creating the thread instead of the async object one.
78
79 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
80
81         * class.c, object.c, class-internals.h, reflection.c:
82         for arrays, store element_size inside MonoClass (speedup
83         for array object creation).
84
85 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
86
87         * icall.c: fixed CodeBase to use the file name and not the module
88         name (bug #79365).
89
90 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
91
92         * mono-debug.c, mono-debug.h: export find_method as
93         mono_debug_find_method ().
94
95 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
96
97         * debug-helpers.c, class-internals.h: added a few functions useful
98         when debugging under gdb.
99
100 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
101
102         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
103         characters that need special handling.
104
105 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
106
107         * mono-config.c: make the os/cpu specification more flexible,
108         allowing lists and negation.
109
110 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
111
112         * marshal.c: COM Interop fixes. Handle case where method->klass.
113         is interface. Handle BSTR/MonoString when null. Use CDECL as 
114         calling convention on non-windows platforms. This is for
115         compatibility with XPCOM and MainWin COM.
116         
117         Code is contributed under MIT/X11 license.
118         
119
120 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
121
122         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
123         correctly. Fixes #79217.
124
125         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
126
127 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
128
129         * mono-config.c: allow both an os and cpu attribute for dllmap
130         and dllentry elemnets to enable a single config file to be used
131         for multiple architectures.
132
133 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
134
135         * loader.c: MonoLoaderError was cleared too soon on load failure.
136         Fixes bug #79424.
137
138 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
139
140         * icall.c: use the defining class vtable when accessing a
141         static field, not a pobblibly derived class.
142
143 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
144
145         * icall.c string-icalls.c: Remove references to unicode.h.
146
147         * unicode.h unicode.c Makefile.am: Remove these unused source files.
148
149         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
150
151         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
152         indicating the image where custom marshaller types should be looked up.
153         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
154         custom marshallers, instead of corlib. Fixes #79425.
155
156 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
157
158         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
159
160 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
161
162         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
163         Implement Environment.ProcessorCount.
164         
165         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
166         Implement Environment.ProcessorCount.
167         
168         * icall.c: 
169         Add Environment.ProcessorCount icall.
170         
171         Patch by Jason McFall.
172
173 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
174
175         * assembly.c: don't append .exe/.dll when the filename already contains
176         one of those extensions.
177
178 2006-09-12  Martin Baulig  <martin@ximian.com>
179
180         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
181         to array interfaces.
182
183 2006-09-11  Martin Baulig  <martin@ximian.com>
184
185         * reflection.c (mono_image_build_metadata): Create the
186         MethodImpl's after emitting all types and methods, so we don't
187         need another fixup pass for them.
188
189 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
190
191         * class.c (mono_class_from_name_case): Fix regression introduced by the last
192         change.
193
194 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
195
196         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
197         unload.
198
199 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
200
201         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
202         args is not set. Fixes #78926.
203
204 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
205
206         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
207
208         * image.c (load_class_names): Move this to class.c, and rename it to 
209         'mono_image_init_name_cache'.
210         (load_modules): Fix a warning.
211
212         * class.c icall.c image.c: Initialize image->name_cache lazily.
213
214         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
215         on its name using information in the AOT file.
216
217         * class.c (mono_class_from_name): Use the new hook function.
218
219 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
220
221         * reflection.c (mono_param_get_objects): Handle enum default parameter values
222         correctly.
223
224         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
225         Fixes #79289.
226         
227 2006-09-06  Martin Baulig  <martin@ximian.com>
228
229         * icall.c (mono_lookup_internal_call): Small fix.
230
231 2006-09-05  Raja R Harinath  <rharinath@novell.com>
232
233         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
234         double g_free.
235
236 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
237
238         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
239         when --debug is specified.
240
241 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
242
243         * class.c (setup_generic_array_ifaces): Fix a warning.
244
245 2006-09-04  Miguel de Icaza  <miguel@novell.com>
246
247         * Temporarily remove the patch to assemly.c that checks the
248         assembly versions as it breaks our gacutil.
249
250 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
251
252         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
253
254         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
255         a net 1.0 runtime.
256
257         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
258         created using the default ctor. Fixes #79152.
259         (mono_string_builder_to_utf16): Ditto.
260
261 2006-09-01  Martin Baulig  <martin@ximian.com>
262
263         Fix handling of the generic array interfaces.
264
265         * class-internals.h
266         (MonoDefaults): Removed `generic_array_class' and added
267         `generic_ilist' class.
268
269         * class.c
270         (mono_bounded_array_class_get): Add the new generic array interfaces.
271         (setup_generic_array_ifaces): New static method; create vtable
272         entries for each method in the generic array interfaces.
273
274         * metadata.c
275         (select_container): Allow "parent-less" generic methods.
276
277         * marshal.c
278         (mono_marshal_get_generic_array_helper): New public method.
279
280         * icall.c
281         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
282         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
283         moved the interncall into System.Array.
284
285 2006-09-01  Raja R Harinath  <rharinath@novell.com>
286
287         A few more cases of avoiding work on types with ->byref set.
288         Has the real fix for #79238
289         * icall.c (is_generic_parameter): New helper.
290         (ves_icall_Type_GetGenericParameterPosition): Use it.
291         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
292         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
293         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
294         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
295         reference types.
296         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
297         reference types.
298         (ves_icall_Type_get_IsGenericInstance): Likewise.
299         (ves_icall_Type_get_IsGenericType): Likewise.
300
301 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
302
303         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
304         class if possible.
305
306         * mempool.h (mono_mempool_get_allocated): New helper function.
307
308         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
309         change.
310
311         * mempool.c: Fix warnings and the calculation of stats.
312
313         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
314
315         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
316
317         * loader.c (mono_get_method_from_token): Update method_count stat.
318
319         * class-internals.h (MonoStats): Add some stats.
320
321 2006-08-31 Robert Jordan  <robertj@gmx.net>
322
323         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
324         with managed variants.
325         All code is contributed under the MIT/X11 license.
326         
327 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
328
329         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
330         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
331
332         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
333
334         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
335         with cycles in classes.
336
337         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
338
339         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
340         missing a [MarshalAs] directive. Fixes #79203.
341
342         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
343         klass->marshal_info. Fixes #79217.
344
345 2006-08-30  Martin Baulig  <martin@ximian.com>
346
347         Committing a patch from Joachim Ante <joe@otee.dk>:
348         Add support for binary data symbol stores.
349
350         * debug-mono-symfile.c
351         (mono_debug_open_mono_symbol_file): Renamed into
352         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
353         arguments.
354
355         * mono-debug.c
356         (mono_debug_open_image): Added `raw_contents' and `size' args.
357         (mono_debug_init_2_memory): New public function.
358
359 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
360
361         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
362
363 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
364
365         * appdomain.c: implement support for ShadowCopyFiles.
366
367 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
368
369         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
370         when value is NULL (and should remove CID #51).
371
372 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
373
374         * image.c: moved 2 functions to ../utils.
375
376 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
377
378         * gc.c: cope with the target object of a GC handle being NULL
379         (bug #78877).
380
381 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
382
383         * class.c: recursively check parent's explicit implementations
384         of interface methods (fixes bug #79125).
385
386 2006-08-19  Miguel de Icaza  <miguel@novell.com>
387
388         * filewatcher.c: Avoid warnings when building, do not redefine
389         constants that are defined.
390
391         Remove warnings.
392
393 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
394
395         * image.c: don't fail when the link points to an absolute path.
396
397 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
398
399         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
400         Fix CID #3.
401
402 2006-08-17  Miguel de Icaza  <miguel@novell.com>
403
404         * image.c (full_path): A new method used to obtain the actual path
405         of an assembly even in the presence of symbolic links.  
406
407         This is necessary for the case where we are running a binary that
408         has been GACed, but we are using the "published" path name
409         ($prefix/mono/1.0/blah.exe) which happens to point to the real
410         file in the GAC.
411
412         This was the source of the failure for the `xsp' command with the
413         recent AppDomain changes, as far as the runtime was concerned,
414         there were two different assemblies: $prefix/mono/1.0/blah.exe and
415         $prefix/mono/gac/blah/version/blah.exe.
416
417         (do_mono_image_open): use full path
418
419 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
420
421         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
422
423 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
424
425         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
426         domain_id is supplied. Fix CID #241 and corlib's unit tests.
427
428 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
429
430         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
431         small structures. Fixes #78990.
432
433 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
434
435         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
436
437         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
438
439 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
440
441         * appdomain.c:
442         * marshal.c: don't load all the assemblies from a domain into newly
443         created ones. The new domains might have different rules and load
444         assemblies from different locations. Fixes bug #76757.
445
446         Patch by Lluis. Conflicts resolved by Brian Crowell.
447
448 2006-08-16  Alp Toker  <alp@atoker.com>
449
450         * socket-io.c: First half of the fix for #79084.
451         Set sa_size to the length of the content, not that of the struct.
452         Don't add NULL suffix to the content, this should be done in
453         managed code if needed.
454
455 2006-08-14  Raja R Harinath  <rharinath@novell.com>
456
457         Fix part of #79012
458         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
459         mono_metadata_parse_type returns NULL.
460
461 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
462
463         * normalization-tables.h : new file for string normalization data.
464         * locales.c, locales.h, icall.c :
465           added load_normalization_resource() for string normalization,
466           and icall as well.
467         * Makefile.am : added normalization-tables.h to the sources.
468
469 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
470
471         * marshal.c: Add more helper functions to reduce code duplication and use them
472         everywhere.
473
474 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
475
476         * marshal.c: Fix non-x86 stdcall warnings.
477         
478         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
479         them everywhere.
480
481 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
482
483         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
484         type check on multi-dimensional arrays. Fixes #79000.
485
486 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
487
488         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
489         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
490         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
491         * class-internals.h: add is_com_object to class structure.
492         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
493         null checks to COM object marshalling. Fix .ctor call on RCW.
494         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
495         
496         All code is contributed under the MIT/X11 license.
497
498 2006-08-09  Dick Porter  <dick@ximian.com>
499
500         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
501         racing mono_monitor_allocator_lock() somewhere, so don't delete
502         the critical section for now.  Found by running and exiting
503         monodevelop.
504
505 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
506
507         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
508         (ves_icall_System_ComObject_FindInterface): Ditto.
509         (ves_icall_System_ComObject_CacheInterface): Ditto.
510
511         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
512         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
513
514 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
515
516         * threadpool.c: treat pipes from process asynchronous reads as sockets
517         when reading from them, so we get select/poll or epoll to wait for
518         data.
519
520 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
521
522         * loader.c: Fix a typo (CID #233) in the null check.
523
524 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
525
526         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
527         Hopefully fixes #78949.
528         
529         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
530         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
531         bytes. Fixes #78972.
532
533 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
534
535         * filewatcher.c: we need to set errno here.
536
537 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
538
539         * filewatcher.c: let Win32Exception get the error value.
540
541 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
542
543         * filewatcher.c: translate errno into win32 errors for Win32Exception
544         to know what happened.
545
546 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
547
548         * threadpool.c: Fix more warnings.
549
550         * assembly.c (search_loaded): Fix warnings.
551
552         * threadpool.c (mono_thread_pool_finish): Fix warnings.
553         (mono_async_invoke): Ditto.
554
555 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
556
557         * object.c (mono_remote_class_vtable): Need to create proxy vtable
558         entries for __ComObject type in addition to ComImport types.
559         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
560         about hash table.
561         
562         All code is contributed under the MIT/X11 license.
563
564 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
565
566         * image.c: avoid tentative loading of modulerefs that contain
567         no metadata (P/Invoke library names).
568
569 2006-07-28  Dick Porter  <dick@ximian.com>
570
571         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
572         mono_loader_lock() somewhere, so don't delete the critical section
573         for now.  Found by running and exiting monodevelop.
574
575 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
576
577         * filewatcher.c: define the inotify syscalls when we're building on
578         linux and have sys/syscall.h. The build system might not have support
579         for inotify but the target system might have it.
580
581 2006-07-26  Miguel de Icaza  <miguel@novell.com>
582
583         * domain.c: Documentation updates.
584
585         * loader.c (mono_free_method): Do not release the method
586         information if we are being profiled, as profilers will use this
587         information at shut down to present some data to the user.
588
589         This is needed so that the profiler does not crash, as the
590         profiler tends to keep MonoMethods around, and they might become
591         invalid if we free these.
592
593         (mono_get_method_constrained): Return the original CIL stream
594         method as well, so verification can be performed against it.
595
596 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
597
598         * filewatcher.[ch]: support for inotify file system watcher.
599         * icall.c: add new internal calls for the inotify file system watcher.
600
601 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
602
603         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
604         #78888.
605
606 2006-07-20  Dick Porter  <dick@ximian.com>
607
608         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
609         warning.
610
611 2006-07-20  Dick Porter  <dick@ximian.com>
612
613         * threads.c (start_wrapper): Do the thread cleanup while we still
614         hold a reference to its object.  Fixes bug 78123.
615
616 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
617
618         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
619         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
620           "managed-to-managed".
621         * icall.c: Redirect string constructors that take sbyte* to
622           ves_icall_System_String_ctor_RedirectToCreateString.
623         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
624           to CreateString () methods with matching signature.
625         * reflection.c: Use original security informations for
626           MONO_WRAPPER_MANAGED_TO_MANAGED.
627         * security-manager.c: Use original security informations for
628           MONO_WRAPPER_MANAGED_TO_MANAGED.
629         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
630           that is a placeholder and only its address should be used.
631         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
632           that is a placeholder and only its address should be used.
633
634 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
635
636         Begin implementing COM Interop.
637         * appdomain.c: Increment corlib version.
638         * class.c: Set ComImport classes' parent to __ComObject.
639         * loader.c: Mark cominterop methods as such.
640         * domain.c: Add __ComObject class to MonoDefaults structure.
641         * image.c: Add 2 hashtables to the image for COM Interop related methods
642         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
643         using the mempool allocator
644         
645         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
646         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
647         declaration for mono_metadata_type_dup_mp.
648         
649         * debug-helpers.c: Added strings for two additional wrapper types
650         * object.c: Create proxy objects for ComImport classes
651         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
652         and added __ComObject class to MonoDefaults structure.
653         
654         * object-internals.h: Finish MonoRealProxy definition, and add definition of
655         MonoComInteropProxy and MonoComObject.
656         
657         * marshal.c: Added support for COM Interop
658         (signature_cominterop): Converts managed signature to corresponding
659         unmanaged COM signature.
660         (cominterop_get_function_pointer): gets unmanaged function pointer via
661         COM object vtable
662         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
663         (cominterop_get_method_interface): returns interface type that method is defined on
664         (mono_mb_emit_cominterop_call): emits native call to function pointer
665         gotten from vtable
666         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
667         that matches signature of unmanaged function.
668         (cominterop_get_native_wrapper): wrapper around adjusted method call.
669         (cominterop_get_invoke): forwards call from proxy to __ComObject
670         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
671         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
672         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
673         
674         * marshal.h: Added Marshal icall declarations.
675         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
676         so we can access them in finalizer
677         
678 2006-07-14  Dick Porter  <dick@ximian.com>
679
680         * object.c (mono_type_initialization_cleanup): Fix a race
681         condition by temporarily commenting out the critical section
682         deletion.
683
684 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
685
686         * reflection.c (create_custom_attr): Fix some warnings.
687         (create_custom_attr_data): Ditto.
688         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
689         types. Fixes #78855.
690
691 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
692
693         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
694
695         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
696
697 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
698
699         * reflection.c (resolve_object): Add support for DynamicMethod.
700
701         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
702         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
703
704 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
705
706         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
707         don't leak GPtrArray's pdata has we have no use (nor free) for it.
708
709 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
710
711         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
712         Fixes #77888.
713
714 2006-06-30  Raja R Harinath  <rharinath@novell.com>
715
716         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
717         slightly: remove a shadow local variable.
718
719 2006-06-29  Raja R Harinath  <rharinath@novell.com>
720
721         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
722         definition that introduces the virtual function slot.
723         Also fix Coverity #105.
724
725 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
726
727         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
728         for dynamic assemblies. Fixes #78724.
729
730 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
731
732         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
733         Fixes #78722.
734
735 2006-06-21  Martin Baulig  <martin@ximian.com>
736
737         * reflection.c
738         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
739         fixes #76484.
740
741 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
742
743         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
744
745 2006-06-20  Raja R Harinath  <rharinath@novell.com>
746
747         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
748         nor TYPEREFs.
749         * class.c (mono_class_create_from_typespec): Add 'context' argument.
750         Inflate result if necessary.
751         (mono_class_get_full): Remove old version.  Rename from
752         'mono_class_get' and add 'context' argument.  Pass it to
753         ..._create_from_typespec.
754         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
755         (mono_ldtoken): Revert change below.
756
757 2006-06-20  Martin Baulig  <martin@ximian.com>
758
759         * class.c (mono_ldtoken): Don't pass the generic context to
760         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
761
762 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
763
764         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
765         and later freeing it. Fixes #78638.
766
767 2006-06-15  Miguel de Icaza  <miguel@novell.com>
768
769         * icall.c (mono_class_get_throw): Revert over-zealous error
770         throwing, the caller for mono_class_get_throw will cope with
771         errors when classes are not properly initialized already.
772
773         The code still copes with loader exceptions though.
774
775         Fixes the regression in reftype1 and reftype3 from the CAS tests.
776         
777 2006-06-14  Miguel de Icaza  <miguel@novell.com>
778
779         Fixes the `make run1' version of RuntimeAbort (to be commited,
780         source is in Bugzilla).
781         
782         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
783         FALSE on class loading failure instead of returning true.
784
785         * class.c (mono_class_create_from_typedef): It is possible for
786         mono_metadata_interfaces_from_typedef_full to fail if a class is
787         not found, cope with this.
788         
789
790 2006-06-14  Dick Porter  <dick@ximian.com>
791
792         * socket-io.c: 
793         * process.c: Fix a bunch of signed/unsigned warnings from gcc
794         4.1.1
795
796 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
797
798         * culture-info-table.h : oops, forgot to make it nsync with r61548.
799
800 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
801
802         * icall.c: Another fix for building mono in Visual Studio.
803
804 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
805
806         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
807         
808 2006-06-09  Martin Baulig  <martin@ximian.com>
809
810         * debug-mono-symfile.c: Put this back and really fix it this
811         time. Sorry for all the trouble.
812
813 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
814
815         * icall.c (mono_class_get_throw): Fix a warning.
816         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
817         ReflectionTypeLoadException if needed. Fixes #78606.
818
819         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
820         (mono_class_init): Ditto.
821
822         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
823         ref_only exceptions.
824         (mono_loader_clear_error): Make this work even if there is no error.
825
826 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
827
828         * object-internals.h marshal.c marshal.h icall.c: Implement method 
829         Marshal.GetComSlotForMethodInfo using internal call.
830
831 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
832
833         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
834         a function for signalling it.
835
836         * class.c (mono_class_from_typeref): Use the new kind of loader error when
837         a referenced assembly is not found.
838
839         * loader.c (mono_loader_error_prepare_exception): Add support for 
840         LOADER_ERROR_ASSEMBLY. Fix formatting.
841
842 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
843
844         * domain.c appdomain.c class-internals.h marshal.c: Add support 
845         for VARIANT marshalling on windows and increment corlib version
846         since Variant struct was added.
847
848 2006-06-03  Miguel de Icaza  <miguel@novell.com>
849
850         * debug-mono-symfile.c: Revert Martin's previous patch which broke
851         stack trace line information:
852
853         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
854         (Martin) when looking up B which is between A and C, return A not C.
855
856         Bug is #78573.
857
858         Thanks to Alexander Olk for tracking this down.
859
860 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
861
862         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
863         
864         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
865         avoid clobbering its value.
866         (mono_string_to_lpstr): Fix a warning on windows.
867
868 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
869
870         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
871
872         * reflection.c loader.c: Removed references to 'dummy' flag.
873
874         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
875
876         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
877         it gets GC tracking.
878
879         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
880         GC tracking.
881         
882         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
883
884         * marshal.c threadpool.c: Update callers of mono_async_result_new.
885
886         * appdomain.c: Bump corlib version.
887
888 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
889
890         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
891         CEE_STIND_REF when working with object references.
892
893 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
894
895         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
896         Fixes #78539.
897
898 2006-05-30  Miguel de Icaza  <miguel@novell.com>
899
900         * loader.c (method_from_memberref): Fix argument value for
901         mono_loader_set_error_method_load (I was passing the MonoClass
902         instead of the class name char *).
903
904 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
905
906         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
907         CEE_STIND_REF when working with object references.
908
909 2006-05-30  Martin Baulig  <martin@ximian.com>
910
911         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
912         mono_method_full_name() change and replace the ':' with a '.'
913         here.
914
915 2006-05-30  Martin Baulig  <martin@ximian.com>
916
917         * debug-mono-symfile.c
918         (mono_debug_symfile_lookup_location): Fix the algorithm:
919         when looking up B which is between A and C, return A not C.
920
921 2006-05-29  Martin Baulig  <martin@ximian.com>
922
923         * mono-debug.h
924         (MonoDebugMethodInfo): Make the typedef public.
925         (MonoDebugSourceLocation): New public struct.
926
927         * mono-debug.c
928         (mono_debug_source_location_from_address): Removed.
929         (mono_debug_source_location_from_il_offset): Removed.
930         (mono_debug_il_offset_from_address): Removed.
931         (mono_debug_address_from_il_offset): Removed.
932         (mono_debug_lookup_method): New public function.
933         (mono_debug_lookup_source_location): New public function; replaces
934         the old mono_debug_source_location_from_*() functions; see the
935         inline documentation.
936         (mono_debug_free_source_location): New public function.
937         (mono_debug_print_stack_frame): New public function; see the
938         inline documentation.
939
940         * debug-mono-symfile.c
941         (mono_debug_find_source_location): Renamed into
942         mono_debug_symfile_lookup_location(); only take a
943         `MonoDebugMethodInfo *' and an `offset' argument; added inline
944         documentation.
945         (mono_debug_find_method): Renamed into
946         mono_debug_symfile_lookup_method().
947
948 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
949
950         * assembly.c (mono_assembly_open_full): Dont overwrite the status
951         returned by mono_image_open_full ().
952
953         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
954         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
955         #78517.
956
957         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
958         #78518.
959
960 2006-05-27  Miguel de Icaza  <miguel@novell.com>
961
962         * class.c (mono_class_from_typeref): handle missing images
963         earlier, deals with bug #78418.   Refactor code; 
964
965         Fix a warning introduced in my previous commit (some stale code
966         from before I revisited my patch).
967
968         * class.c (mono_class_create_from_typedef): On failure, remove the
969         class from the MonoImage->class_cache as the class is not
970         initialized;   Fixes the leak pointed out by Paolo.
971
972 2006-05-25  Dick Porter  <dick@ximian.com>
973
974         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
975         DeleteCriticalSections until I figure out which one may still be
976         sometimes locked when mono_thread_cleanup is called.
977
978 2006-05-24  Dick Porter  <dick@ximian.com>
979
980         * threads.c (mono_thread_cleanup): Move the threading cleanup out
981         of mono_thread_manage and back into its own function, so it can be
982         called after the finalizer thread has finished.
983
984         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
985
986 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
987
988         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
989         Fixes #78495.
990
991         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
992         with non-blittable elements.
993         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
994
995 2006-05-24  Martin Baulig  <martin@ximian.com>
996
997         * mono-debug-debugger.h (MonoDebuggerEvent): Added
998         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
999
1000         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
1001         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
1002         `mono_debugger_event_handler' to NULL.
1003
1004 2006-05-24  Martin Baulig  <martin@ximian.com>
1005
1006         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
1007
1008 2006-05-24  Martin Baulig  <martin@ximian.com>
1009
1010         * mono-debug-debugger.h
1011         (mono_debugger_create_notification_function): Added
1012         `MonoCodeManager *' argument.
1013
1014 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
1015
1016         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
1017
1018 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
1019
1020         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
1021         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
1022         implementation.
1023
1024 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
1025
1026         * icall.c: precise GC support: objects can't be stored in unmanaged
1027         memory anymore, even if they are kept alive by other references: since
1028         they can move the GC needs to be able to always find them.
1029
1030 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1031
1032         * object.c: precise GC support for static fields. Support
1033         for moving GCs: write barriers and pinned allocation for interned
1034         strings.
1035
1036 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1037
1038         * domain.c, domain-internals.h: precise GC support for the MonoDomain
1039         structure.
1040
1041 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1042
1043         * class.c, gc.c: sgen and precise GC updates.
1044
1045 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
1046
1047         * marshal.h, marshal.c: added write barrier wrapper and precise type
1048         fixes.
1049
1050 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
1051
1052         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
1053         support.
1054
1055 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
1056
1057         * reflection.c: precise and sgen GC updates.
1058
1059 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
1060
1061         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
1062
1063 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
1064
1065         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
1066
1067 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
1068
1069         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
1070         MONO_TYPE_OBJECT. Fixes #78462.
1071
1072 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
1073
1074         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
1075         and blittable types.
1076
1077 2006-05-17  Miguel de Icaza  <miguel@novell.com>
1078
1079         * class.c (mono_class_get_exception_for_failure): Implement parts
1080         of a TODO: if the loader error is set (instead of the class
1081         error), we return a Loader exception that can be properly thrown
1082         elsewhere.
1083
1084         This was exposed by some Winforms 2.0 code that I tried to run
1085         (Atsushi pointed me to it).
1086
1087 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
1088
1089         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
1090         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
1091         
1092         * marshal.c (emit_marshal_vtype): Add limited support for 
1093         UnmanagedType.LPStruct. Fixes #78427.
1094
1095         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
1096         Applied a patch from kangaroo to fix #77523.
1097
1098 2006-05-17  Martin Baulig  <martin@ximian.com>
1099
1100         * threads.c
1101         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
1102         (debugger_thread_created): Removed.
1103         (debugger_thread_exited): Removed.
1104
1105 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
1106
1107         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1108
1109         * object-internals.h (MonoReflectionResource): Sync with managed version.
1110
1111 2006-05-12  Wade Berrier <wberrier@novell.com>
1112
1113         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
1114
1115 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
1116
1117         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
1118         functions try to allocate from the image mempool.
1119
1120 2006-05-12  Dick Porter  <dick@ximian.com>
1121
1122         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
1123
1124 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
1125
1126         * object.c: The FieldGetter and FieldSetter methods require the full
1127         name of the class, not only the name. Fixes bug #78277.
1128
1129 2006-05-11  Miguel de Icaza  <miguel@novell.com>
1130
1131         * loader.c (method_from_memberref): Do not pass the NULL klass to
1132         mono_loader_set_error_() methods.  Pass the non-NULL value
1133         (class). 
1134
1135 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
1136
1137         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1138         (mono_assembly_close): Null out assembly->image->references after freeing it.
1139
1140         * image.c (mono_image_close): Free image->references.
1141         
1142         * reflection.c (mono_image_basic_init): Fix a small memory leak.
1143
1144 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1145
1146         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
1147         before checking if it's NULL (g_assert).
1148
1149 2006-05-10  Martin Baulig  <martin@ximian.com>
1150
1151         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1152         I thought I already killed that two months ago, but now it somehow reappeared.
1153
1154 2006-05-10  Martin Baulig  <martin@ximian.com>
1155
1156         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1157
1158 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
1159
1160         * reflection.c: Allocate memory for dynamically created methods in the image
1161         mempools.
1162
1163 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1164
1165         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
1166         don't use the ad pointer before checking if it's NULL (g_assert).
1167
1168 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
1169
1170         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1171         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1172
1173         * marshal.c: Allocate all signatures from mempools.
1174
1175         * marshal.c: Allocate some more signatures from mempools.
1176
1177 2006-05-09  Miguel de Icaza  <miguel@novell.com>
1178
1179         * object.c (mono_load_remote_field): The code used to provide a
1180         temporary variable for returning results if the user did not
1181         provide a result pointer.  But our temporary variable was allocted
1182         on the satck.
1183
1184         Fix calling code to always pass a result area.   Coverity ID 103.
1185
1186 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
1187
1188         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1189         value, not the old. Fixes #78312.
1190         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1191
1192         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1193         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
1194         per-image cache.
1195
1196         * assembly.c (mono_assembly_close): Free image->references.
1197
1198         * assembly.c (mono_assembly_names_equal): Fix a warning.
1199         (mono_assemblies_cleanup): Cleanup more global data.
1200
1201         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1202
1203         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1204         ptr_cache and image->modules.
1205
1206         * image.c (mono_image_init): Allocate array_cache lazily.
1207         
1208 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1209
1210         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1211         behavior was changed recently and has bad side effects.
1212
1213 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
1214
1215         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1216         
1217         * assembly.c (mono_assembly_close): Remove a debug printf.
1218
1219         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1220
1221         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1222         to also allow for temporary references between mono_image_open ()/close ().
1223
1224         * domain.c (get_runtimes_from_exe): Add a FIXME.        
1225
1226 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
1227
1228         * marshal.c: Fix support for dynamic methods.
1229
1230         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1231
1232         * marshal.c (mono_marshal_cleanup): New cleanup function.
1233
1234         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
1235         image mempools.
1236
1237         * class.c (mono_class_init): Fix leaking class->nested_classes.
1238
1239         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1240
1241         * image.c (mono_image_init): Initialize the new cashes.
1242
1243         * image.c (mono_image_close): Destroy the new cashes.
1244
1245         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1246
1247         * mempool.c (mono_mempool_strdup): New helper function.
1248
1249         * class-internals.h: Add prototype for mono_loader_unlock ().
1250
1251         * domain.c (mono_jit_info_table_find): Fix a warning.
1252         (mono_debugger_check_runtime_version): Ditto.
1253
1254         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
1255         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1256         functions to these modules.
1257
1258         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1259         metadata modules.
1260         
1261         * marshal.c (mono_free_bstr): Fix a warning.
1262
1263         * assembly.c (mono_assembly_open_full): Fix another small leak.
1264
1265         * object.c: Fix some unload leaks in the remoting code.
1266
1267         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1268         function.
1269
1270         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1271
1272         * reflection.c: Fix some unload leaks in dynamic assemblies.
1273
1274 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
1275
1276         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1277         * marshal.h: Add BSTR support on Win32
1278         * icall.c: Add BSTR icalls
1279         * metadata.h: Add BSTR enums
1280
1281 2006-04-28  Miguel de Icaza  <miguel@novell.com>
1282
1283         Work to catch the crash from #76795 and turn it into an
1284         exception.   As I stubbed out pieces of the VisualBasic support,
1285         I found a number of places where the code was failing and I added
1286         checks to those places. 
1287         
1288         * metadata.c (do_mono_metadata_parse_generic_class): Make this
1289         function return a status code.  If we fail to parse the signature
1290         from mono_metadata_parse_generic_inst, return FALSE.
1291
1292         * loader.c (mono_get_method_from_token): If we fail to load the
1293         method (mono_class_get) return NULL.   
1294
1295         * (method_from_memberref): Return NULL if we are unable to parse
1296         the method signature
1297
1298         (mono_loader_error_prepare_exception): Since we now use the
1299         loader_error flag internally to stop processing, and obtaining
1300         exceptions that might be thrown will walk this code path the
1301         proper way of going from a MonoLoaderError into a
1302         MonoException was convoluted.   This new routine encapsulates the
1303         process of turning the error into an exception and *clearing* the
1304         error afterwards.
1305         
1306 2006-04-27  Miguel de Icaza  <miguel@novell.com>
1307
1308         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1309         with missing assemblies), and to cope with:
1310
1311                 * Missing fieldref from a non-existing assembly.
1312                 * Missing methodref from a non-existing assembly.
1313
1314         The first batch of work to address *some* of the issues from 76661.
1315         
1316         * object.c (mono_class_create_runtime_vtable): If we fail to
1317         initialize the class raise the exception here. 
1318
1319         * metadata.c (mono_class_get_overrides_full): If any methods fail
1320         to load return the failure to the caller.
1321
1322         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1323         flagging assemblies that failed to load.   
1324
1325         Do not crash if we are unable to load the assembly.
1326
1327         (mono_assembly_close): Do nothing with REFERENCE_MISSING
1328         assemblies. 
1329
1330         * loader.c (mono_loader_set_error_type_load): Change the
1331         convention to always pass unallocated strings, so we make our own
1332         copies (I know our own code had duplicated strings before, but
1333         this keeps the normal conventions).
1334         (method_from_memberref): Call mono_loader_set_error_method_load
1335         for all possible failures of loading the class. 
1336         Remove assert, turn into a loader error.
1337
1338         (mono_loader_error_to_exception): Move this routine from mini
1339         (mini_loader_error_to_exception) there was no need to have that in
1340         mini. 
1341
1342         * class.c (mono_class_from_typeref): If we were not able to load
1343         the assembly with mono_assembly_load_reference, call the
1344         mono_loader_set_error_type_load to register the problem.
1345
1346         (mono_class_setup_fields): If we fail to load the type from
1347         mono_metadata_parse_type_full, call mono_class_set_failure and
1348         break from the loop.
1349
1350         If class->exception_type is set, we do not layout the fields as
1351         that might crash the runtime, and instead return (from breaking
1352         from the previous loop).
1353
1354         (mono_class_setup_vtable): This now returns a boolean indicating
1355         whether the table was properly setup.   The decision is driven by
1356         mono_class_get_overrides_full which might run into non-existing
1357         methods. 
1358         
1359         (mono_class_init): Returns TRUE on success or FALSE if there was a
1360         problem in loading the type (incorrect assemblies, missing
1361         assemblies, methods, etc).
1362
1363         When we call mono_class_setup_fields we also check for a potential
1364         error inside this call (either a class exception or a general
1365         loader exception).
1366
1367         (mono_class_create_from_typedef): If the parent fails to load
1368         (calling mono_class_get_full) return NULL.
1369         
1370         ** Important **
1371
1372         calls to mono_metadata_parse_type_full should be checked
1373         everywhere and set the mono_class_set_failure
1374         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1375
1376         The current patch checks the places where my manually constructed
1377         tests show the errors are showing up, but we should do it
1378         everywhere. 
1379
1380         ** Important2 **
1381
1382         mono_class_init return values should be tested everywhere, like
1383         the previous case this is something that we should audit
1384         everywhere and not only on the cases exposed by the tests I
1385         created. 
1386
1387 2006-04-26  Miguel de Icaza  <miguel@novell.com>
1388
1389         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1390         boolean parameter and instead pass the information on `options'
1391         parameter (FileOptions).
1392
1393         * icall.c: Register the new signature for MonoIO.Open.
1394
1395         * debug-helpers.c (dis_one): Trying to understand how coverity
1396         works.  Fix Run 5, item 78.
1397
1398 2006-04-26  Dick Porter  <dick@ximian.com>
1399
1400         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1401         dereference.
1402
1403 2006-04-25  Martin Baulig  <martin@ximian.com>
1404
1405         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1406
1407         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1408         debugger_thread_created().
1409         (debugger_gc_push_all_stacks): Don't handle the main thread in any
1410         special way.
1411         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1412         (mono_debugger_finalize_threads): New function; undo the effects
1413         of mono_debugger_init_threads().
1414         (mono_debugger_create_all_threads): Removed.
1415
1416 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
1417
1418         * image.c (mono_image_close): Tidy up trace messages.
1419
1420         * assembly.c (mono_assembly_close): Ditto.
1421
1422         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1423         no longer references an already freed assembly. Fixes #78168.
1424
1425 2006-04-21  Dick Porter  <dick@ximian.com>
1426
1427         * threads.c (mono_thread_detach): Fix reference counting when
1428         detaching threads.
1429
1430 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
1431
1432         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1433         #78155.
1434
1435 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
1436
1437         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1438         (mono_type_to_stind): Ditto.
1439
1440         * marshal.c: Use the new helper functions to simplify code.
1441
1442         * image.c (mono_image_close): Add some code for help debug assembly unloading
1443         problems.
1444
1445         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1446         image mempool.
1447
1448         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1449         assembly was already loaded in another appdomain. Fixes #78083.
1450
1451 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
1452
1453         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1454         referenced assemblies.
1455         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1456
1457         * domain.c (mono_domain_free): Add a trace message.
1458
1459         * appdomain.c (add_assemblies_to_domain): Ditto.        
1460
1461         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1462         field.  
1463
1464 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1465
1466         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1467
1468 2006-04-12  Martin Baulig  <martin@ximian.com>
1469
1470         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1471         `USE_INCLUDED_LIBGC'.   
1472
1473 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1474
1475         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1476         the patch contains ../ and a small directory name later. Hopefully fixes
1477         #78035.
1478
1479 2006-04-10  Martin Baulig  <martin@ximian.com>
1480
1481         Clean up the debugger's thread-handling code.
1482
1483         The debugger's thread-handling code has been moved from
1484         ../mini/debug-debugger.c to threads.c.  We now iterate directly
1485         over the `threads' hash, keep track of exiting threads and also
1486         use proper locking.
1487
1488         We can now debug XSP and XSP based applications with the debugger.
1489
1490         * object-internals.h (MonoThread): Added `gpointer end_stack'.
1491
1492         * threads.h
1493         (MonoThreadCallbacks): Removed; this was only used by the debugger.
1494         (mono_install_thread_callbacks): Likewise.      
1495
1496         * threads.c (mono_thread_callbacks): Removed.
1497         (debugger_thread_created, debugger_thread_exited): New static functions.
1498         (start_wrapper): Call debugger_thread_created().
1499         (thread_cleanup): Call debugger_thread_exited().
1500         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1501         (mono_debugger_init_threads): New public function.
1502         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1503         iterate directly over the `threads' hash and also use proper locking.
1504
1505         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1506
1507         * mono-debug-debugger.h
1508         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1509
1510 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
1511
1512         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
1513         argument type=array. Fixes #78057.
1514
1515 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
1516
1517         * culture-info-table.h : regenerated. Fixed bug #69652.
1518
1519 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
1520
1521         * loader.c metadata.c: Reapply a variant r59116.
1522         
1523         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1524
1525         * class.c (mono_class_setup_interface_offsets): New internal function.
1526
1527         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1528         interfaces too. Fixes #77398.
1529
1530         * reflection.c (encode_cattr_value): Add support for 
1531         parameter type=object, argument type=array.
1532         (load_cattr_value): Ditto. Fixes #77916.
1533
1534         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1535         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1536
1537         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1538         a byval char array and CharSet is Ansi.
1539
1540         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1541
1542 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
1543
1544         * metadata.c: Add some locking comments.
1545         
1546         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1547         mempool.
1548         (mono_metadata_free_method_signature): Don't free the signature itself.
1549
1550         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
1551
1552         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1553         reference the same MonoImage.
1554         (mono_assembly_load_from_full): Add an assert.
1555
1556 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
1557
1558         * image.c (mono_image_close): Don't put the image we are about to free into the
1559         loaded_images_guid_hash.
1560
1561         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1562         to reduce code duplication.
1563
1564         * marshal.c: Register the native functions called by this module as icalls, to
1565         somewhat centralize the creation of MonoMethodSignature's.
1566
1567         * loader.c (mono_method_signature): Add a cache for method signatures.
1568
1569         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1570         the parameter attributes of a method.
1571         (mono_metadata_parse_method_signature_full): Refactored the computation of
1572         parameter attributes into a separate function. Also avoid one allocation in
1573         most cases.
1574
1575         * assembly.c (mono_assembly_close): Ditto.
1576
1577         * image.c (mono_image_close): Log trace messages with INFO level.
1578
1579         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1580
1581         * image.c reflection.c: Correct reference counting of image modules.
1582         
1583         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1584         of this function from the image mempool.
1585         
1586         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1587         to allow more cached types to be used.
1588
1589         * mono-debug.c (mono_debug_add_method): Appled patch from
1590         David S. Miller  <davem@sunset.davemloft.net>: Access 
1591         minfo->lexical_blocks[] entry elements using read32().
1592
1593 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
1594
1595         * loader.c (mono_free_method): No longer free the method header for non-dynamic
1596         methods as it is allocated from the mempool.
1597
1598         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1599         image mempool.
1600
1601         * metadata-internals.h: Add comments describing the reference counting scheme
1602         used for MonoImage and MonoAssembly.
1603
1604         * image.c assembly.c reflection.c: Rework reference counting of images and 
1605         assemblies so they are freed when the runtime is shut down. Free some 
1606         additional memory structures when an image is unloaded.
1607         
1608 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
1609
1610         * class.c loader.c reflection.c: Allocate more data structures in
1611         the image mempool.
1612
1613 2006-03-31  Miguel de Icaza  <miguel@novell.com>
1614
1615         * icall.c
1616         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1617         build on pre glib 2.4 systems.
1618
1619 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
1620
1621         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1622
1623         * icall.c: Fix some warnings.
1624
1625 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
1626
1627         * culture-info-table.h : regenerated.
1628
1629 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1630
1631         * threads.c, object-internals.h, verify.c: changed the culture caching
1632         code to use a normal MonoArray for storage so the GC can keep track of
1633         them easily. Fixed bits of the cache logic, too and simplified the
1634         code.
1635
1636 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1637
1638         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1639         thread for non-Boehm GCs.
1640
1641 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1642
1643         * domain.c, object.c, domain-internals.h: reduce the amount of memory
1644         needed to keep track of the data for static fields.
1645
1646 2006-03-29  Raja R Harinath  <rharinath@novell.com>
1647
1648         Fix #75172
1649         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1650         for interface classes.  Use 'num_methods' instead.
1651         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
1652         before using '->vtable_size' field.
1653
1654 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1655
1656         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1657         doesn't contain managed pointers, so use a normal hashtable.
1658
1659 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1660
1661         * reflection.c, class-internals.h, domain.c: fixed handling of types
1662         used as values for objects in custom attributes (bug #77915):
1663
1664 2006-03-24  Martin Baulig  <martin@ximian.com>
1665
1666         * class.c (mono_class_setup_fields): Added support for generic
1667         instances; fixes #77580.
1668
1669 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1670
1671         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1672
1673 2006-03-24  Dick Porter  <dick@ximian.com>
1674
1675         * file-io.c (get_file_attributes): More stat macro breakage.
1676         Fixes bug 77759.
1677
1678 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1679
1680         * profiler.c: added the file=filename option in the default profiler
1681         to output the profile data to filename.
1682
1683 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1684
1685         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1686         bug #77877.
1687
1688 2006-03-22  Martin Baulig  <martin@ximian.com>
1689
1690         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1691         allocated `MonoClassField *' in `fb->handle'.
1692
1693 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1694
1695         * class.c, image.c, metadata-internals.h: implemented new mechanism to
1696         allocate interface ID to save memory and allow better ID reuse on
1697         appdomain unload. setup_generic_vtable () removal from Martin.
1698
1699 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1700
1701         * object.h, appdomain.c, domain.c, exception.c, icall.c,
1702         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1703         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1704         write barriers for reference stores with managed objects accessed with
1705         C structures in the runtime and in embedding programs.
1706
1707 2006-03-20  Raja R Harinath  <rharinath@novell.com>
1708
1709         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1710         'interface_id' and 'max_interface_id' fields of MonoClasses
1711         representing open generic types.
1712
1713 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1714
1715         * object.h, object.c, icall.c: added functions to deal with
1716         storing valuetypes that contain references in managed objects.
1717         * reflection.c, string-icalls.c, threads.c, marshal.c: small
1718         fixes and comments around uses of mono_array_addr ().
1719
1720 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1721
1722         * object.h, icall.c, monitor.c: object.GetHashCode ()
1723         implementation that supports the moving garbage collector.
1724
1725 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1726
1727         * icall.c, threads-types.h, threads.c: implemented finalizer for
1728         LocalDataStoreSlot.
1729
1730 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
1731
1732         * metadata.c (mono_type_size): Add a fixme.
1733         (mono_type_stack_size): Ditto.
1734
1735         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
1736         'type_forwarders' field.
1737
1738         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1739         attribute from net 2.0.
1740
1741         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1742         from class.c.
1743
1744         * class.c (mono_class_setup_fields): Fix a warning.
1745         
1746         * class.c (mono_class_from_name): Add support for assemblyref entries
1747         in the EXPORTEDTYPE table.
1748
1749         * reflection.c: Add support for handling type forwarders under net 2.0.
1750
1751         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
1752         
1753 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
1754
1755         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1756         overwriting entries in ModuleBuild->types, also clean up the code
1757         a little. Fixes #77774.
1758
1759 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1760
1761         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1762         load friend assembly info when present.
1763
1764 2006-03-14  Raja R Harinath  <rharinath@novell.com>
1765
1766         Fix crasher on gtest-158.cs.
1767         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1768         the return value if the MonoClass we want is yet in an
1769         inconsistent state.
1770         * class.c (mono_class_create_from_typedef): Add an comment
1771         explaining an order dependency between mono_class_setup_parent and
1772         mono_class_setup_mono_type.
1773
1774 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1775
1776         * class.c: documentation updates and events bug fix.
1777
1778 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1779
1780         * class.c: some cleanup, locking fixes.
1781
1782 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1783
1784         * class.c: fix the generics code to setup nested
1785         type info to the instantiated type (bug #77770).
1786
1787 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1788
1789         * marshal.c: fixed a few type correctness issues.
1790
1791 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1792
1793         * loader.c: the Set/Get/Addrtess array methods should be public.
1794
1795 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
1796
1797         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1798         
1799         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1800         info->wrapper.
1801
1802 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
1803
1804         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1805
1806         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1807
1808         * mempool.c (mono_mempool_alloc): Speed this up a bit.
1809         (mono_mempool_alloc0): Ditto.
1810
1811 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1812
1813         * socket-io.c:
1814         (create_object_from_sockaddr): it was allocating 4 extra bytes
1815         for the AF_UNIX data. Fixes bug #77747.
1816
1817 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
1818
1819         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1820
1821 2006-03-09  Dick Porter  <dick@ximian.com>
1822
1823         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1824         Fixes bug 76966 again.
1825
1826 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
1827
1828         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1829         names from r57532
1830         * appdomain.c: Bumped corlib version to 48 (due to r57532)
1831
1832 2006-03-07  Martin Baulig  <martin@ximian.com>
1833
1834         * object.c
1835         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1836
1837 2006-03-07  Martin Baulig  <martin@ximian.com>
1838
1839         * class.c
1840         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1841         regression introduced in r56970; see gtest-252.cs.
1842
1843         * loader.c (mono_get_method_constrained): Correctly handle generic
1844         methods; see gtest-253.cs.
1845
1846 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
1847
1848         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1849
1850 2006-03-04  Martin Baulig  <martin@ximian.com>
1851
1852         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1853         compute the parent type at runtime, just like we're already doing
1854         it for interfaces.
1855
1856         * reflection.c
1857         (mono_reflection_bind_generic_parameters): Don't compute the
1858         parent type anymore.
1859
1860         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1861
1862 2006-03-04  Martin Baulig  <martin@ximian.com>
1863
1864         * mono-debug-debugger.h
1865         (mono_debugger_create_notification_function): Allocate memory at
1866         runtime and return a pointer to it.
1867
1868 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
1869
1870         * assembly.c: Fix windows build.
1871         
1872         * assembly.c: Fix build.
1873
1874         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
1875
1876         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1877         
1878 2006-03-03  Dick Porter  <dick@ximian.com>
1879
1880         * process.c
1881         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1882         Check parameters before dereferencing them.  Fixes Aaron's part of
1883         bug 77393.
1884
1885 2006-03-03  Raja R Harinath  <rharinath@novell.com>
1886
1887         Fix performance regression.
1888         * loader.c (find_method_in_class): Add 'from_class' argument.
1889         Rename 'klass' argument to 'in_class'.  The signature is compared
1890         against the method in 'in_class', and the corresponding method is
1891         returned from 'from_class'.
1892         (find_method): Walk both 'in_class' and 'from_class' in parallel.
1893         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1894         type definition and generic instantiation in parallel.
1895         (mono_get_method_constrained): Update to changes.
1896
1897 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1898
1899         * threads.c: make sure the domain is correct, too when doing
1900         mono_thread_attach ().
1901
1902 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
1903
1904         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1905         windows. Fixes #77683.
1906
1907 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1908
1909         * object.h, *: introduced specific way to set elements of an array
1910         of references to be used as write barrier. Still need to audit the
1911         uses of mono_array_addr.
1912
1913 2006-03-01  Miguel de Icaza  <miguel@novell.com>
1914
1915         * object-internals.h: New field to cache the assmebly name, patch
1916         from Tambet Ingo (tambet@ximian.com)
1917
1918 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1919
1920         * decimal.h, class-internals.h, metadata-internals.h,
1921         file-io.h: mark a few function declarations as internal, to
1922         reduce the number of PLT entries.
1923
1924 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1925
1926         * file-io.c: fix typo in warning message.
1927
1928 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1929
1930         * loader.c: on unix, lookup the "*A" version of a function
1931         if charset is auto as a second option before failing.
1932
1933 2006-02-28  Raja R Harinath  <rharinath@novell.com>
1934
1935         * class.h (mono_class_inflate_generic_method): Revert to two
1936         argument version.
1937         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1938         (mono_class_inflate_generic_method_full): Add.
1939         * class.c (mono_class_inflate_generic_method_full): Rename from
1940         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
1941         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
1942         * loader.c, reflection.c: Update to changes.
1943
1944 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1945
1946         * icall.c: const fixes and small improvements.
1947
1948 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1949
1950         * threadpool.c: for asynchronous connect(), enable the same workaround
1951         for BSD 6 as for the Mac. Fixes bug #77637.
1952
1953 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
1954
1955         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1956         formatted classes. Fixes #77524.
1957
1958 2006-02-24  Raja R Harinath  <rharinath@novell.com>
1959
1960         * class.c (inflate_generic_type): Add a couple more
1961         micro-optimizations.
1962         (inflate_generic_context): Don't use the 'gmethod' from
1963         'inflate_with'.
1964         (mono_class_inflate_generic_method): If the method has generic
1965         parameters, but the passed-in context doesn't have a 'gmethod',
1966         create one.  Use the possibly simplified generic instantiation
1967         from the declaring class instead of the one passed in.
1968
1969 2006-02-24  Raja R Harinath  <harinath@gmail.com>
1970
1971         Make generic method signature and method header handling lazy.
1972         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1973         (inflate_generic_header): Likewise.
1974         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
1975         parameter to avoid inflating types.
1976         (mono_get_inflated_method): Empty out.
1977         * class.h (mono_class_inflate_generic_method): Update to changes.
1978         * loader.c (mono_get_method_from_token): Don't parse signature for
1979         generic methods, nor methods of generic classes.
1980         (mono_method_signature): Rename from 'mono_method_signature'.
1981         Inflate signature on demand.
1982         (mono_method_get_header): Inflate method header on demand.
1983         * reflection.c: Update to changes.
1984
1985 2006-02-23  Raja R Harinath  <rharinath@novell.com>
1986
1987         * metadata.c (mono_metadata_inflate_generic_inst): If the
1988         instantiation is closed, don't bother expanding it in the new
1989         context.
1990         * class.c (inflate_generic_class): If the generic instantiation
1991         doesn't change after inflation, return the argument itself.
1992         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1993         Add bounds checks.
1994         (inflate_generic_context): If neither the generic class nor the
1995         generic method instantiations change, return the original context.
1996         * reflection.c (mono_method_get_object): Do
1997         'mono_get_inflated_method' before accessing the ->klass field.
1998         (inflate_mono_method): Don't create a MonoGenericMethod unless
1999         necessary.
2000         (inflate_method): Don't pass a constructed type as the declaring
2001         type of a methodbuilder.
2002
2003 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
2004
2005         * object.c: fix memory overwrite.
2006
2007 2006-02-22  Dick Porter  <dick@ximian.com>
2008
2009         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
2010         it doesn't work any more.
2011         (mono_threads_request_thread_dump): Fix unused variable warnings.
2012
2013 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2014
2015         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
2016         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
2017         the public header file.
2018
2019 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
2020
2021         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
2022
2023 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2024
2025         * class-internals.h, object.c: reduce the size of MonoVTable
2026         and store the interface_offsets array at negative offsets.
2027
2028 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
2029
2030         * metadata.c: tweak table descriptors data structures to reduce
2031         size and runtime relocations.
2032
2033 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2034
2035         * marshal.c: fix some types and opcodes to be type-safe
2036         in marshaling wrappers.
2037
2038 2006-02-21  Ankit Jain  <jankit@novell.com>
2039
2040         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
2041
2042 2006-02-21  Raja R Harinath  <rharinath@novell.com>
2043
2044         * metadata.c (get_constraints): Relax debugging checks for monodis.
2045
2046 2006-02-21  Ankit Jain  <jankit@novell.com>
2047
2048         * metadata.c (mono_metadata_load_generic_params): Move the code
2049         checking for ambiguous generic params from here to mono/dis/get.c
2050         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
2051
2052 2006-02-21  Raja R Harinath  <harinath@gmail.com>
2053
2054         Fix assertion triggered when compiling nemerle.
2055         * class.c (mono_get_shared_generic_inst): Rename from
2056         get_shared_inst and make non-static.
2057         * loader.c (mono_get_shared_generic_method): New.  Used to create
2058         the MonoGenericContext-equivalent of a MonoGenericContainer.
2059         (mono_get_method_from_token): Initialize the 'context' field of
2060         the created MonoGenericContainer.
2061         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
2062         * metadata.c (get_constraints): Add sanity check.
2063         * class-internals.h: Add new internal methods.
2064
2065         * reflection.c (verify_safe_for_managed_space): New sanity check.
2066         Currently checks that owner-less generic parameters aren't allowed
2067         in managed space.
2068         (mono_type_get_object): Use it.
2069         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
2070         that are now in mono_type_get_object.
2071         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
2072
2073 2006-02-19  Raja R Harinath  <harinath@gmail.com>
2074
2075         * metadata.c (mono_type_create_from_typespec): Rename from
2076         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
2077         argument and caching of types in the generic container.
2078         (unwrap_arrays, find_generic_param): Remove.
2079         * metadata-internals.h: Update.
2080         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
2081
2082 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
2083
2084         * class.c (mono_class_get_exception_for_failure): Fix a warning.
2085
2086         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
2087         return values. Fixes #77581.
2088
2089         * class.c (mono_fnptr_class_get): Switch name and name_space.
2090
2091         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
2092         classes and add support for [In, Out] attributes.
2093         (mono_marshal_free_asany): Ditto. Fixes #77524.
2094
2095 2006-02-18  Raja R Harinath  <harinath@gmail.com>
2096
2097         * class.c (mono_class_from_generic_parameter): Make more robust to
2098         incomplete MonoGenericContainers from monodis.
2099
2100 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2101
2102         * class-internals.h: added some more exception types.
2103         * class.c, metadata.c: added a few checks to handle missing
2104         types.
2105
2106 2006-02-17  Raja R Harinath  <rharinath@novell.com>
2107
2108         Use owner-less generic-params some more.
2109         * class.c (my_mono_class_from_generic_parameter): Remove.
2110         (mono_class_from_generic_parameter): Handle null image,
2111         param->name and param->owner.
2112         (mono_class_from_mono_type): Update.
2113         (mono_class_create_from_typespec): Remove 'container' parameter.
2114         If that parameter is non-null, the result is always inflated by
2115         'mono_class_get_full' anyway.
2116         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
2117         parameter.
2118         (mono_class_get_full): Update.
2119
2120         * class.c (inflate_generic_type) [GENERICINST]: If the generic
2121         instance is not open, don't bother inflating.
2122         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
2123         parse metadata for inflated classes.
2124         (_mono_class_get): Change GenericContext* parameter to
2125         GenericContainer*.
2126         (mono_class_create_from_typespec): Likewise.  Simplify, and
2127         implement trivially.  All the cases are handled in
2128         mono_class_from_mono_type.  Don't inflate returned class.
2129         (mono_class_get_full): Delegate GENERICINST optimization to
2130         inflate_generic_type.
2131         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
2132
2133 2006-02-16  Dick Porter  <dick@ximian.com>
2134
2135         * socket-io.c (create_object_from_sockaddr): Fix typo.
2136         (create_sockaddr_from_object): Check array lengths before
2137         potentially accessing items off the end.
2138         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2139         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2140         (ves_icall_System_Net_Sockets_Socket_Send_internal)
2141         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2142         length checks to avoid wraparound overflows.
2143         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2144         contents of the array of sockets
2145         (hostent_to_IPHostEntry2)
2146         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2147         Check return value of inet_ntop ().
2148         (addrinfo_to_IPHostEntry): Fix typo
2149
2150 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2151
2152         Type metadata parsing doesn't use generic-instantiation information.
2153         * metadata.c (mono_metadata_parse_array_full): Change
2154         MonoGenericContext* parameter to MonoGenericContainer*.
2155         (mono_metadata_parse_type_full): Likewise.
2156         (mono_type_create_from_typespec_full): Likewise.
2157         (mono_metadata_parse_mh_full): Likewise.
2158         (mono_metadata_parse_generic_inst): Likewise.
2159         (do_mono_metadata_parse_generic_class): Likewise.
2160         (do_mono_metadata_parse_type): Likewise.
2161         * metadata-internals.h: Update to changes.
2162         * class.c (mono_class_find_enum_basetype): Likewise.
2163         (mono_class_setup_fields): Likewise.
2164         (mono_class_create_from_typespec): Likewise.
2165         * loader.c (method_from_methodspec): Likewise.
2166         (mono_get_method_from_token): Likewise.
2167         (mono_method_get_header): Likewise.
2168
2169 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2170
2171         * marshal.c: handle additional GENERICINST case (patch from
2172         Thong Nguyen <tum@veridicus.com>).
2173         Fix a few cases where LDIND_I/STIND_I was used for references.
2174
2175 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2176
2177         * reflection.c (mono_reflection_get_token): Remove unused variable.
2178
2179 2006-02-16  Martin Baulig  <martin@ximian.com>
2180
2181         * reflection.c (mono_reflection_get_token): Add support for fields
2182         in instantiated generic types.
2183
2184         * icall.c
2185         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2186
2187 2006-02-15  Martin Baulig  <martin@ximian.com>
2188
2189         * icall.c
2190         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2191         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2192         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2193         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2194
2195 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2196
2197         * class.c, metadata.c, metadata.h, object.c, icall.c,
2198         marshal.c: changed mono_type_get_underlying_type () to do
2199         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2200         Fixed handling of instantiated generic valuetypes (bug #75479).
2201
2202 2006-02-15  Raja R Harinath  <rharinath@novell.com>
2203
2204         * metadata.c (mono_metadata_decode_signed_value): Simplify.
2205         Delegate to mono_metadata_decode_value, and work on the returned value.
2206
2207         * icall.c (ves_icall_MonoType_GetGenericArguments):
2208         Add consistency check here too.
2209         
2210 2006-02-15  Ankit Jain  <jankit@novell.com>
2211
2212         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2213         char/short etc.
2214
2215 2006-02-15  Ankit Jain  <jankit@novell.com>
2216
2217         * metadata.c (mono_metadata_decode_signed_value): New function to decode
2218         signed values, used only for representing lower bounds of arrays.
2219         (mono_metadata_parse_array_full): Use new
2220         mono_metadata_decode_signed_value to decode lower bounds.
2221
2222 2006-02-14  Martin Baulig  <martin@ximian.com>
2223
2224         * reflection.c
2225         (mono_reflection_get_token): Support "MonoGenericMethod" and
2226         "MonoGenericCMethod" and allow generic instances / methods.
2227
2228 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
2229
2230         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2231         to obtain the terminal size using an ioctl.
2232
2233         * object.c (mono_nullable_init): Revert this as nullable reference
2234         types are not valid.
2235         (mono_nullable_box): Ditto.
2236
2237 2006-02-09  Dick Porter  <dick@ximian.com>
2238
2239         * threads.c (mono_thread_detach): Drop a reference to the thread
2240         we're detaching.
2241
2242 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
2243
2244         * object.c (mono_nullable_init): Handle nullable reference types.
2245         (mono_nullable_box): Ditto. Fixes #77446.
2246
2247 2006-02-07  Martin Baulig  <martin@ximian.com>
2248
2249         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2250
2251 2006-02-07  Ankit Jain  <jankit@novell.com>
2252
2253         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2254         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2255         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2256         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2257         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2258         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2259
2260 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
2261
2262         * class.c (mono_class_create_generic): Set type_token as well.
2263
2264         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2265         compatible with MS.
2266
2267 2006-02-02  Martin Baulig  <martin@ximian.com>
2268
2269         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2270         has never been used so far.
2271
2272 2006-02-02  Martin Baulig  <martin@ximian.com>
2273
2274         * mono-debug-debugger.h: Changed comment at the top of this file;
2275         the header is not installed, but it's safe to #include it from
2276         within the JIT.
2277
2278         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2279         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2280
2281 2006-02-02  Martin Baulig  <martin@ximian.com>
2282
2283         * mono-debug.h
2284         (MonoSymbolTable): Removed the `metadata_info' field.
2285
2286         * mono-debug.c
2287         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2288
2289         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2290         (mono_debugger_add_builtin_types): Removed.
2291         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2292         (mono_debugger_create_notification_function): We now operate on a
2293         pre-allocated area; take a `gpointer' and return `void'.
2294
2295         * mono-debug-debugger.c
2296         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2297         (mono_debugger_add_builtin_types): Removed.
2298
2299 2006-02-02  Martin Baulig  <martin@ximian.com>
2300
2301         * threads.c (mono_debugger_create_all_threads): New public method.
2302
2303 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2304
2305         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2306         breaks on several platforms.
2307
2308 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
2309
2310         * assembly.c: the VS.NET build doesn't supply default values for
2311         MONO_ASSEMBLIES and MONO_CFG_DIR.
2312
2313 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
2314
2315         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2316         helper function.
2317
2318         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2319
2320         * loader.c (method_from_memberref): Fix a warning.
2321
2322         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2323
2324         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2325         with explicit layout. Fixes #77433.
2326
2327 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
2328
2329         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
2330         max_interface_id is initialized before using it. Fixes #77398.
2331         (ves_icall_Type_GetInterfaces): Ditto.
2332
2333 2006-01-30  Raja R Harinath  <rharinath@novell.com>
2334
2335         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2336         allocate memory for parameter attributes when parsing memberref
2337         signatures.
2338         * loader.c (mono_loader_set_error_method_load): Don't warn.
2339         (method_from_memberref): Ensure MissingMethodException gets thrown
2340         if method is not found.  Make warning more informative.
2341
2342 2006-01-29  Raja R Harinath  <harinath@gmail.com>
2343
2344         Fix #77397
2345         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2346         return true if is byref.
2347         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2348         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2349         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2350
2351 2006-01-27  Raja R Harinath  <rharinath@novell.com>
2352
2353         Fix tests/find-method.2.il
2354         * loader.c (find_method, find_method_in_class): Remove is_inflated
2355         argument.  Revert 2006-01-18 change.
2356         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2357         is generic, search for method in its generic definition.
2358         * class.c (mono_class_setup_vtable_general): Print generic
2359         arguments of generic types in debugging printf.
2360
2361 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
2362
2363         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2364
2365         * threads.c (mono_threads_request_thread_dump): New helper function.
2366
2367 2006-01-25  Raja R Harinath  <rharinath@novell.com>
2368
2369         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2370
2371 2006-01-25  Ankit Jain  <jankit@novell.com>
2372
2373         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2374         move definition to ..
2375         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2376         
2377 2006-01-25  Ankit Jain  <jankit@novell.com>
2378             Raja R Harinath  <rharinath@novell.com>
2379
2380         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2381         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2382         as necessary.
2383
2384 2006-01-25  Martin Baulig  <martin@ximian.com>
2385
2386         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2387         `MonoDebuggerThread' into debug-debugger.c.
2388
2389 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2390
2391         * profiler.c: fix printing of data.
2392
2393 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
2394
2395         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2396           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2397
2398 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2399
2400         * object.c: fix deadlock related to string interning.
2401
2402 2006-01-23  Martin Baulig  <martin@ximian.com>
2403
2404         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2405
2406         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2407
2408 2006-01-23  Martin Baulig  <martin@ximian.com>
2409
2410         * mono-debug.h: Moved the prototypes of some functions which are
2411         used by the JIT here from mono-debug-debugger.h.
2412
2413 2006-01-21  Martin Baulig  <martin@ximian.com>
2414
2415         * Makefile.am: Don't install mono-debug-debugger.h.
2416
2417 2006-01-21  Martin Baulig  <martin@ximian.com>
2418
2419         * mono-debug-debugger.h: Enforce the private status of this header
2420         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2421         Moved some stuff from mono-debugger-jit-wrapper.h here.
2422
2423 2006-01-20  Raja R Harinath  <rharinath@novell.com>
2424
2425         * class.c (mono_class_from_typeref): Add a sanity test to help
2426         catch lack of assembly load/search hooks.
2427
2428 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
2429
2430         * marshal.c (emit_struct_conv): Relax the fields with same offset
2431         check even more. Fixes #77230.
2432
2433 2006-01-18  Martin Baulig  <martin@ximian.com>
2434
2435         * loader.c (find_method_in_class): Added `gboolean is_inflated'
2436         argument; if false, we compare the uninstantiated signatures.
2437         (method_from_memberref): Compare the uninstantiated signatures;
2438         fixes #76417.
2439
2440 2006-01-18  Robert Jordan  <robertj@gmx.net>
2441
2442         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2443         Clear the weak link. Fixes bug #77170.
2444
2445         * gc.c (mono_gchandle_free):
2446         Reflect *-gc.c changes (tiny optimization).
2447
2448 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
2449
2450         * metadata.c (mono_metadata_signature_dup): Applied patch from
2451         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2452         Fixes #77288.
2453
2454 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
2455
2456         * marshal.c (emit_struct_conv): Allow fields with the same offset when
2457         marshalling from native to managed code. Fixes #77230.
2458
2459 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2460
2461         * threadpool.c: fix problem (Mac only) when more than one asynchronous
2462         connect. Fixes bug #77020.
2463
2464 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2465
2466         * class.c: fixed id assignement for nested interfaces (bug #77275).
2467         Added also better info for --print-vtable debugging.
2468
2469 2006-01-12  Martin Baulig  <martin@ximian.com>
2470
2471         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2472         interfaces on-the-fly; fixes #76625.
2473
2474         * class-internals.h
2475         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2476         don't need that anymore.
2477
2478 2006-01-12  Miguel de Icaza  <miguel@novell.com>
2479
2480         * socket-io.c
2481         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2482         To avoid initing the nested_classes when not needed I turned the
2483         PeerCredData as a toplevel internal class, as it has to be shared
2484         anyways. 
2485
2486         Fixes the CASA issue.
2487
2488 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
2489
2490         * domain.c: Accessors for MonoJitInfo
2491
2492         * profiler-private.h: Add jitinfo to the end jit hook
2493
2494         * profiler.[ch]: Define new hooks, called after jitting which give
2495         the MonoJitInfo that was compiled
2496
2497 2006-01-10  Martin Baulig  <martin@ximian.com>
2498
2499         * class.c (mono_class_setup_events): Add support for generic
2500         classes; fixes #76440.
2501
2502 2006-01-06  Raja R Harinath  <rharinath@novell.com>
2503
2504         Fix #77160.
2505         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2506         on passed-in method.
2507
2508 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2509
2510         * object.c (mono_runtime_invoke_array): Add Nullable support.
2511
2512         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2513
2514 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
2515
2516         * file-io.c: Don't consider sockets as directory and avoid an endless
2517         loop. Fix bug #76966.
2518
2519 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2520
2521         * object.c (mono_nullable_init): New helper function.
2522         (mono_nullable_box): Ditto.
2523
2524         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2525
2526         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2527
2528         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2529         
2530 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
2531
2532         * class.c (mono_class_is_assignable_from): Make T assignable to 
2533         Nullable<T>.
2534
2535 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
2536
2537         * appdomain.c: Bump corlib version to 46.
2538         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2539         serialization purpose) and changed ves_icall_System_Reflection_
2540         Assembly_get_code_base signature to accept a boolean (to escape, or 
2541         not, the assembly code base).
2542
2543 2005-12-23  Dick Porter  <dick@ximian.com>
2544
2545         * icall.c: 
2546         * threads-types.h: 
2547         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2548         CreateEvent icall now returns "created" boolean parameter.
2549
2550 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
2551
2552         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2553         #76967.
2554
2555         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
2556         when attr_klass is an interface. Fixes #77045.
2557
2558 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
2559
2560         * marshal.c (emit_struct_conv): Fix previous patch.
2561         
2562         * marshal.c (emit_struct_conv): Add a check for fields with the same
2563         offset.
2564
2565 2005-12-20  Raja R Harinath  <rharinath@novell.com>
2566
2567         Fix regression in Mono.C5.
2568         * class.c (mono_class_create_generic): If 'klass' is an interface
2569         set up the interface offsets.
2570         (mono_class_is_assignable_from): Don't throw away generic arguments.
2571
2572 2005-12-19  Raja R Harinath  <rharinath@novell.com>
2573
2574         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2575         type parameters.
2576
2577 2005-12-15  Raja R Harinath  <rharinath@novell.com>
2578
2579         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2580         dead store.
2581         (do_mono_metadata_parse_generic_class): Don't pass the current
2582         generic context when parsing the type being instantiated: it
2583         cannot use it, anyway.
2584
2585         * loader.c (method_from_memberref): Don't inflate a signature if
2586         it doesn't contain any type parameters.
2587
2588 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
2589
2590         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2591
2592 2005-12-14  Martin Baulig  <martin@ximian.com>
2593
2594         * class.c
2595         (mono_type_get_name_recurse): Don't return null for type
2596         parameters and open generic classes.
2597         (mono_class_setup_methods): Don't exclude generic instances.
2598         (mono_get_unique_iid): Use different IDs for different
2599         instantiations of the same generic type.
2600         (mono_class_setup_vtable): Only use setup_generic_vtable() for
2601         open generic instances; create a normal vtable for closed generic
2602         instances.
2603         (mono_class_setup_vtable_general): We're now also called for
2604         closed generic instances.
2605
2606         * reflection.c
2607         (mono_reflection_bind_generic_parameters): Correctly use
2608         mono_metadata_lookup_generic_inst() everywhere.
2609
2610 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
2611
2612         * object.c (mono_class_create_runtime_vtable): Call 
2613         mono_class_setup_vtable ().
2614
2615         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2616         function.
2617         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2618         #76959.
2619
2620         * loader.c (mono_loader_set_error_type_load): Print the type load
2621         warnings to the console so they are more visible to the user.
2622         (mono_loader_set_error_method_load): Ditto.
2623
2624         * reflection.c (ensure_runtime_vtable): Revert the last change as it
2625         is still broken.
2626         
2627         * reflection.c (ensure_runtime_vtable): Fix build.
2628
2629         * reflection.c (ensure_runtime_vtable): Disable an optimization which
2630         doesn't work in all cases.
2631
2632 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
2633
2634         * object.c (mono_array_new_full): Treat a single dimensional array
2635         with 0 lower bounds as an szarray. Fixes #76973.
2636
2637         * reflection.c (custom_attr_visible): Really fix this.
2638
2639 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
2640
2641         * reflection.c (custom_attr_visible): Allow nested public attributes
2642         as well.
2643
2644         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2645         interface check.
2646
2647 2005-12-12  Raja R Harinath  <harinath@gmail.com>
2648
2649         * class.c (set_generic_param_owner): Delete.
2650         (mono_class_create_from_typedef): Don't set ->owner field of
2651         generic parameters to "param containers" of enclosing classes.
2652         * reflection.c (mono_reflection_initialize_generic_parameter):
2653         Likewise.
2654
2655 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
2656
2657         * reflection.c (custom_attr_visible): Fix build.
2658
2659 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
2660
2661         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2662         private attributes.
2663         
2664         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2665         handling of null parameter defaults.
2666
2667 2005-12-09  Raja R Harinath  <rharinath@novell.com>
2668
2669         * class.c (mono_class_from_generic_parameter): Don't set
2670         klass->generic_container.
2671         (my_mono_class_from_generic_parameter): Likewise.
2672
2673 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
2674
2675         * reflection.c (load_public_key): Fix a warning.
2676         (method_encode_code): Fix unaligned accesses.
2677
2678 2005-12-07  Martin Baulig  <martin@ximian.com>
2679
2680         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2681
2682         * reflection.c
2683         (write_generic_param_entry): Encode our custom attrs.
2684
2685         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2686
2687 2005-12-07  Martin Baulig  <martin@ximian.com>
2688
2689         * reflection.c (encode_new_constraint): Removed; we don't use the
2690         `NewConstraintAttribute' anymore.
2691
2692 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
2693
2694         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2695         not fire a TypeResolve event when Assembly.GetType () is called.
2696
2697 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
2698
2699         Beginning of support for nullable types in the runtime. Parts of
2700         this patch are from Martin.
2701
2702         * appdomain.c (MONO_CORLIB_VERSION): Bump
2703
2704         * domain.c (mono_init_internal): get the nullable type
2705
2706         * class.c (mono_class_is_nullable): New method
2707         (mono_class_get_nullable_param): New mehod
2708         (mono_class_create_generic): In types T? set cast_class to T
2709
2710         * class-internals.h (MonoDefaults): new nullable default class
2711         (mono_class_get_nullable_param, mono_class_get_nullable_param):
2712         new methods.
2713
2714 2005-12-05  Raja R Harinath  <rharinath@novell.com>
2715
2716         * metadata.c (select_container): New.  Refactor code to select the
2717         appropriate GenericContainer given the type of generic parameter
2718         we are looking for.
2719         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2720         not a MonoGenericContext.  Use select_container.  Update parameters.
2721         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2722         and MONO_TYPE_MVAR.
2723         (unwrap_arrays): Remove duplicate tests.
2724         (find_generic_param): Rename from 'has_same_context'.  Now walks a
2725         generic instantiated class to find any arguments that are generic
2726         parameters.
2727         (mono_type_create_from_typespec_full): Use find_generic_param to
2728         avoid evicting some generic instantiations from the typespec
2729         cache.
2730
2731 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2732
2733         * reflection.c: fixed writing of doubles on ARM FPA.
2734
2735 2005-12-02  Robert Jordan  <robertj@gmx.net>
2736
2737         * icall.c: Fixed EventInfo.ReflectedType (#76829).
2738
2739 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2740
2741         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2742         least on SUSE 10 they are not the same (on debian, they are just the
2743         same thing).
2744
2745 2005-12-01  Raja R Harinath  <rharinath@novell.com>
2746
2747         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2748         DeclaringType for VARs and MVARs.
2749         * class.c (set_generic_param_owner): Fix initialization of owner
2750         fields.
2751
2752 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2753
2754         * icall.c: fixed Enum.ToObject() to correctly convert the values.
2755
2756 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2757
2758         * threadpool.c: workaround for a bug that shows up on the Mac:
2759         select()+connect() on a blocking socket is not like it should
2760         be, so we proceed to connect() in that case, wasting the I/O
2761         threadpool thread until connect succeedes. Fixes bug #75436.
2762
2763 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2764
2765         * threadpool.c: fix typo when setting file descriptor states.
2766
2767 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2768
2769         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
2770         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2771         create a temporary signature container.
2772         (mono_metadata_parse_generic_param): Update to changes.
2773         (mono_type_create_from_typespec_full): Update to changes.
2774         * loader.c (method_from_memberref): Don't use a
2775         MonoGenericContainer while parsing a memberref signature.
2776         (method_from_methodspec): Remove dead-store of the 'container'
2777         variable.  It's overwritten before use.
2778
2779         * metadata.c (mono_type_create_from_typespec_full): Make debugging
2780         checks tighter.
2781         (mono_metadata_parse_generic_param): Likewise.
2782         * loader.c (find_method_in_class): Does not need a
2783         MonoGenericContainer.  Use 'mono_method_signature' rather than
2784         'mono_method_signature_full'.
2785         (find_method, mono_get_method_constrained, method_from_memberref):
2786         Update to changes.
2787
2788         * metadata.c (mono_type_create_from_typespec_full): Ensure that
2789         owner-less generic-parameters are never evicted from the typespec
2790         cache.
2791
2792         * loader.c (method_from_memberref): Don't use the current context
2793         when parsing signatures.
2794         (method_from_methodspec, mono_get_method_from_token): Update to changes.
2795
2796         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2797         side-effects in g_assert.
2798         * loader.c (mono_get_method_from_token): Resolve klass earlier so
2799         that we don't potentially lose information.
2800
2801 2005-11-26  Dick Porter  <dick@ximian.com>
2802
2803         * icall.c:
2804         * threads.c: icalls to implement basic (ie, not named)
2805         System.Threading.Semaphore.
2806
2807 2005-11-24  Dick Porter  <dick@ximian.com>
2808
2809         * process.c
2810         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2811         Use GetProcessId() if it's available.
2812
2813 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
2814
2815         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2816
2817 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2818             Ankit Jain  <jankit@novell.com>
2819
2820         * loader.c (mono_get_method_from_token): Initialize 'method' field
2821         of all generic parameters before parsing the signature.  Remove
2822         code that "fixed"-up MVAR references.
2823
2824 2005-11-23  Ankit Jain  <jankit@novell.com>
2825
2826         * metadata.c (mono_metadata_has_generic_params):
2827         (mono_metadata_load_generic_param_constraints):
2828         (mono_metadata_load_generic_params): Move duplicate code ...
2829         (mono_metadata_get_generic_param_row): ... here. Returns the
2830         first row-id in GenericParam table for a given owner (token).
2831         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2832         prototype.
2833
2834 2005-11-23  Raja R Harinath  <rharinath@novell.com>
2835             Ankit Jain  <jankit@novell.com>
2836
2837         * metadata.c (mono_metadata_class_equal): Pass signature_only when
2838         comparing VARs too.
2839         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
2840         type->data.generic_param only if the type is an MVAR.
2841         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2842         leak owner-less VARs and MVARs into managed space.
2843
2844 2005-11-21  Martin Baulig  <martin@ximian.com>
2845
2846         * class-internals.h
2847         (MonoMethod): Moved the `generic_container' here from
2848         `MonoMethodNormal' since we now also need it for
2849         `MonoMethodPInvoke';
2850         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2851         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2852         an union containing both `MonoMethodNormal' and
2853         `MonoMethodPInvoke'.
2854
2855         * loader.c
2856         (mono_get_method_from_token): Allow implementing generic methods
2857         as interncalls.
2858
2859         * threads.c
2860         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2861         icall.
2862
2863 2005-11-17  Dick Porter  <dick@ximian.com>
2864
2865         * icall.c: 
2866         * process.h: 
2867         * process.c: Split the Process Start_internal icall into
2868         ShellExecuteEx_internal and CreateProcess_internal, which are
2869         called depending on whether UseShellExecute is true.  Fixes bug
2870         76670.
2871
2872         * appdomain.c (MONO_CORLIB_VERSION): Incremented
2873
2874 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2875
2876         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2877         'msize' parameters, use the information in 'mspec' instead.
2878         (emit_object_to_ptr_conv): Ditto.
2879
2880         * marshal.c (emit_struct_conv): Handle explicit layout structs with
2881         fields out of order. Fixes #76733.
2882
2883 2005-11-17  Ankit Jain  <jankit@novell.com>
2884
2885         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2886
2887 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
2888
2889         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2890           bug #76575.
2891
2892 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2893
2894         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2895         for types with non-auto layout. Fixes #76717.
2896
2897 2005-11-16  Ankit Jain  <jankit@novell.com>
2898
2899         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2900         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
2901         if generic_context is null.
2902           (mono_metadata_generic_param_equal): param->owner can be null.
2903           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2904         null.
2905
2906 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
2907
2908         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2909         the correct value.
2910
2911 2005-11-15  Martin Baulig  <martin@ximian.com>
2912
2913         * object.c (set_value): Use mono_class_from_mono_type() instead of
2914         the hack for generic instances; fixes #76136.
2915
2916 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
2917
2918         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2919         fields.
2920
2921         * image.c (load_metadata_ptrs): Initialize the new fields.
2922
2923         * reflection.c (create_dynamic_mono_image): Ditto.
2924
2925         * reflection.c (build_compressed_metadata): Use the new fields.
2926
2927         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2928         icall.
2929
2930         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2931         icall.
2932         
2933 2005-11-15  Ankit Jain  <jankit@novell.com>
2934             Raja R Harinath  <harinath@gmail.com>
2935
2936         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2937         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2938         new per-generic_container cache if the cached MonoType's context matches
2939         the current context.
2940           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2941         to the expected context.
2942           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2943
2944 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2945
2946         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2947         we changed the signature of an icall.
2948         * icall.c: Modify to mono_double_ParseImpl return true/false 
2949         depending on the success, instead of throwing the exception. This will
2950         help us in Double.TryParse methods.
2951         
2952 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
2953
2954         * marshal.c (emit_marshal_object): Throw an exception when
2955         marshalling 'object' instead of crashing. Fixes #76696.
2956
2957 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2958
2959         * class-internals.h: Add prototype for mono_type_get_full_name ().
2960
2961 2005-11-11  Dick Porter  <dick@ximian.com>
2962
2963         * threads.c (mono_thread_manage): Make sure the main thread has
2964         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
2965
2966 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2967
2968         * loader.c (mono_loader_set_error_type_load): Log a warning to the
2969         console about the missing type.
2970         (mono_loader_set_error_method_load): Ditto.
2971
2972 2005-11-09  Miguel de Icaza  <miguel@novell.com>
2973
2974         * mono-config.c (mono_get_config_dir): Set the system defaults if
2975         none is specified.
2976
2977         * assembly.c (mono_set_dirs): New API entry point to set the
2978         assembly and the config directory in one call
2979
2980 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
2981
2982         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2983         the ftnptr was created from a delegate in a domain other than the
2984         current domain. Fixes #75377.
2985
2986         * exception.h exception.c: Add mono_get_exception_not_supported ().
2987
2988 2005-11-08  Martin Baulig  <martin@ximian.com>
2989
2990         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2991
2992 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
2993
2994         * security-manager.h: Added definitions to deal with strongname key 
2995         pairs bigger (and smaller) than 1024 bits.
2996         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
2997         adjust wrt the public key length being used.
2998
2999 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
3000
3001         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
3002           Windows build (r51396-51397).
3003
3004 2005-11-03  Martin Baulig  <martin@ximian.com>
3005
3006         * class.c (mono_class_setup_vtable_general): Also add generic
3007         methods to the vtable; fixes #76581.
3008
3009 2005-11-01  Miguel de Icaza  <miguel@novell.com>
3010
3011         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
3012         sure that we lookup GetString method from the System.Text.Encoding
3013         class, not the derived class or we get an empty method.
3014
3015         Fixed class #76612.
3016
3017 2005-10-25  Miguel de Icaza  <miguel@novell.com>
3018
3019         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
3020         if it has been previously set (embedders). 
3021
3022         Make mono_set_rootdir available also on Unix.
3023
3024 005-10-24  Robert Jordan  <robertj@gmx.net>
3025
3026         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
3027
3028 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
3029
3030         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
3031         only calls which are made to native code use this flag.
3032
3033         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
3034
3035 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
3036
3037         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
3038         Add support for FieldBuilders.
3039
3040 2005-10-29  Martin Baulig  <martin@ximian.com>
3041
3042         * mono-debug.c
3043         (mono_debug_using_mono_debugger): New public method; returns
3044         whether we're running inside the debugger.
3045
3046 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
3047
3048         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
3049         for Method/Constructor/FieldBuilders.
3050
3051 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
3052
3053         * reflection.c (module_add_cattrs): Save custom attributes for global methods
3054         and fields as well.
3055
3056 2005-10-26  Martin Baulig  <martin@ximian.com>
3057
3058         * mono-debug-debugger.c
3059         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
3060
3061 2005-10-24  Raja R Harinath  <harinath@gmail.com>
3062
3063         * icall.c (base64_to_byte_array): Don't pass an out-of-range
3064         integer to isspace.
3065
3066 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
3067
3068         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
3069         when passing valuetypes byref. Fixes #76502.
3070
3071 2005-10-19  Jackson Harper  <jackson@ximian.com>
3072
3073         * profiler.c: Don't put a . in front of types that are not in a
3074         namespace.
3075
3076 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
3077
3078         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
3079
3080 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
3081
3082         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
3083         #76436.
3084         (mono_marshal_get_ldflda_wrapper): Fix a warning.
3085
3086 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3087
3088         * assembly.c metadata-internals.h icall.c: Define an additional
3089         parameter for mono_assembly_name_parse_full, so we can avoid creating
3090         S.R.AssemblyName.Version when no version info wasn't passed.
3091         
3092 2005-10-09  Miguel de Icaza  <miguel@novell.com>
3093
3094         * class.c (mono_type_get_full_name): Reimplement method that was
3095         removed. 
3096
3097         * image.c: Some docs
3098
3099 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
3100
3101         * profiler.c (output_newobj_profile): Fix printing of Total memory
3102         on x86.
3103
3104 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
3105
3106         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
3107
3108 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
3109
3110         * threads.c: remove debug output.
3111
3112 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
3113
3114         * threads.c (mono_thread_manage): Fix crashes if more than 64
3115         threads need to be aborted. Hopefully fixes #75899.
3116
3117         * assembly.c (mono_stringify_assembly_name): New helper function.
3118
3119         * class.c: Use mono_stringify_assembly_name instead of the similar
3120         static function.
3121
3122         * assembly.h assembly.c: Add support for calling a postload search 
3123         hook if an assembly cannot be loaded.
3124
3125         * appdomain.c: Register new search hooks which call the AssemblyResolve
3126         events in AppDomain. Fixes #75231
3127
3128 2005-10-07  Martin Baulig  <martin@ximian.com>
3129
3130         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
3131         methods without debug info.
3132
3133 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
3134
3135         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3136         wrappers.
3137
3138 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3139
3140         * file-io.c: now that we return symlinks, use lstat and, when the file
3141         is a symbolic link, stat, to get the file attributes. Also avoid the
3142         conversion to/from utf16/external.
3143
3144 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
3145
3146         * class.c (mono_class_layout_fields): Compute klass->has_references
3147         correctly if an embedded valuetype is not yet initialized. Fixes
3148         #76331.
3149
3150 2005-10-04  Martin Baulig  <martin@ximian.com>
3151
3152         * metadata.c
3153         (mono_metadata_load_generic_param_constraints): New public
3154         function; splitted the constraints loading out from
3155         mono_metadata_load_generic_params().
3156
3157         * class.c (mono_class_create_from_typedef): Call
3158         mono_metadata_load_generic_param_constraints() after setting up
3159         the type and creating our parent; fixes #75329.
3160
3161 2005-10-04  Martin Baulig  <martin@ximian.com>
3162
3163         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3164         non-dynamic parent classes.
3165
3166 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
3167
3168         * file-io.c : win32 build fix (ETXTBSY seems not found).
3169
3170 2005-10-04  Martin Baulig  <martin@ximian.com>
3171
3172         * reflection.c
3173         (mono_image_get_methodspec_token): Make the cache actually work;
3174         fixes #75974.
3175
3176 2005-10-04  Martin Baulig  <martin@ximian.com>
3177
3178         * class.c (mono_class_name_from_token): Removed the unneccessary
3179         `MonoGenericContext *' argument.
3180
3181 2005-10-04  Martin Baulig  <martin@ximian.com>
3182
3183         * loader.c
3184         (method_from_methodspec): Make the caching work again; fixes the
3185         performance regression from #76262.
3186
3187 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3188
3189         * file-io.c:
3190         * file-io.h:
3191         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3192         GetFileSystemEntries that performs the same work but without going
3193         into io-layer, locking, etc.
3194
3195 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
3196
3197         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
3198         ThreadState_Stopped as well. Fixes #76047.
3199
3200 2005-09-29  Martin Baulig  <martin@ximian.com>
3201
3202         * class.c
3203         (inflate_generic_context): If the new context has a `gmethod', set
3204         its `container' that that gmethod's `container'.
3205
3206         * metadata.c
3207         (mono_metadata_parse_generic_param): Simplify things;
3208         `generic_container = generic_context->container;' is just fine.
3209
3210         * loader.c (method_from_methodspec): Code cleanups.
3211
3212 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3213
3214         * decimal.c: fix warning (and let gcc generate correct
3215         code on ARM with optimizations).
3216
3217 2005-09-28  Martin Baulig  <martin@ximian.com>
3218
3219         * loader.c
3220         (method_from_memberref): Added `MonoGenericContext *class_context'
3221         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3222         (method_from_methodspec): If we're a memberref, use the enclosing
3223         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
3224
3225 2005-09-28  Martin Baulig  <martin@ximian.com>
3226
3227         * object.c (mono_runtime_invoke_array): Added support for
3228         MONO_TYPE_GENERICINST; fixes #75917.
3229
3230 2005-09-27  Martin Baulig  <martin@ximian.com>
3231
3232         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3233         `k->byval_arg.type' to determine the actual type.
3234
3235         * loader.c (method_from_methodspec): Removed some hacks.
3236
3237 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
3238
3239         * class-internals.h (mono_field_is_deleted): Do the test for
3240         rtspecialname before we check the actual name of the field. This
3241         prevents us from dereferencing a pointer into the string table,
3242         saving us from accessing a few pages
3243
3244         * *.c: Replace the use of {Enter,Leave}CriticalSection with
3245         macros. This will allow a deadlock debugger to easily be plugged
3246         in.
3247
3248 2005-09-27  Martin Baulig  <martin@ximian.com>
3249
3250         * loader.c (method_from_methodspec): Create a "signature"
3251         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
3252
3253 2005-09-27  Martin Baulig  <martin@ximian.com>
3254
3255         * class.c
3256         (inflate_generic_class): Correctly set the new context's
3257         container.
3258
3259         * loader.c
3260         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3261         instead of a `MonoGenericContext *'.
3262         (mono_method_signature_full): Take a `MonoGenericContainer *'
3263         instead of a `MonoGenericContext *'.
3264
3265         * metadata.c
3266         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3267         instead of a `MonoGenericContext *'.
3268         (mono_metadata_parse_method_signature_full): Likewise.
3269
3270 2005-09-26  Martin Baulig  <martin@ximian.com>
3271
3272         * class.c
3273         (mono_class_from_generic_parameter): Set `klass->generic_container'
3274         (mono_class_from_generic_parameter): Likewise.
3275         (mono_bounded_array_class_get): We inherit the generic container
3276         from the element class.
3277
3278         * loader.c
3279         (find_method, find_method_in_class): Take a `MonoGenericContext *'
3280         argument rather than computing it here.
3281         (method_from_memberref): Correctly set the generic context before
3282         parsing the signature.  Fixes #75681.
3283
3284 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
3285
3286         * object.c (mono_class_has_special_static_fields): Fix warnings.
3287
3288 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3289
3290         * assembly.c: Add parse_public_key function, to
3291         par the public keys. Also added mono_assembly_name_parse_full,
3292         to define it the parsed key should be freed or not.
3293         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3294         to parse a long format assembly name.
3295         * metadata-internals.h: Keep mono_assembly_name_parse_full as
3296         private, since calling it to preserve the key requires
3297         freeing it manually.
3298         
3299 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
3300
3301         * locales.c : removed HAVE_ICU part.
3302
3303 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3304
3305         * object.c (mono_class_create_runtime_vtable): Avoid calling 
3306         field_is_special_static if the klass has no special static fields.
3307
3308         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3309         (MonoCachedClassInfo): Likewise.
3310
3311         * object.c (mono_class_has_special_static_fields): New helper function.
3312
3313 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3314
3315         * class.c (mono_class_create_from_typedef): Don't call 
3316         interfaces_from_typedef_full for enums.
3317         (mono_class_create_from_typedef): Compute the base types of enums directly
3318         without calling mono_class_setup_fields ().
3319         (mono_class_find_enum_basetype): New helper function.
3320
3321         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3322         one place inside the string heap.
3323         
3324 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3325
3326         * class.c: locking fixes, code cleanups, some docs added.
3327         Allocate some data structures in the image mempool.
3328
3329 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3330
3331         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3332         the example code.
3333         
3334 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3335
3336         * class-internals.h, class.c, reflection.c: reduce memory taken by
3337         MonoClass.
3338
3339 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3340
3341         * metadata.c, metadata.h, loader.h: documentation updates, code and
3342         API cleanups.
3343
3344 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3345
3346         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3347         the example code.
3348
3349         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3350         page faults caused by the runtime while reading metadata.
3351
3352 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3353
3354         * socket-io.c: the field names were changed 3 months ago and no one
3355         realized until bug #76077 got filed!
3356
3357 2005-09-20  Martin Baulig  <martin@ximian.com>
3358
3359         * icall.c (assembly_icalls): Removed some unused debugger icalls.
3360
3361 2005-09-20  Martin Baulig  <martin@ximian.com>
3362
3363         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3364         write the rank into the class entry.
3365
3366 2005-09-20  Martin Baulig  <martin@ximian.com>
3367
3368         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3369
3370 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
3371
3372         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3373
3374         * icall.c (custom_attrs_defined_internal): New icall.
3375
3376         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3377         function.
3378         (mono_custom_attrs_construct_by_type): New helper function.
3379
3380 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
3381
3382         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3383         terminate the resulting string. Fixes #76123.
3384
3385 2005-09-16  Martin Baulig  <martin@ximian.com>
3386
3387         * mono-debug.c
3388         (mono_debug_add_method): Ignore inflated methods for the moment.
3389
3390 2005-09-14  Martin Baulig  <martin@ximian.com>
3391
3392         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3393
3394 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
3395
3396         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3397         return a success/failure indication.
3398         (mono_metadata_interfaces_from_typedef_full): Ditto.
3399         (get_constraints): Ditto.
3400
3401 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
3402
3403         * marshal.c (emit_marshal_array): Fix handling of null arrays.
3404         
3405         * marshal.c (emit_marshal_array): Add support for returning string
3406         arrays from delegates. Fixes #76063.
3407
3408         * marshal.c: Use the emit_ldloc/stloc macros where possible.
3409
3410 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
3411
3412         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3413         icall.
3414
3415 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
3416
3417         * reflection.c icall.c: Fix after mono_get_exception_type_load
3418         signature change.
3419
3420         * assembly.c (mono_assembly_get_assemblyref): New helper function.
3421         (mono_assembly_load_reference): Use the new helper.
3422
3423         * class-internals.h (MonoLoaderError): New structure containing 
3424         information about type loading errors.
3425
3426         * class-internals.h loader.c: Add APIs to store per-thread loader
3427         error information.
3428
3429         * loader.c class.c: Set the loader error if needed.
3430
3431         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3432
3433 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3434
3435         * decimal.c: fixed to handle the broken ARM fp format.
3436
3437 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3438
3439         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3440         broken.
3441
3442 2005-09-06  Martin Baulig  <martin@ximian.com>
3443
3444         * domain.c (supported_runtimes): Added v2.0.50727.
3445
3446 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3447
3448         * culture-info.h: reduce the size of some structures.
3449
3450 2005-09-05  Martin Baulig  <martin@ximian.com>
3451
3452         Reflect latest API changes in the August CTP.
3453
3454         * icall.c
3455         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3456         ("MonoType.HasGenericArguments"): Removed.
3457         ("MonoMethod.BindGenericParameters"): Renamed to
3458         "MakeGenericMethod".
3459         ("MethodBuilder.BindGenericParameters"): Renamed to
3460         "MakeGenericMethod".    
3461
3462 2005-09-05  Martin Baulig  <martin@ximian.com>
3463
3464         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3465
3466 2005-09-05  Martin Baulig  <martin@ximian.com>
3467
3468         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3469
3470         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3471         generic_container is non-NULL.
3472
3473 2005-09-05  Martin Baulig  <martin@ximian.com>
3474
3475         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3476
3477         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3478
3479 2005-08-29  Michal Moskal  <malekith@nemerle.org>
3480
3481         * reflection.c (encode_locals,
3482         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3483         for large generic types.
3484
3485 2005-09-05  Martin Baulig  <martin@ximian.com>
3486
3487         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3488
3489         * class.c (mono_dup_array_type): New public method.
3490         (mono_metadata_signature_deep_dup): New public method.
3491         (dup_type): Correctly duplicate array and function types.
3492
3493 2005-09-05  Martin Baulig  <martin@ximian.com>
3494
3495         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3496
3497         * reflection.c (get_default_param_value_blobs): Handle generic types
3498         and generic methods.
3499
3500 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
3501
3502         * class.c: Fixed error reporting (method/class were inversed) for 
3503         inheritance demands.
3504         * security-manager.c|h: Added the AppDomain when calling the managed
3505         System.Security.SecurityManager.InheritanceDemand method.
3506
3507 2005-09-01  Raja R Harinath  <rharinath@novell.com>
3508
3509         * reflection.c (encode_marshal_blob): 'marshaltype' and
3510         'marshaltyperef' are alternate sources for the custom marshaler
3511         name.
3512
3513 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3514
3515         * class.c: fix creation of array classes with rank == 1
3516         (patch by Ankit Jain <jankit@novell.com>).
3517
3518 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3519
3520         * object.c: fix check for creating the bound data for arrays vs
3521         szarrays.
3522
3523 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3524
3525         * object.c: configuration file name is now based on the executable name,
3526         not the image name. Fixes bug #75931.
3527
3528 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
3529
3530         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3531         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3532
3533 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
3534
3535         * rand.c: Use wincrypt.h instead of WinCrypt.h.
3536
3537 2005-08-24  Ankit Jain  <jankit@novell.com>
3538             Raja R Harinath  <rharinath@novell.com>
3539
3540         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3541           called by it recursively.
3542           (mono_class_init): Remove special case in pending_init handling, since it's
3543           superseded by the fix to mono_class_from_typeref.
3544
3545 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3546
3547         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
3548         BROKEN_THREAD_START stuff.
3549
3550 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
3551
3552         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
3553         trampoline.
3554
3555         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3556         
3557         * object.c (mono_delegate_ctor): Replace the original function address with
3558         a delegate trampoline.
3559
3560 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3561
3562         * icall.c: add boolean argument to base64_to_byte_array and 
3563         InternalFromBase64String to control whether a whitespace-only string
3564         is allowed (or should casue a FormatException to be thrown). We need
3565         this as the behavior has changed between MS.NET 1.x and 2.0, and we
3566         to match the MS behaviour in both profiles.
3567         * appdomain.c: Bump corlib version.
3568
3569 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3570
3571         This patch implements a big portion of publisher policy
3572         support, used to bind assembly versions and redirect
3573         one assembly from version A to version B.
3574
3575         * assembly.c:
3576         New GSList loaded_assembly_bindings, for storing the cached
3577         assembly bindings.
3578         (assembly_binding_maps_name): New static function for checking if a 
3579         assembly binding information maps an assembly name.
3580         (mono_assembly_binding_info_free): New function for freeing
3581         assembly binding information resources.
3582         (get_publisher_policy_info): New static function for retrieving 
3583         assembly binding information from a MonoImage.
3584         (compare_versions): New static function for comparing an assembly
3585         binding information data and the version of an assembly name.
3586         (check_policy_versions): New static function for checking if an
3587         assembly binding info mapping an assembly name is valid for it.
3588         (mono_assembly_load_publisher_policy): New static function for
3589         loading the 'policy.major.minor.MyAssembly' image for an assembly
3590         with an assembly name 'aname'.
3591         (mono_assembly_bind_version): New static function for updating
3592         assembly redirection.
3593         (mono_assembly_apply_binding): New static function for applying
3594         assembly binding.
3595         (search_binding_loaded): New static function for searching 
3596         loaded assembly binding infos in the cache domain.
3597         (mono_assembly_load_full): Don't apply assembly binding for
3598         reflection only assemblies.
3599
3600         * metadata-internals.h: Add MonoAssemblyBindingInfo,
3601         which contains information about assembly binding. Also
3602         declare signature for mono_config_parse_publisher_policy ()
3603         function, used to retrieve pub policy info.
3604         
3605         * mono-config.c:
3606         (publisher_policy_start): New static function used to parse publisher 
3607         policy config files.
3608         (publisher_policy_parser): New static MonoParseHandler containing 
3609         the functions used when parsing config files.
3610         (mono_config_parse_publisher_policy): New function for parsing
3611         publisher policy files.
3612         
3613 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
3614
3615         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3616
3617         * marshal.c (mono_delegate_free_ftnptr): Ditto.
3618
3619         * object.c (mono_get_addr_from_ftnptr): New helper function.
3620
3621         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3622
3623         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3624
3625 2005-08-19  Dick Porter  <dick@ximian.com>
3626
3627         * threads.c, threads.h, appdomain.c, appdomain.h,
3628         profiler-private.h, monitor.c, object.c, object-internals.h,
3629         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3630         store the thread ID, so it can hold a 64 bit value if needed.
3631
3632 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
3633
3634         * reflection.c (mono_reflection_create_dynamic_method): Store the
3635         handle class into the method references as well so ldtoken works in
3636         dynamic methods.
3637
3638         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3639         types.
3640
3641 2005-08-19  Ankit Jain <jankit@novell.com>
3642
3643         Fix #75847.
3644         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
3645           here rather than using the method signature of a arbitrary function
3646           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
3647           two arguments.
3648           Hack done with Harinath.
3649
3650 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3651
3652         * threadpool.c: disable printing stack traces when we get a exception
3653         in a threadpool thread. I need to do more testing to figure out which
3654         cases actually print this. Fixes bug #75828.
3655
3656 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3657
3658         * icall.c: there might be ignored whitespace after the last '='. This
3659         fixes length computation and bug #75840.
3660
3661 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
3662
3663         * assembly.c (mono_assembly_load_full): Consider .exe extension as
3664         well. Fixes #75809.
3665
3666         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3667         #75784.
3668         
3669         * reflection.c (create_custom_attr_data): Ditto.
3670
3671 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
3672
3673         * locales.c, culture-info.h : removed RegionLCIDMap.
3674         * culture-info-tables.h : regenerated.
3675
3676 2005-08-16  Martin Baulig  <martin@ximian.com>
3677
3678         * class.c (mono_type_get_name_recurse): Small fix.
3679
3680 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
3681
3682         * locales.c : indentation fixie.
3683
3684 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
3685
3686         * object-internals.h,
3687           locales.h,
3688           locales.c,
3689           culture-info.h,
3690           icall.c : added RegionInfo table support.
3691         * culture-info-table.h : regenerated for region support.
3692
3693 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
3694
3695         * reflection.c (resolve_object): handle all kinds of MonoMethod
3696         including generic ones
3697
3698 2005-08-12  Ankit Jain <jankit@novell.com>
3699
3700         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3701           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
3702
3703 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
3704
3705         * process.c: Don't close a thread handle when it's NULL. This is a
3706         workaround for bug #75733.
3707
3708 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
3709
3710         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3711
3712 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
3713
3714         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3715
3716 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3717
3718         * threadpool.c: if a work item in the thread pool has a callback that
3719         catches a exception, don't propagate it after invoking the callback.
3720         Fixes bug #75336.
3721
3722 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
3723
3724         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3725
3726         * class-internals.h (MonoCachedClassInfo): Add some new fields.
3727
3728         * class.c (mono_class_init): Load field info lazily in the AOT case.    
3729
3730         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3731
3732 2005-08-03  Ankit Jain  <jankit@novell.com>
3733
3734         Fix #75683.
3735         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3736           PInvoke calling convention is 0.
3737
3738 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
3739
3740         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
3741         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3742
3743 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3744
3745         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3746         to handle threads not started by the GC (patch by Michael Meeks
3747         <michael.meeks@novell.com>).
3748
3749 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
3750
3751         * reflection.c: Make buffer used in emitting types larger for some
3752         big generic types (patch by Michal Moskal).
3753
3754 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
3755
3756         * mono-debug.c: Fix some (not all) alignment problems.
3757
3758 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3759
3760         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3761         Invoke mono_image_load_from_data_full passing the refonly
3762         parameter.
3763
3764         * assembly.c
3765         (mono_assembly_open_from_bundle): Add the refonly argument, 
3766         in order to pass it to other methods it calls to.
3767         (do_mono_assembly_open): Add the refonly argument, in order 
3768         to pass it to other methods it calls to.
3769         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3770         the refonly parameter to it.
3771
3772         * image.c: Add loaded_images_refonly_hash and
3773         loaded_images_refonly_guid_hash to cache the reflection
3774         only loaded images.
3775         (mono_images_init): Initialize the hash tables used for
3776         caching the reflection only images.
3777         (load_modules): Invoke mono_image_open_full passing the refonly
3778         parameter to load the modules the correct way.
3779         (build_guid_table): Add the refonly argument, to re-build the 
3780         correct hash table.
3781         (do_mono_image_open): Added the refonly argument, in order to
3782         define it for the loaded image.
3783         (mono_image_loaded_full): New function, which receives an
3784         additional parameter to look for the image in the refonly or
3785         non-refonly section.
3786         (mono_image_loaded): Updated, using mono_image_loaded_full.
3787         (mono_image_loaded_by_guid_full): The same case that happens
3788         with mono_image_loaded_full.
3789         (mono_image_loaded_by_guid): Likewise.
3790         (register_image): Use the ref_only variable inside MonoImage
3791         to decide in which hash table store the current image.
3792         (mono_image_open_from_data_full): Rename
3793         mono_image_open_from_data to mono_image_open_from_data_full,
3794         adding the refonly argument, to define the ref_only variable 
3795         inside MonoImage.
3796         (mono_image_open_from_data): Return 
3797         mono_image_open_from_data_full.
3798         (mono_image_open_full): Rename mono_image_open to
3799         mono_image_open_full, receiving the new refonly argument,
3800         to pass it to inner methods.
3801         (mono_pe_file_open): Update this function, to open
3802         a MonoImage as a non-refonly image.
3803         (mono_image_close): Use the refonly variable inside
3804         MonoImage to remove the image from the correct caches.
3805
3806         * image.h: Add the signatures of mono_image_open_full,
3807         mono_image_open_from_data_full, mono_image_loaded_full,
3808         mono_image_loaded_by_guid_full.
3809
3810         * metadata-internals.h: Add the ref_only field to 
3811         MonoImage.
3812         
3813 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3814
3815         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3816         Fix the last behavior, which used to load the assemblies and
3817         extract MonoReflectionAssemblyName information, instead of
3818         extract it from the metadata tables. Needed for Reflection
3819         Only assemblies.
3820         
3821 2005-07-29  Martin Baulig  <martin@ximian.com>
3822
3823         * mono-debug-debugger.c
3824         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3825         not initialized.
3826
3827         * mono-debug.c
3828         (mono_debug_address_from_il_offset): Check whether we have
3829         debugging support before attempting to take the lock.
3830         (mono_debug_source_location_from_address): Likewise.
3831         (mono_debug_source_location_from_il_offset): Likewise.
3832         (mono_debug_il_offset_from_address): Likewise.
3833         (mono_debug_address_from_il_offset): Likewise.
3834
3835 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
3836
3837         * class.c (mono_class_from_name_case): Add support for dynamic images.
3838         Fixes #75650.
3839
3840         * object.c (mono_class_compute_gc_descriptor): Add a workaround
3841         for #75479.
3842
3843 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3844         
3845         * reflection.c (mono_method_get_object): Fix warning.
3846
3847 2005-07-28  Martin Baulig  <martin@ximian.com>
3848
3849         * mono-debug.c
3850         (mono_debug_add_wrapper): Also write the wrapper type.
3851
3852 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3853
3854         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3855         
3856         * class.c (mono_class_init): Avoid reading nested classes if the AOT
3857         data indicates the class has none.
3858
3859 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
3860
3861         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3862         loader lock with the debugger lock. Prevents deadlocks for beagle.
3863
3864         Beagle can now run on an smp box for a weekend without any
3865         issues. Woohoo!
3866
3867 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
3868
3869         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3870         in a module. Fixes #75629.
3871
3872 2005-07-26  Martin Baulig  <martin@ximian.com>
3873
3874         * mono-debug.c (mono_debug_add_wrapper): New static method.
3875         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3876         interncall or a wrapper.
3877
3878         * mono-debug.h (MonoDebugWrapperData): New public typedef.
3879         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3880         (MONO_DEBUGGER_VERSION): Bump to 51.
3881
3882         * mono-debug-debugger.c
3883         (mono_debugger_add_type): Removed this empty function.
3884         (mono_debugger_add_method): Likewise.
3885
3886 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3887
3888         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
3889         before accessing method->slot.
3890
3891 2005-07-21  Jb Evain  <jbevain@gmail.com>
3892
3893         * reflection.c (method_encode_clauses/class): Handle filters clauses.
3894         Fixes #75010.
3895
3896 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3897
3898         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3899         #75587.
3900
3901 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3902
3903         * image.h image.c: Add mono_image_get_guid () API function.
3904
3905 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
3906
3907         There were issues when multiple threads tried to load
3908         assemblies. A deadlock was created between assemblies_mutex and
3909         mono_domain_assemblies_lock. This fixes the issue by making the
3910         assembly ref counting be lock free. See bug 75586.
3911         
3912         * image.c (mono_image_close): The add ref function here was using
3913         Interlocked operations while the unref was using a mutex and a
3914         --. I don't think this was ever a bug that would be exposed in a
3915         non-pendantic way (ie, by an embedder doing a ref on one thread
3916         and an unref on another), but for the sake of correctness, this is
3917         now Interlocked.
3918
3919         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3920         (mono_assembly_load_reference): Call mono_assembly_addref rather
3921         than touching the refcount ourselves.
3922         (mono_assembly_close): Use InterlockedDecrement to unref the
3923         assembly. Don't acquire the lock unless it is actually needed.
3924
3925 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3926
3927         * class.c (mono_class_layout_fields): Fix calculation of has_references
3928         for generic types.
3929
3930 2005-07-12  Martin Baulig  <martin@ximian.com>
3931
3932         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3933
3934         * metadata.c
3935         (mono_type_hash): Provide better hashing for generic instances.
3936         (mono_generic_inst_hash): Improve hashing.
3937         (mono_generic_class_hash): Likewise.
3938
3939         * reflection.c (mymono_metadata_type_hash): Improve hashing for
3940         generic instances.
3941
3942 2005-07-12  Martin Baulig  <martin@ximian.com>
3943
3944         * reflection.c (mono_reflection_create_runtime_class): Remove the
3945         hack for generic type definitions and non-`Run' assemblies.
3946         (mono_reflection_bind_generic_parameters): Also use
3947         `klass->wastypebuilder' to check for TypeBuilders.
3948
3949 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
3950
3951         * class.c (mono_class_layout_fields): Fix calculation of has_references
3952         for generic types.
3953
3954         * class.c (inflate_generic_class): Fix a leak.
3955         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3956         for generic types.
3957
3958 2005-07-11  Martin Baulig  <martin@ximian.com>
3959
3960         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3961         on error.
3962
3963 2005-07-11  Martin Baulig  <martin@ximian.com>
3964
3965         * loader.c (find_method): Also lookup in
3966         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3967
3968 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3969
3970         * appdomain.c (mono_domain_unload): Don't free the error message
3971         before passing it to mono_get_exception_...
3972
3973         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3974         
3975 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3976
3977         * threads.c: try to better guess an available RT signal (bug #75387).
3978
3979 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3980
3981         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3982         and CACHE_OBJECT.
3983
3984 2005-07-07  Martin Baulig  <martin@ximian.com>
3985
3986         * class.c (mono_type_get_name_full): Return NULL for
3987         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3988         fixes #75408.
3989
3990 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3991
3992         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3993         exit the appdomain as well being aborted.
3994
3995         * threadpool.c: Create all threadpool threads inside the root appdomain, and
3996         change back to the root domain after calling managed code. This enables
3997         appdomains using threadpools to be unloaded.
3998
3999 2005-07-07  Martin Baulig  <martin@ximian.com>
4000
4001         * class-internals.h
4002         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
4003         into `MonoDynamicGenericClass' since we only need it for dynamic
4004         types.
4005
4006         * reflection.c (mono_class_bind_generic_parameters): We don't need
4007         to compute the `parent' here.
4008
4009 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
4010
4011         * culture-info-table.h : regenerated.
4012
4013 2005-07-06  Martin Baulig  <martin@ximian.com>
4014
4015         * icall.c
4016         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
4017
4018         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
4019
4020 2005-07-06  Martin Baulig  <martin@ximian.com>
4021
4022         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
4023         we're doing a signature-only comparision; fixes #74945.
4024
4025 2005-07-06  Martin Baulig  <martin@ximian.com>
4026
4027         * class-internals.h (MonoGenericClass): Moved some things out into
4028         a new `MonoInflatedGenericClass' type.  
4029         (MonoInflatedGenericClass): New type; the `klass' of a
4030         `MonoGenericClass' is now computed lazyly in
4031         mono_get_inflated_generic_class().      
4032
4033         * class.c (mono_get_inflated_generic_class): New public function.
4034         (mono_class_inflate_generic_method): Removed the unused
4035         `MonoClass *' argument.
4036         (setup_generic_vtable): Don't call mono_get_inflated_method() on
4037         all the methods.
4038         (mono_class_create_generic): Make this static and merge it with
4039         mono_class_create_generic_2(); we're now called automatically from
4040         mono_get_inflated_generic_class().
4041
4042         * loader.c (mono_method_signature): Call
4043         mono_get_inflated_method() here.
4044
4045 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
4046
4047         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
4048         type of fields with RVA.
4049
4050         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
4051         for this pseudo class.
4052         (my_mono_class_from_generic_parameter): Likewise.
4053         (mono_class_init): Allow interfaces to have cctors.
4054
4055 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
4056
4057         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
4058         lazily for AOT methods.
4059
4060 2005-07-05  Martin Baulig  <martin@ximian.com>
4061
4062         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
4063         returns FALSE for a successful match, not TRUE.
4064
4065 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
4066
4067         * loader.c (mono_method_get_index): Optimize this a bit.
4068
4069 2005-07-04  Martin Baulig  <martin@ximian.com>
4070
4071         * class.c
4072         (class_compute_field_layout): Move the check for generic type
4073         definitions into mono_class_layout_fields().  Fixes #74684.
4074         (mono_class_from_generic_parameter): Correctly compute
4075         `klass->parent'; fixes #75457.
4076
4077         * reflection.c (register_assembly, register_module): Make sure
4078         `domain->rejobject_hash' is already created.
4079
4080 2005-07-02  Martin Baulig  <martin@ximian.com>
4081
4082         * class-internals.h
4083         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
4084         `MonoDynamicGenericClass'.      
4085
4086 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
4087
4088         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
4089         returned by a field getter is null, since null is a valid value.
4090
4091 2005-07-01  Martin Baulig  <martin@ximian.com>
4092
4093         * reflection.c (mono_reflection_generic_class_initialize): Update
4094         the `dgclass->fields [i].parent' to the correct class.
4095         (mono_image_get_fieldref_token): Use the declaring type, not the
4096         reflected type.
4097
4098 2005-07-01  Martin Baulig  <martin@ximian.com>
4099
4100         * loader.c (find_method): Also look in the interfaces; fixes #75429.
4101
4102 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
4103
4104         * threads.c (thread_cleanup): assert that thread != NULL
4105         (wait_for_tids_or_state_change): We were using the wrong variable
4106         when accessing wait->threads. `i' was always out of the bounds of
4107         the array.
4108
4109 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4110
4111         * loader.c: map user32 and kernel32 to libMonoSupportW
4112
4113 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
4114
4115         * appdomain.c (unload_thread_main): Mark this as WINAPI.
4116
4117 2005-06-28  Martin Baulig  <martin@ximian.com>
4118
4119         * loader.c (method_from_methodspec): Fix #75334.
4120
4121 2005-06-28  Martin Baulig  <martin@ximian.com>
4122
4123         Fix #74953 - Arrays now implement the generic IList<T> interface
4124         on the 2.0 platform.
4125
4126         * class-internals.h (MonoDefaults): Added `generic_array_class'.
4127
4128         * reflection.c (mono_class_bind_generic_parameters): New public
4129         function; similar to mono_reflection_bind_generic_parameters(),
4130         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
4131
4132         * domain.c (mono_init_internal): Try to initialize.
4133         `mono_defaults.generic_array_class' here; this'll only succeed if
4134         we're using the 2.0 corlib.
4135
4136         * icall.c
4137         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4138         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4139         (mono_lookup_internal_call): Added support for nested classes.
4140
4141         * loader.c
4142         (mono_get_method_from_token): Set `result->signature->pinvoke' if
4143         we're an interncall and have generic arguments.
4144
4145         * class.c
4146         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4147         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4148         instance of System.Array.InternalArray<T> for arrays, so they
4149         implement the generic IList<T> interface.
4150
4151 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
4152
4153         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4154         (chastamar@yahoo.com). Fixes #75374.    
4155
4156 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
4157
4158         * culture-info-table.h: regenerated.
4159
4160 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4161
4162         * icall.c: handle spaces correctly for base64 strings.
4163
4164 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
4165
4166         * *.c: Kill some warnings.
4167
4168 2005-06-23  Duncan Mak  <duncan@novell.com>
4169
4170         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4171         that this builds on Solaris 10 (x86).
4172
4173 2005-06-23  Martin Baulig  <martin@ximian.com>
4174
4175         * class.c
4176         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4177         generic type definitions.
4178
4179 2005-06-23  Martin Baulig  <martin@ximian.com>
4180
4181         Fix #75331.
4182
4183         * metadata.c (mono_class_get_overrides): Renamed to
4184         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4185         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4186         pass it to mono_get_method_full().
4187
4188 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
4189
4190         * reflection.c (mono_reflection_create_runtime_class): take the
4191         mono_domain_lock in this method. Prevents deadlocks
4192
4193 2005-06-22  Martin Baulig  <martin@ximian.com>
4194
4195         * loader.c (method_from_methodspec): Fix #75330.
4196
4197 2005-06-22  Martin Baulig  <martin@ximian.com>
4198
4199         * reflection.c (type_get_qualified_name): Use
4200         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4201         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4202         argument; use it if we don't have an assembly name.
4203
4204 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
4205
4206         * object.c: In mono_message_init, set "copy out" flag for in
4207         parameters with the [Out] flag.
4208
4209 2005-06-21  Martin Baulig  <martin@ximian.com>
4210
4211         * class.c
4212         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4213         and MONO_TYPE_PTR.
4214
4215 2005-06-21  Martin Baulig  <martin@ximian.com>
4216
4217         * class.c (mono_class_init): Don't initialize `class->fields' for
4218         generic instances since they're initialized again in
4219         compute_field_layout(). 
4220         (compute_field_layout): Set the field's `generic_info' here; fix
4221         #75320. 
4222
4223 2005-06-21  Martin Baulig  <martin@ximian.com>
4224
4225         * class-internals.h
4226         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4227
4228         * metadata.c (mono_metadata_generic_method_equal): Also
4229         distinguish the `generic_class'; fixes #75334.
4230
4231 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4232
4233         * domain.c:
4234         * appdomain.c:
4235         * domain-internals.h:
4236         * reflection.c: 'domain_assemblies' field is now protected by its own
4237         lock. Don't call into managed code to run the AssemblyLoad event if we
4238         now there are no registered delegates for it.
4239
4240 2005-06-20  Martin Baulig  <martin@ximian.com>
4241
4242         * class.c (mono_class_is_assignable_from): Use a custom version of
4243         mono_class_has_parent() to make things work for generic instances;
4244         fix #75300.
4245
4246 2005-06-20  Martin Baulig  <martin@ximian.com>
4247
4248         * loader.c (method_from_methodspec): Apply a patch from
4249         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4250
4251 2005-06-20  Martin Baulig  <martin@ximian.com>
4252
4253         * class.c (mono_class_init): Reverted Zoltan's last change; it
4254         breaks generics.
4255
4256 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
4257
4258         * threads.c (wait_for_tids_or_state_change): Add missing locking.
4259
4260 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4261
4262         * socket-io.c: fix the index in the socket array for writable/error
4263         sockets. Fixes bug #75306.
4264
4265 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
4266
4267         * class.c (mono_class_init): Allow interfaces to have static ctors.
4268
4269 2005-06-17  Martin Baulig  <martin@ximian.com>
4270
4271         * loader.c (method_from_methodspec): Use `context->container' when
4272         parsing the `gmethod->inst'.
4273
4274 2005-06-17  Martin Baulig  <martin@ximian.com>
4275
4276         * class.c (mono_type_get_name_recurse): Don't add the assembly
4277         name for type arguments.
4278
4279 2005-06-15  Martin Baulig  <martin@ximian.com>
4280
4281         * reflection.c (mono_image_get_inflated_method_token): Encode
4282         correct klass; fixes #75260.
4283
4284 2005-06-13 Michal Moskal <malekith@nemerle.org>
4285
4286         * icall.c: Make GetCorrespondingMethod/Constructor take
4287         MonoReflectionMethod method not MonoMethod. Removed
4288         MonoType.GetCorrespondingField, and make
4289         MonoGenericType.GetCorrespondingField take name not
4290         MonoClassField.
4291
4292 2005-06-13  Michal Moskal <malekith@nemerle.org>
4293
4294         * reflection.c (field_encode_signature, encode_locals):
4295          Make sizes of buffers for types larger (for big generic types).
4296          (create_generic_typespec,
4297          mono_reflection_sighelper_get_signature_local,
4298          mono_reflection_sighelper_get_signature_field):
4299          Add asserts for too small buffers.
4300
4301 2005-06-15  Martin Baulig  <martin@ximian.com>
4302
4303         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4304         if our parent is not a dynamic type.
4305
4306 2005-06-15  Martin Baulig  <martin@ximian.com>
4307
4308         * class-internals.h (MonoTypeNameFormat): New enum.
4309
4310         * class.c
4311         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4312         (mono_type_get_full_name): Removed.
4313         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4314         argument instead of the boolean's.
4315
4316         * icall.c (ves_icall_System_MonoType_getFullName):
4317         Added `gboolean assembly_qualified'.    
4318
4319         * reflection.h
4320         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4321
4322         * reflection.c (mono_reflection_parse_type): Parse the new type
4323         name format.
4324
4325 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4326
4327         * icall.c: no need to convert from utf16 to utf8 and then back again
4328         after the call to GetLogicalDrives.
4329
4330 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4331
4332         * icall.c: frombase64. Fix problems exposed by new tests.
4333
4334 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4335
4336         * icall.c: added internal calls for converting char [] and strings in
4337         base64 into byte [].
4338
4339 2005-06-10  Martin Baulig  <martin@ximian.com>
4340
4341         * class.c (mono_class_create_generic_2): Read the nested classes
4342         from the metadata rather than from `gklass->nested_classes' since
4343         `gklass' might not be initialized yet.
4344
4345 2005-06-09  Duncan Mak  <duncan@novell.com>
4346
4347         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4348         all public headers. Fixes #74919.
4349
4350 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
4351
4352         * domain.c: The key for proxy_vtable_hash is now a pointer
4353         array. Added new GHashFunc and GCompareFunc functions for this.
4354
4355         * class.h: The list of interfaces in MonoRemoteClass is known in
4356         advance and can't grow (we create a new MonoRemoteClass if needed),
4357         so now the interface array can be allocated together with
4358         MonoRemoteClass.
4359         
4360         * object.c: Added a new method create_remote_class_key.
4361         Fixed mono_remote_class so it does not depend on
4362         mono_upgrade_remote_class.
4363         Removed extend_interface_array.
4364         Added new method clone_remote_class(), which makes a copy of a remote
4365         class and adds a new interface or class to it.
4366         mono_upgrade_remote_class() now creates a new remote class (or gets
4367         it from the cache) if an vtable upgrade is needed. In this way
4368         we make sure that other objects sharing the same remote class
4369         don't get the new vtable with unwanted interfaces.
4370         
4371         * object-internals.h:
4372         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4373         
4374         * marshal.c: Track changes in mono_upgrade_remote_class().
4375
4376 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
4377         * icall.c: Add runtime methods for obtaining members of inflated
4378         class, which were created from supplied non-inflated members. It
4379         is used in internal Get{Method,Constructor,Field} methods in
4380         System.Type
4381
4382 2005-06-09  Martin Baulig  <martin@ximian.com>
4383
4384         * reflection.c
4385         (mono_reflection_bind_generic_method_parameters): Fix #75169.
4386
4387 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4388         * reflection.c (mono_image_basic_init): Define
4389         Version in MonoDynamicAssembly. 
4390         
4391 2005-06-08  Martin Baulig  <martin@ximian.com>
4392
4393         Fix #75136.
4394
4395         * loader.c
4396         (mono_method_signature_full): New public method; takes a
4397         `MonoGenericContext *'.
4398         (find_method): Use mono_method_signature_full() and pass the
4399         klass'es context to it.
4400
4401         * class.c (mono_class_is_inflated_method): Use
4402         mono_method_signature_full() and pass the context to it.
4403
4404 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4405
4406         * object.c: add proper locking in mono_remote_class_vtable(),
4407         fixes possible memory corruption.
4408
4409 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
4410
4411         * marshal.c (mono_remoting_marshal_init): set
4412         initialized after initialization.
4413
4414 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
4415
4416         * locales.c : hush.
4417
4418 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
4419
4420         * object.c (extend_interface_array): fix really silly
4421         memory corrupting / comparison bug.
4422
4423 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4424
4425         * reflection.c: Functions added to support the creation
4426         of CustomAttributeData, which includes Attribute data
4427         used by ReflectionOnly methods.
4428
4429         * reflection.h:  mono_reflection_get_custom_attrs_data and
4430          mono_custom_attrs_data_construct added (functions exposed).
4431
4432          * icall.c: Added mono_reflection_get_custom_attrs_data
4433          as icall.
4434         
4435 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
4436
4437         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4438         lupus's request.
4439
4440 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
4441
4442         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4443
4444         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4445         dynamic DllImportAttribute.
4446
4447         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
4448         dynamic DllImportAttribute.
4449
4450         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4451         Fixes #75162.
4452
4453 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4454
4455         * threads.c: avoid segfault when an unstarted thread is aborted.
4456
4457 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
4458
4459         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4460         Returns the name and version of the runtime for reporting.
4461
4462 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4463
4464         * appdomain.c: bump corlib version.
4465         * object-internals.h: new field in MonoReflectionAssembly.
4466
4467 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4468
4469         * object-internals.h: Carlos forgot to add this field.
4470
4471 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4472
4473         * icall.c: Added create_version to create instances
4474         of Version of MonoReflectionAssemblyName. This change helps
4475         the AssemblyName tests to keep running fine.
4476         
4477 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
4478   
4479         * object.c (mono_method_return_message_restore): A somehow less
4480         intrusive fix for #75138.
4481
4482 2005-06-03  Raja R Harinath  <rharinath@novell.com>
4483
4484         * object.c (mono_method_return_message_restore): Fix computation
4485         of expected number of out args.
4486
4487 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4488
4489         * reflection.c (mono_image_get_method_info): Fix the case when the
4490         charset is empty.
4491
4492 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
4493
4494         * object.c: Added missing null check in
4495           mono_method_return_message_restore.
4496
4497 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4498
4499         * reflection.c (mono_image_get_method_info): Handle the case when
4500         dllentry is empty.
4501
4502 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
4503
4504         * object.c: When creating the vtable for a proxy, take into account
4505         all inherited interfaces, not only the ones registered in
4506         iclass->interfaces. This fixs bug #74996.
4507         Also, in mono_method_return_message_restore, verify that the array
4508         of out args has the expected lengh.
4509
4510 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4511
4512         * socket-io.c: update the timeout in Poll when the call is interrupte.
4513
4514 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4515
4516         * socket-io.c: support abort/suspend in Select_internal after last
4517         change.
4518
4519 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4520
4521         * threadpool.c: remove warning.
4522
4523 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4524
4525         * icall.c:
4526         * socket-io.[ch]: Select_internal uses poll() now when available, thus
4527         removing the 1024 limit from select(). Runtime part of the fix for
4528         bug #71203.
4529
4530 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4531
4532         * socket-io.c: when resolving the addresses for the same
4533         host returned by gethostname(), get the local IPs from the interface
4534         list. Loopback addresses are discarded if the are interfaces up with
4535         non-loopback ones. Fixes bug #63265.
4536
4537 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
4538
4539         * appdomain.c, verify.c, object-internals.h, reflection.c:
4540         bumped corlib number to 36, and added new extra_flags field
4541         to ReflectionMethodBuilder and friends.  Fixes #75060.
4542
4543 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4544
4545         * gc.c: register a new weak link only if the object is non-null
4546         (fixes bug#75047).
4547
4548 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4549
4550         * culture-info.h : short time pattern too.
4551
4552 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4553
4554         * culture-info.h : expand long time pattern string length.
4555
4556 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4557
4558         * culture-info-table.h : update (more French date format; #72788).
4559
4560 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
4561
4562         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4563         the method is static. Fixes #75029.
4564
4565 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
4566
4567         * reflection.c: Update the table_idx field of method builders after
4568         saving the module, since it can change. This is a workaround for
4569         bug #74914. 
4570
4571 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4572
4573         * culture-info-table.h : update (additional French date format).
4574
4575 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
4576
4577         * icall.c (ves_icall_type_Equals): Revert last change.
4578         
4579         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4580
4581         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4582
4583 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
4584
4585         * class-internals.h: Added executioncontext_class field to 
4586         MonoDefaults structure.
4587         * domain.c: Cache System.Threading.ExecutionContext class in 
4588         mono_defaults.
4589         * object.c: Capture the ExecutionContext for asynchroneous calls in
4590          mono_async_result_new.
4591         * object-internals.h: Added execution_context and original_context 
4592         fields to MonoAsyncResult. Added execution_context to MonoThread.
4593         * security-manager.c|.h: Added mono_get_context_capture_method to 
4594         return the capture method (if required by the security manager or by
4595         the framework version used).
4596         * threadpool.c: Apply capture (if present) ExecutionContext in 
4597         mono_async_invoke and revert to original context after it completes.
4598
4599 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
4600
4601         * culture-info-table.h : updated (real hacky solution for zh-CHT).
4602
4603 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
4604
4605         * culture-info-table.h : zh-CHT related workaround.
4606
4607 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4608
4609         * marshal.c (emit_marshal_custom): Add some error checking and call the
4610         methods in the ICustomMarshaler interface. Fixes #74875.
4611         
4612         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4613         native->managed wrappers.
4614
4615 2005-05-12  Martin Baulig  <martin@ximian.com>
4616
4617         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4618         here and use the loader lock.
4619
4620         * mono-debug.c: Properly lock when the debugger is not attached.
4621         (mono_debug_init): Release the initial lock if we're not running
4622         in the debugger.
4623
4624 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4625
4626         * marshal.c (emit_marshal_custom): Pass through NULL values without
4627         calling the custom marshalling routines.
4628
4629         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4630         conversion in structures. Fixes #74882.
4631
4632 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
4633
4634         * culture-info-table.h : zh-* cultures were missing.
4635
4636 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
4637
4638         * threads.c: Added a new event background_change_event which is signaled
4639         when a thread changes its background mode.
4640         Moved here several checks previously done in managed code. The checks
4641         require the thread lock, and using the thread lock in managed code
4642         can result in deadlocks.
4643         Merged Start_internal and Thread_internal into a single method. Now 
4644         Thread_internal does all work of creating and starting a thread.
4645         Added icalls for setting and getting the state of the object. Moved from
4646         managed code to avoid locking there.
4647         Added wait_for_tids_or_state_change() which is called instad of
4648         wait_for_tids when waiting for non-backround threads to end. This method
4649         will return if one of the threads ends or the background_change_event
4650         is signaled.
4651         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4652         the background mode. This method signals the background_change_event
4653         event.
4654         * icall.c:
4655         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4656         removed Start_internal.
4657         
4658 2005-05-11  Martin Baulig  <martin@ximian.com>
4659
4660         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4661         to order of some fields to get proper alignment on 64-bit machines.
4662
4663 2005-05-11  Martin Baulig  <martin@ximian.com>
4664
4665         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4666         changes as they're broken and completely fuck up the debugger.
4667
4668         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4669
4670 2005-05-10  Martin Baulig  <martin@ximian.com>
4671
4672         * reflection.c (mono_reflection_generic_class_initialize): Don't
4673         call mono_class_setup_parent() here.
4674
4675 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4676
4677         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4678         send/receive timeout use an integer in milliseconds. We were using a
4679         struct timeval.
4680
4681 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4682
4683         * locales.c:
4684         (internal_get_cultures): reserve the first slot of the array for the
4685         InvariantCulture, which will be filled in managed code.
4686
4687 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
4688
4689         * reflection.c (mono_image_fill_module_table): Initialize the
4690         GENERATION field as well.
4691
4692 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4693
4694         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4695         Monitor.Enter on the object.
4696
4697 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
4698
4699         * threads.c: Enable the wait for running threads when exiting.
4700         * icall.c: Suspend all threads before exiting.
4701
4702 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
4703
4704         * assembly.c (mono_assembly_load_reference): Fix warning.
4705
4706 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4707
4708         * threadpool.c: changed the default number of threads per cpu. From now
4709         on, the default will be 20 + (5 * number of cpus) instead of 50.
4710
4711 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
4712
4713         * loader.c (mono_method_get_signature_full): Add locking here.
4714
4715 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
4716
4717         * appdomain.c: Moved methods for parsing and freeing assembly
4718         names to assembly.c.
4719         * assembly.c, domain-internals.h: Created public methods for parsing
4720         assembly names. Fixed mono_assembly_load_with_partial_name:
4721         it now finds the best match, taking into account the version,
4722         token and culture specified in the partial name. Also return
4723         the latest version if no version information is specified.
4724
4725 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4726
4727         * threadpool.c: replace check for SocketAsyncCall class.
4728
4729 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4730
4731         * threadpool-internals.h:
4732         * Makefile.am: added threadpool-internals.h
4733
4734         * threadpool.c: call mono_unhandled_exception on exceptions not handled
4735         that happen in threadpool threads (tested on MS).
4736         (mono_thread_pool_remove_socket): new function that dispatch any pending
4737         AIO call on a socket that is closing. By now only epoll really needs it,
4738         as select/poll wake up when the socket closes.
4739
4740
4741         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4742
4743 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
4744
4745         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4746
4747 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
4748
4749         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4750
4751 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
4752
4753         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4754         has an abort request, convert it into a suspend request.
4755
4756 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
4757
4758         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4759         warning for the usage of `UnmanagedFunctionPointerAttribute' which
4760         is not supported yet.
4761
4762 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4763
4764         * image.c: register assemblies loaded from data (bundles) in the loaded
4765         assemblies hash. Fixes bug #74772.
4766
4767 2005-04-29  Martin Baulig  <martin@ximian.com>
4768
4769         * class.c (mono_type_get_name_recurse): Update to the new naming
4770         schema from the latest .NET 2.x beta2.
4771         (mono_class_setup_vtable_general): If we're a generic instance,
4772         copy the vtable from our generic type definition and inflate all
4773         the methods in it.
4774
4775         * loader.c (find_method): Update to the new naming schema from the
4776         latest .NET 2.x beta2.
4777
4778 2005-04-29  Raja R Harinath  <harinath@gmail.com>
4779
4780         * class.c (mono_class_init): Add a mono_loader_unlock to the
4781         #74734 fix.
4782
4783 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4784
4785         * icall.c (ves_icall_System_Environment_Exit): Remove the 
4786         suspend_all_other_threads () call for the time being, since it can hang.
4787
4788         * threads.c (mono_thread_manage): Similarly, disable the waiting for
4789         the background threads to exit, since it can also hang.
4790
4791         * class.c (mono_class_init): Applied patch from Ankit Jain 
4792         (radical@gmail.com). Avoid pending init errors when a field refers
4793         to a nested class using a typeref. Fixes #74734.
4794
4795         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4796         this for dynamic modules.
4797
4798 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4799
4800         * threads.c: don't wait for threads that are in the process of aborting
4801         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4802         and waiting for background threads to finish. This makes xsp and
4803         mod-mono-server exit without random length delays and/or hangs.
4804
4805 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4806
4807         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4808
4809 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
4810
4811         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4812         dynamic types to prevent infinite loops. Fixes #74727.
4813
4814         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4815         ..._is_assignable_to.
4816
4817 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
4818
4819         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4820
4821 2005-04-25  Martin Baulig  <martin@ximian.com>
4822
4823         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4824
4825         * domain.c
4826         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4827
4828         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4829
4830         * reflection.c (build_compressed_metadata): Set metadata header
4831         version to 2.0.
4832
4833 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4834
4835         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4836         number into an integral and a decimal part. Fixes #70473.
4837
4838         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4839
4840 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
4841
4842         * culture-info-table.h : reflected the latest locale-builder output.
4843
4844 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4845
4846         * threadpool.c: check for SuspendRequested too when deciding if
4847         mono_thread_interruption_checkpoint should be called.
4848
4849 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4850
4851         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4852         * threads.c: remove interruption_mutex and use Interlocked instead. When
4853         suspending all the threads, wait for all the suspended events at once.
4854         If we're shutting down and get an APC that is going to be queued,
4855         call mono_thread_execute_interruption immediately, as the thread might
4856         be sleeping on a pthread condition or mutex.
4857
4858         * icall.c: call mono_runtime_set_shutting_down before suspending the
4859         threads.
4860
4861         Fixes bug #74693. And now xsp is happier when exiting.
4862
4863 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4864
4865         * loader.c (mono_stack_walk): Fix #74690.
4866
4867 2005-04-22  Martin Baulig  <martin@ximian.com>
4868
4869         * mono-debug.h (MonoDebugMethodJitInfo): Added
4870         `MonoDebugMethodJitInfo *jit'.
4871
4872         * mono-debug.c (mono_debug_read_method): Cache the
4873         MonoDebugMethodJitInfo in `address->jit'.
4874         (mono_debug_free_method_jit_info): New public method.
4875
4876 2005-04-22  Martin Baulig  <martin@ximian.com>
4877
4878         * class.c (mono_class_is_assignable_from): Disallow
4879         type parameter -> interface.
4880
4881 2005-04-21  Dick Porter  <dick@ximian.com>
4882
4883         * threads.c (mono_thread_create): Turn an assertion into an error.
4884
4885 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4886
4887         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4888         
4889         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
4890         Fix some gcc 4.0 warnings.
4891
4892 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4893
4894         * file-io.c: fix alt dir separator char on unix systems
4895         and cleanup (fixes bug #71214).
4896
4897 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
4898
4899         * marshal.c: Use CALLVIRT instead of CALL when dispatching
4900         a call to a remote domain, since the method may be an
4901         interface method in the client domain. This fixes bug #74192.
4902
4903 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4904
4905         * threadpool.c: recv/send are now performed before going back to managed
4906         code to save one transition.
4907
4908 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4909
4910         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4911
4912         * metadata/threadpool.c: removed hack to workaround the bug above.
4913
4914         Fixes bug #74618.
4915
4916 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4917
4918         * reflection.c reflection.h: Fix handling of parameter defaults in
4919         dynamic methods. Also fixes handling of parameter attributes.
4920         Fixes #74609.
4921
4922         * mono-debug.c (mono_debug_close_image): Fix warning.
4923
4924 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4925
4926         * socket-io.h: replaced old unused field with new 'blocking'.
4927         * threadpool.c: restore socket blocking state on windows(tm).
4928
4929 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
4930
4931         * icall.c: don't return the codebase in the AssemblyName[] returned by
4932         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4933         * object-internals.h: Removed FIXME (fields were presents) and fixed
4934         versioncompat declaration.
4935
4936 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4937
4938         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4939         not closed, so don't cleanup when it happens.
4940
4941 2005-04-13  Chris Toshok  <toshok@ximian.com>
4942
4943         * mono-debug-debugger.h: change prototype for
4944         mono_debugger_lookup_type.
4945
4946         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4947         this function, although it should probably be named
4948         mono_debugger_init_type.
4949
4950 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4951
4952         * threadpool.c: fix non-AIO case.
4953
4954 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4955
4956         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4957         the built-in profiler to measure just JIT compilation times.
4958
4959 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4960
4961         * threadpool.c: the epollfd might be closed by another thread at
4962         any time, so ignore EBADF at treat it as a "we're closing" sign.
4963
4964 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4965
4966         * threadpool.c: release the semaphores with a count equals to the number
4967         of working threads in both IO and regular pools. Fixed typo that messed
4968         up the count of IO pool threads. Don't initialize the pipe handles if
4969         we're using epoll.
4970
4971 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4972
4973         * threadpool.c: some systems don't like a NULL when deleting the socket
4974         from epoll.
4975
4976 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4977
4978         * threadpool.c: fix semaphore allocation.
4979
4980 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4981
4982         * threadpool.c: added epoll() based implementation for asynchronous IO
4983         that is used instead of the default poll() when available.
4984         It can be disabled by setting MONO_DISABLE_AIO.
4985
4986 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4987
4988         * threadpool.c: windows needs 'closesocket' and instead of returning
4989         0 when the stream is closed while in select, it returns -1. Fixes bug
4990         #74573.
4991
4992 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
4993
4994         * class.c (class_compute_field_layout): Fix the regression caused by
4995         the previous try.
4996
4997 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4998
4999         * threadpool.c: separate pool for socket async. IO.
5000         * threadpool.h: mono_max_worker_threads is not a global any more.
5001
5002 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
5003
5004         * class.c (class_compute_field_layout): Fix #74549.
5005
5006 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5007
5008         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
5009         use 2 connected sockets instead.
5010
5011 2005-04-08  Miguel de Icaza  <miguel@novell.com>
5012
5013         * mono-config.c: Add new entry point for mkbundle
5014         mono_config_parse_memory. 
5015
5016 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5017
5018         * threadpool.c: removed another unused function.
5019
5020 2005-04-08  Ankit Jain  <radical@corewars.org>
5021
5022         * reflection.c (get_default_param_value_blobs): Add 'types'
5023         parameter to get the types encoded in the constant table.
5024         (mono_param_get_objects): Use the type from the constant table,
5025         not the type of the parameter, when creating default values.
5026         Handle null default values correctly.
5027
5028 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5029
5030         * file-io.c:
5031         * file-io.h:
5032         * threadpool.c:
5033         * threadpool.h:
5034         * icall.c:
5035         * socket-io.c: removed dead code for async IO.
5036
5037 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5038
5039         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
5040
5041         * threadpool.c: intercept socket async. calls and pass them to a thread
5042         that is polling and dispatching the job items to the threadpool as
5043         socket become ready. Fixes bugs #71217, #71933.
5044
5045         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
5046         between char and short/ushort arrays.
5047
5048         * socket-io.c: remove dead code.
5049
5050 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
5051
5052         * locales.c,
5053           icall.c : removed InternalToUpper_Comp() and
5054           InternalToLower_Comp().
5055
5056 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
5057
5058         * char-conversions.h : The tables were incorrectly generated. Should
5059           be generated against invariant culture.
5060
5061 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
5062
5063         * object.c (mono_runtime_invoke_array): Fix return value when 
5064         passing pre-created valuetype objects to ctors.
5065
5066         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
5067         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
5068         Fixes #74338.
5069
5070 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
5071
5072         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
5073         only used with --security and hides the wrong corlib version error.
5074
5075 2005-03-30  Joshua Tauberer  <tauberer@for.net>
5076
5077         * class.c: Changed mono_class_name_from_token so that types
5078         outside of a namespace don't have an initial period.  Improved
5079         the g_warning message used in _mono_class_get when loading
5080         fails.
5081         * assembly.c: In mono_assembly_load_reference, when an assembly
5082         can't be found, "No such file or directory" is misleading and
5083         unhelpful because a few paths were checked for the presence of
5084         the assembly.  When that happens (ENOENT), display a nicer
5085         message indicating the directories that were searched.  In all
5086         cases, the warning is made easier to read for non-hackers.
5087
5088 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
5089
5090         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
5091         project/solution.
5092         * appdomain.h|domain.c: Removed inline from functions.
5093         * appdomain.c: Reduced warnings when compiling on windows.
5094         * icall.c: Fixed output_debug declaration to gunichar2*.
5095         * mono-config.c: Reduced warnings when compiling on windows.
5096         * rand.c: Added missing "windows.h". Added missing return value.
5097         * rawbuffer.c: Added missing winsock2.h for windows.
5098         * sysmath.h: Added mono-compiler.h header to allow/ease 
5099         compilation with non-GCC compilers.
5100         * threads.c: Fixed declarations to compile with VS.NET C compiler.
5101         Removed cast warnings.
5102
5103         Adapted from the work of J Lothian (for VC6).
5104
5105 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
5106
5107         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
5108         from default_path.
5109
5110 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
5111
5112         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
5113         the 2.0 profile.
5114
5115 2005-03-27  Raja R Harinath  <harinath@gmail.com>
5116
5117         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
5118         has to be in $(exec_prefix).  $(prefix) is for arch-independent
5119         stuff, and it would probably use $(prefix)/share rather than
5120         $(prefix)/lib.
5121
5122 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5123
5124         * console-io.c: added 2 includes that might be missing.
5125
5126 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
5127
5128         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
5129         profile.
5130
5131         * reflection.c (create_custom_attr): Allocate the params array using
5132         alloca so it gets GC tracking.
5133
5134 2005-03-23  Chris Toshok  <toshok@ximian.com>
5135
5136         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5137         out some spew.
5138
5139 2005-03-24  Raja R Harinath  <rharinath@novell.com>
5140
5141         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5142         changes to pick up any changes in prefix, etc.
5143
5144 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5145
5146         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5147         
5148         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5149         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5150
5151 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5152
5153         * class-internals.h object-internals.h class.c reflection.c: Extend the
5154         mono_lookup_dynamic_token () function to return the class of the
5155         token as well. 
5156
5157         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5158         well. Fixes #73848.
5159
5160 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
5161
5162         * security-manager.c: Skip inheritance checks for intra-corlib
5163         class inheritance and method overrides. This skips a lot of checks
5164         and (anyway) permissions cannot work until corlib is loaded.
5165
5166 2005-03-23  Martin Baulig  <martin@ximian.com>
5167
5168         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5169         MONO_TYPE_GENERICINST.  
5170
5171 2005-03-23  Martin Baulig  <martin@ximian.com>
5172
5173         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5174
5175 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5176
5177         * class.c: added locking comments to some functions.
5178         Cache the interface offsets arrays (saves about 20 KB
5179         of runtime memory in a typical app).
5180         Reduce the time overhead in mono_class_setup_supertypes ().
5181
5182 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5183
5184         * icall.c: speedup and fix leaks in GetMethodsByName and
5185         GetPropertiesByName.
5186
5187 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5188
5189         * reflection.c: some locking fixes.
5190
5191 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5192
5193         * metadata.c: added missing break in case statement.
5194
5195 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
5196
5197         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5198         typedbyref return values. Fixes #73941.
5199
5200 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5201
5202         * security-manager.c|h: Added demandunmanaged method and 
5203         suppressunmanagedcodesecurity class to MonoSecurityManager.
5204         Renamed aptc class to allowpartiallytrustedcallers.
5205
5206 2005-03-17  Martin Baulig  <martin@ximian.com>
5207
5208         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5209
5210 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5211
5212         * file-io.c: disabled file async. IO using aio_*. It uses the
5213         threadpool now. Workaround for bug #73718.
5214
5215 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5216
5217         * assembly.h, mono-config.c: added code to deal with bundled configs
5218         for bundled assemblies.
5219
5220 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5221
5222         * *.c, private.h: cleanup, removing old private.h header file.
5223
5224 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5225
5226         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5227         and throw_on_unmappable_char attributes.
5228
5229 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
5230
5231         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5232         _ProcessName_internal.
5233
5234 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
5235
5236         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5237         #73631.
5238
5239         * icall.c threads.c threads-types.h: Remove slothash icalls as they
5240         are no longer used.
5241
5242 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
5243
5244         * object.c (compute_class_bitmap): Add support for generics. Fixes
5245         #73527.
5246
5247 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5248
5249         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5250
5251 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5252
5253         * filewatcher.c: commented out the code for windows watcher, as we don't
5254         use it (we use the managed implementation instead).
5255
5256 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5257
5258         * object-internals.h (MonoThread): Remove 'unused1' field.
5259
5260         * appdomain.c: Bump corlib version.
5261
5262         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5263
5264         * reflection.c (mono_reflection_create_runtime_class): Remove the
5265         AssemblyBuilder.Save optimization since it causes too many problems.
5266
5267 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
5268
5269         * exception.c|h: Added mono_get_exception_reflection_type_load to
5270         create a ReflectionTypeLoadException object.
5271         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5272         to return NULL is a InheritanceDemand fails during reflection. Updated
5273         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
5274         ReflectionTypeLoadException if an InheritanceDemand fails during 
5275         reflection. Added icall mapping for GetLinkDemandSecurity.
5276         * security-manager.c|h: Added ves_icall_System_Security_
5277         SecurityManager_GetLinkDemandSecurity internal call to return the
5278         class and methods permissions set for a LinkDemand. Removed unused
5279         fields in MonoSecurityManager.
5280
5281 2005-03-10  Martin Baulig  <martin@ximian.com>
5282
5283         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5284         it's a generic instance.
5285
5286 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
5287
5288         * reflection.c (mono_get_object_from_blob): Applied patch from
5289         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5290
5291         * class.c (mono_class_is_assignable_from): Another try at fixing 
5292         #73469 without breaking anything.
5293
5294 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
5295
5296         * class.c: (mono_class_is_assignable_from): Revert the last changes
5297         since they don't work with generics.
5298         
5299         * class.c (mono_class_is_assignable_from): Fix build bustage.
5300
5301         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5302         the managed IsAssignableFrom method. Fixes #73469.
5303
5304         * reflection.c (mono_reflection_call_is_assignable_from): New helper
5305         function.
5306
5307 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
5308
5309         * object.c (mono_load_remote_field_new): Fix returning uninitialized
5310         memory when the remoting callback does not sets the out arguments.
5311         Fixes #73007.
5312
5313         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5314         by mistake.
5315
5316         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5317
5318         * object-internals.h (MonoStackFrame): Sync with managed object layout.
5319
5320         * appdomain.c: Bump corlib version.
5321
5322 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
5323
5324         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5325         function.
5326
5327         * threads.c (mono_thread_attach): Detect threads which are not started
5328         by the GC pthread wrappers.
5329
5330 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
5331
5332         * icall.c: Added new icall for RNG.
5333         * rand.c|h: Added new icall to open the RNG. This allows to share a 
5334         single handle on Linux to access /dev/urandom and fix #73183.
5335
5336 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5337
5338         * object.c: setting the new vtable in a transparent proxy object must
5339         not change the GC descriptor.
5340
5341 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5342
5343         * object.c: fixed compilation without GCJ support.
5344         * reflection.c: for runtime-created types ensure klass->has_references
5345         is correct (bug #73215).
5346
5347 2005-03-02  Martin Baulig  <martin@ximian.com>
5348
5349         * class.c (mono_class_is_assignable_from): Make this work if
5350         `oklass' is a generic instance; fixes #72831.
5351
5352 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5353
5354         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5355         with hasthis set.
5356         
5357         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5358
5359         * marshal.c: Reorganize native->managed marshalling code to also use
5360         the emit_marshal_... functions.
5361
5362 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5363
5364         * object.c: typed allocs have issues with bitmap sizes > 30,
5365         so check for max_set >= 30.
5366
5367 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5368
5369         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5370         managed code. Fixes #73012.
5371
5372         * metadata.h (MonoMarshalSpec): Add elem_mult field.
5373
5374         * metadata.c reflection.c: Load/Emit elem_mult as well.
5375         
5376         * metadata.h (MonoMarshalSpec): Add comment.
5377
5378         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5379
5380         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5381         num_elem to -1 if not given.
5382
5383         * object-internals.h (MonoReflectionMarshal): Add has_size field.
5384
5385         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5386         given values.
5387
5388 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
5389
5390         * null-gc.c (mono_gc_free_fixed): Was not compilable.
5391
5392 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
5393
5394         * reflection.c (encode_marshal_blob): Encode param_num field as well.
5395
5396         * object-internals.h (MonoReflectionMarshal): Add param_num field.
5397
5398 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5399
5400         * object.c: generalized the reference bitmap creation
5401         and added hooks for the new GC.
5402         * class-internals.c: removed the gc_bitmap field from MonoClass.
5403
5404 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5405
5406         * domain.c: help the compiler to produce better code
5407         in mono_jit_info_table_find ().
5408
5409 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5410
5411         * object.c: make all allocations look typed.
5412
5413 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5414
5415         * socket-io.c: load Mono.Posix if it's not loaded already
5416         (fixes bug#73033).
5417
5418 2005-02-24  Martin Baulig  <martin@ximian.com>
5419
5420         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5421         * reflection.c (dup_type): Likewise.
5422
5423 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
5424
5425         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5426         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5427
5428 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5429
5430         * domain.c, threads.c, object-internals.h: make the critical thread
5431         local vars use the fast access mode (even when we're compiled in
5432         a lib). Provide accessors to be used by the jit during codegen.
5433
5434 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5435
5436         * appdomain.c: Changed hook functios behavior to include
5437         support for the reflection only assemblies. Some icalls were changed
5438         to support the mentioned assemblies too. Signatures of static methods
5439         try_assembly_resolve and real_load now have an additional parameter:
5440         refonly.
5441
5442         * assembly.c: General changes to mono_assembly_ methods to support
5443         reflection only api. Functions mono_assembly_open, mono_assembly_load,
5444         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5445         suffix, to support an additional gbool parameter to specify whether
5446         the assembli is reflection only or not. Created some new hook functions 
5447         to add support for reflection only assemblies. Signatures of static 
5448         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
5449         have now an additional parameter: refonly.
5450
5451         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5452         indicating whether the assembly is reflection only or not.
5453
5454         * exception.c: Add mono_get_exception_invalid_operation.
5455
5456         * icall.c: Throw an InvalidOperationException when trying to invoke
5457         a property/method/event, or trying to set/get the value of a field.
5458         Also add an icall to retrieve the ref_only flag to the
5459         MonoReflectionAssembly.
5460
5461 2005-02-23  Chris Toshok  <toshok@ximian.com>
5462
5463         Part of fix for #72827.
5464         * mono-debug.c (mono_debug_add_method): add lexical block data to
5465         the info we write.  Kind of a hack at the moment - we copy the
5466         lexical block info from the MonoDebugMethodInfo to the
5467         MonoDebugMethodJitInfo here, before writing it.
5468         (mono_debug_read_method): read the lexical block info.
5469
5470         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5471
5472         * debug-mono-symfile.h: add lexical block support.
5473
5474         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5475         support.
5476
5477 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5478
5479         * loader.c (mono_lookup_pinvoke_call): Fix warning.
5480
5481         * object.c (mono_runtime_free_method): Call mono_free_method () and
5482         put the TODOs there.
5483
5484         * loader.c (mono_free_method): Free up most memory allocated for 
5485         dynamic methods.
5486
5487 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5488
5489         * reflection.c: properly flag a Type argument to a
5490         named custom attr value (bug #72248).
5491
5492 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5493
5494         * reflection.c: reduce code duplication in named custom
5495         attribute encoding.
5496
5497 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5498
5499         * reflection.c: properly encode custom attrs of type object
5500         (bug #72649).
5501
5502 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5503
5504         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5505
5506 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5507
5508         * socket-io.c: load System.dll if it's not loaded already
5509         (bug #72850 and #70477).
5510
5511 2005-02-21  Martin Baulig  <martin@ximian.com>
5512
5513         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5514         generic instances.
5515
5516 2005-02-21  Martin Baulig  <martin@ximian.com>
5517
5518         * reflection.c (mono_image_build_metadata): We also need to
5519         "fixup" the MethodImpl table after we computed the final method
5520         indices.  Call fixup_methodimpl() to do that.
5521         (fixup_methodimpl): New private method.
5522
5523 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5524
5525         * assembly.c: special case mscorlib.dll (bug#72536),
5526         patch from Carlos Alberto Cortez.
5527
5528 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
5529
5530         * threads-types.h threads.c: Fix build bustage.
5531
5532         * threads.c: Use a union for long<->double conversions.
5533
5534         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5535         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5536
5537         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
5538         containing the checkpoint call with NOT_TAKEN.
5539         
5540         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
5541         checkpoint before pushing the arguments, so they won't have to be
5542         spilled to stack.
5543
5544 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5545
5546         * domain.c, assembly.c, domain-internals.h: make some data
5547         const and relocation-free.
5548
5549 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5550
5551         * object.c, appdomain.c, class-internals.h: introduce the
5552         MonoClassRuntimeInfo structure to hold the info needed to
5553         use a class at runtime. Made mono_class_vtable() lock-free
5554         for all the appdomains.
5555
5556 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5557
5558         * metadata-internals.h, image.c: introduce a per-image mempool to
5559         be used for memory that has the same lifetime as the image.
5560
5561 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
5562
5563         * domain.c: In mono_init_internal(), instead of selecting the first
5564         runtime version supported by an executable, get a list of all
5565         supported versions and select the one for which an mscorlib exists
5566         (since even if the runtime supports a given version, it doesn't mean
5567         that the framework for that version is installed).
5568         Modified get_runtimes_from_exe to support this behavior.
5569         In supported_runtimes, added information about additional system
5570         assembly versions.
5571         
5572         * assembly.c: Added support for more than one system assembly version
5573         per runtime version. Updated the assembly list.
5574         In mono_assembly_remap_version, removed the initial version check,
5575         since we don't know to which version we need to compare until we
5576         get the version set on which the assembly is based.
5577         Moved the code for loading corlib into the new method
5578         mono_assembly_load_corlib(), so it can be used by the initialization
5579         code.
5580         
5581         * domain-internals.h: Updated data structures and added declaration
5582         for mono_assembly_load_corlib.
5583
5584 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5585
5586         * reflection.c (resolve_object): Fix the creation of the signature in 
5587         the SignatureHelper case.
5588
5589         * assembly.c (mono_assembly_remap_version): Fix binary search.
5590         
5591 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
5592  
5593         * class.c: Added inheritance check when a method is overloaded (from a
5594         virtual method or when implementing an interface) and when a class is
5595         inherited. Added functions to set a failure for a class and to 
5596         retreive the exception from a failure.
5597         * class-internals.h: Added fields to MonoClass to keep the exception
5598         information status for inheritance (or other exceptions) to be thrown
5599         later (i.e. not at load time).
5600         * object.c: Throw the inheritance SecurityException when a type is to 
5601         be created with either class or method inheritance violations.
5602         * reflection.c|h: Fix when getting declsec from a class. Removed 
5603         unrequired code for class. Improved sanity in parameter naming.
5604         * security-manager.c|h: Added functions to check for class and method
5605         inheritance.
5606
5607 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5608
5609         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5610         and has_finalize in dynamic types as well.
5611
5612 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
5613
5614         * culture-info-table.h : fixed currency format for en-GB (and so on).
5615
5616 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5617
5618         * gc.c: ensure the GC handles never have 0 as a value.
5619
5620 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5621
5622         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5623         a pointer to a struct to unmanaged code. Fixes #72625.
5624
5625 2005-02-16  Martin Baulig  <martin@ximian.com>
5626
5627         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5628
5629 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5630
5631         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5632
5633 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5634
5635         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5636
5637         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
5638         UnmanagedFunctionPointerAttribute, use it for determining calling convention
5639         etc. Fixes #71471.
5640
5641         * reflection.c (mono_custom_attrs_get_attr): New helper function.
5642
5643         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5644
5645 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5646
5647         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5648         changes to make the current context a field in MonoThread.
5649
5650 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5651
5652         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5653         the last change.
5654         
5655         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5656         extracted from mono_marshal_get_native_wrapper.
5657
5658         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5659         to create wrappers around native functions.
5660
5661         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
5662         delegates for arbitrary function pointers. Fixes #71472.
5663
5664 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5665
5666         * threads.c: cleaned up the code a little.
5667
5668 2005-02-15  Martin Baulig  <martin@ximian.com>
5669
5670         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5671         the data table.
5672
5673         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5674         allocate larger chunks if needed.
5675
5676 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5677
5678         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5679         in by mistake.
5680
5681 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5682
5683         * domain.c: keep the domains in an array and ensure the domain ids
5684         are kept small, so they can be used as indexes to domain-specific data
5685         with a small memory overhead.
5686
5687 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
5688
5689         * icall.c: Handle byref types in Type icalls. Fixes #72544.
5690
5691 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5692
5693         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5694
5695 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
5696
5697         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5698
5699         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5700         values.
5701
5702         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5703         
5704 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
5705
5706         * domain-internals.h: add the hashtable here.
5707
5708         * class-internals.h: Remove `info' from MonoMethod
5709
5710         * domain.c: Add a new hashtable, jit_trampoline_hash
5711
5712 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5713
5714         * object.c: don't set the value of static fields
5715         (fixes bug#72494).
5716
5717 2005-02-11  Martin Baulig  <martin@ximian.com>
5718
5719         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5720         (mono_debug_add_method): Silently ignore the method if it's too big.
5721         (mono_debug_add_type): Likewise.
5722
5723 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5724
5725         * threads.c, appdomain.c: remove #ifdefs from the code.
5726
5727 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
5728
5729         * metadata-internals.h: Added flags to MonoAssembly to cache the most
5730         common security informations. This allows us to stay in unmanaged code
5731         when doing LinkDemand and it's special cases (except for the first 
5732         time for initialization). The flags a very much used with --security.
5733         * reflection.c|h: Added code to get declarative security attributes 
5734         for LinkDemand and InheritanceDemand. This required to refactor the
5735         existing code for Demand.
5736         * security-manager.c|h: Added new method fields for the special cases
5737         of LinkDemand.
5738
5739 2005-02-10  Martin Baulig  <martin@ximian.com>
5740
5741         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5742         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5743
5744 2005-02-10  Martin Baulig  <martin@ximian.com>
5745
5746         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5747         debugging code; this is almost a complete rewrite.
5748
5749         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5750
5751 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5752
5753         * domain.c, object.h: expose mono_string_equal () and 
5754         mono_string_hash ().
5755         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5756         it's implemented in managed code.
5757
5758 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5759
5760         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5761         lo leak objects between appdomains.
5762
5763 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5764
5765         * assembly.c: old compilers compilation fix from 
5766         robertj@gmx.net (Robert Jordan).
5767
5768 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
5769
5770         * class-internals.h: Little reminder for the future.
5771
5772         * debug-helpers.c: Fix up wrapper_type_names
5773
5774 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5775
5776         * image.c, metadata-internals.h: when loading an image from a file,
5777         mmap all of it and use the same codepaths as when using a
5778         in-memory image: the code is simpler and we use less memory
5779         (both writable and readonly).
5780
5781 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5782
5783         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5784         API to alloc runtime data structures that need to be tracked by the
5785         GC and contain pointers.
5786         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5787         make the code more readable and eventually use a different GC.
5788
5789 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
5790
5791         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5792         for out arguments.
5793         
5794 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
5795
5796         * object.c: In release_type_locks(), don't release the cctor lock
5797         if it has already been released. This fixes a crash in the
5798         thread5 test.
5799
5800 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5801
5802         * gc.c, marshal.c, icall.c: register a delegate for finalization
5803         only when the native function pointer has been allocated for it.
5804
5805 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5806
5807         * object.c: cleaned up some code, allocate objects that are
5808         pointer free with the atomic malloc variant. Allocate memory
5809         for static data from the mempool if it's pointer-free.
5810         Allocate the bounds array at the end of the array data, when needed.
5811         * object-internals.h, object.h: move a private function in a private
5812         header.
5813         * class.c: handle missing case in tracking references in fields.
5814
5815 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5816
5817         * class.c, class-internals.h: keep track if a type has
5818         reference fields in either the instance or static fields.
5819
5820 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
5821
5822         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5823         and renamed to MonoRuntimeInfo. Added fields to store the expected
5824         framework assembly version. Changed mono_get_framework_version and
5825         mono_get_runtime_version for a single mono_get_runtime_info method.
5826         
5827         * assembly.c: Added method to remap system assembly versions to the
5828         current executing runtime version. Removed old mapping code.
5829         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5830         
5831         * icall.c, reflection.c: Track api changes.
5832
5833 2005-02-06  Miguel de Icaza  <miguel@novell.com>
5834
5835         * loader.c (method_from_memberref): Improve error reporting,
5836         produce the class name instead of the typeref/typedef index. 
5837
5838 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
5839
5840         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5841
5842 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5843
5844         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5845         stdcall and charset name mangling.  Reorganize the code and add
5846         some tracing stuff.
5847
5848 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5849
5850         * monodiet.c: More iters!
5851
5852         * marshal.c: Iter usage.
5853
5854         * icall.c: Iter usage.
5855
5856         * object.c: Use iters.
5857
5858         * debug-helpers.c: More iters
5859
5860 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5861
5862         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5863         under win32.
5864
5865 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
5866
5867         * mono-debug-debugger.c: use iters
5868
5869         * class.c, class-internals.h: mono_class_setup_events is static
5870         now
5871
5872         * All callers: use iters
5873
5874 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
5875
5876         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5877         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5878
5879 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5880
5881         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5882
5883         * marshal.h: Add prototypes for ldfld/stfld_remote.
5884
5885         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5886         this is called during startup.
5887         
5888 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5889
5890         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5891         MonoThreadsSync struct private in monitor.c. Changed the way
5892         MonoThreadsSync is allocated so it's faster and there is no
5893         need to keep track of it with a finalizer and it uses less memory.
5894         This also finally allows us to allocate mono objects as ptrfree when
5895         there are no reference fields.
5896
5897 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5898
5899         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5900         disappearing link to the GC interface and use them to simplify
5901         the gchandles code.
5902
5903 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
5904
5905         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5906         stfld_remote which call mono_load/store_field_new. This allows methods
5907         calling ldfld/stfld wrappers to be AOTed.
5908
5909         * console-io.c: Include sys/filio.h under solaris.
5910         
5911         * console-io.c: Include curses.h if needed correctly.
5912
5913 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5914         
5915         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5916         method->klass as well.
5917
5918         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5919
5920         * class.c (mono_class_init): Switch on lazy initialization of 
5921         methods.
5922
5923         * class.c (mono_class_get_finalizer): Handle the case when the 
5924         finalizer is inherited.
5925
5926 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5927
5928         * console-io.c: <curses.h> is needed by term.h on solaris.
5929
5930 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
5931
5932         * icall.c, class-internals.h, monodiet.c, class.c: Remove
5933         mono_class_setup_properties where possible. Remove this ftn from
5934         the header file, and make it static.
5935
5936 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
5937
5938         * loader.c: Add missing setup_... call.
5939
5940         * class.c: Add missing setup_... calls.
5941
5942         * class.c (mono_class_init): Switch on lazy initialization of 
5943         the generic vtable.
5944         
5945         * class.c (mono_class_init): Fix generics broken by the recent changes.
5946
5947         * monodiet.c (handle_type): Add missing setup_... calls.
5948
5949         * class.c: Back out garbage in previous patch.
5950         
5951         * class.c: Add missing setup_... calls.
5952
5953         * class.c (mono_class_get_method_from_name_flags): Avoid calling
5954         mono_class_setup_methods () if possible.
5955
5956         * class-internals.h (MonoClass): Add 'has_cctor' flag.
5957
5958         * class-internals.h (MonoCachedClassInfo): New structure.
5959
5960         * class.c: Initialize properties and events fields of MonoClass lazily.
5961
5962         * class.c: Add infrastructure for lazily initializing the methods and
5963         vtable fields of MonoClass. Not yet used.
5964
5965         * class.c (mono_class_get_finalizer): New helper function.
5966
5967         * class.c: Add infrastructure for loading some class related data from
5968         an AOT file.
5969
5970         * object.c: Add infrastructure for initializing the vtable from data
5971         in the AOT file.
5972
5973         * gc.c (run_finalize): Use mono_class_get_finalizer ().
5974
5975         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5976         appropriate initialization function before accessing parts of the
5977         MonoClass structure.
5978
5979         * marshal.c: Fix warnings.
5980         
5981         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5982
5983         * mono-debug-debugger.c (get_exception_message): Use 
5984         mono_class_get_method_from_name_flags ().
5985
5986 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
5987
5988         * reflection.c, appdomain.c: Replace a few manual searches that
5989         Zoltan missed. (Paolo approved this part of my initial patch).
5990
5991 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5992
5993         * profiler.c: disable recording statistical events at report time.
5994
5995 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5996
5997         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5998         to byteswap arrays of enum values, too (bug #72080).
5999
6000 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
6001
6002         * appdomain.c (set_domain_search_path): Allow this to be called if
6003         domain->setup is not yet set.
6004
6005         * loader.c (mono_method_get_index): New helper function.
6006
6007         * loader.c reflection.c: Use mono_method_get_index ().
6008
6009         * class.c (mono_class_get_method_from_name_flags): New helper method.
6010
6011         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
6012         this.
6013
6014         * class.c (mono_class_get_cctor): New helper method.
6015
6016         * string-icalls.c object.c class.c marshal.c reflection.c: Use
6017         mono_class_get_method () to look up methods.
6018
6019 2005-02-01  Miguel de Icaza  <miguel@novell.com>
6020
6021         * console-io.c: Fix the build, this should work on Windows.
6022
6023 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
6024
6025         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
6026         be set to null to keep things valid
6027
6028 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6029
6030         * icall.c: added Console 2.0 icalls.
6031         * Makefile.am: added console-io.[ch]
6032         * console-io.[ch]: internal calls for Console 2.0 API.
6033
6034 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6035
6036         * class.c: make sure we consider all the interfaces
6037         when calculating max_interface_id (bug found by
6038         Jeroen Frijters running ikvm).
6039
6040 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
6041
6042         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
6043         valuetype fields to null.
6044
6045         * object.c (set_value): Ditto. Fixes #71669.    
6046
6047 2005-01-31  Martin Baulig  <martin@ximian.com>
6048
6049         * metadata.c (mono_metadata_has_generic_params): New public
6050         function; checks whether something is a generic method.
6051
6052 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6053
6054         * appdomain.c: fix infinite recursion when adding assemblies.
6055
6056 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
6057
6058         * object.c: Fix small typo to return all items for Environment.
6059         GetCommandLineArgs.
6060
6061 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6062
6063         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
6064         reflection.c: more domain and assembly-unload related fixes
6065         and memory leaks plugs.
6066
6067 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
6068
6069         * 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.
6070
6071 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
6072
6073         * loader.c (mono_method_signature): Make this method lazy
6074         (mono_get_method_from_token): Don't computate the signature here.
6075
6076         Doing this saves quite a bit of memory. I got 90 kb on starting up
6077         monodoc. It should also save some disk reads on startup.
6078
6079         * *: MonoMethod->signature might be NULL now. You *MUST* use
6080         mono_method_signature.
6081
6082 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
6083
6084         * object.c (mono_runtime_get_main_args): Return an array from the
6085         current domain here. Fixes #71938.
6086
6087 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
6088
6089         * monitor.c: formatting changes to comply with the
6090         mono coding style and remove #ifdefs from the code.
6091
6092 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6093
6094         * metadata.c, private.h: remove some unneeded data
6095         and use a more compact representation for table schemas.
6096
6097 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
6098
6099         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
6100         to get a better distribution in hash tables.
6101         * *.c: use mono_aligned_addr_hash() where appropriate.
6102         * assembly.c: make var static.
6103
6104 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
6105
6106         * domain-internals.h: Put MonoJitInfo on a diet.
6107
6108         * domain.c: Fix a warning.
6109
6110 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6111
6112         * gc.c: rework the gc handles code to reuse handles
6113         when freed.
6114
6115 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6116
6117         * domain.c: fixed long standing bug in mono_string_equal() which
6118         was brought to light with the ldstr changes.
6119
6120 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
6121
6122         * reflection.c: Remove warning by adding missing include for marshal.h
6123
6124 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6125
6126         * domain.c, object.c: change the ldstr_table to hold
6127         MonoString* as keys: makes the runtime isinterned lookup
6128         faster and simplifies memory management.
6129
6130 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
6131  
6132         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
6133         possible to add imperative security checks before calling the icall.
6134         * reflection.c: Return security attributes on the original MonoMethod
6135         (and not the wrapped one). This fix permissions on icalls.
6136
6137 2005-01-25  Dick Porter  <dick@ximian.com>
6138
6139         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6140         the check for mktime() support actually test the mktime() return
6141         value.  "Fixes" bug 71682, though the output is still different to
6142         MS.
6143
6144 2005-01-25  Martin Baulig  <martin@ximian.com>
6145
6146         * class.c (mono_class_is_assignable_from): Make this work for
6147         generic instances.
6148
6149 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
6150
6151         * marshal.c (mono_string_utf8_to_builder)
6152         (mono_string_builder_to_utf16): We might not have ownership of the
6153         string. In thise case, we need to create a new buffer.
6154
6155         * object-internals.h (mono_stringbuilder_capacity): sb->str might
6156         be null, in which case, use the default capacity.
6157
6158 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6159
6160         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6161         GC events to the profiler.
6162
6163 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6164
6165         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6166         if you don't want the GC to run.
6167
6168 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6169
6170         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6171         start providing a GC API and keeping different implementations in
6172         their own file.
6173         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6174
6175 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
6176
6177         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6178         mmap rather than allocating a huge buffer.
6179         (mono_debug_close_mono_symbol_file): Free the buffer allocated
6180         above.
6181
6182 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
6183
6184         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6185         and CheckExecutionRights.
6186         * reflection.c|h: Keep the index of the declarative security to be 
6187         used, instead of the pointer, when AOT compiler is used. Also add 
6188         class initialization when requesting demands.
6189         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6190         CheckExecutionRights. Both properties are now FALSE by default, and
6191         unmodifiable, unless the --security option is used.
6192
6193 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6194
6195         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6196         reflection.c: properly refcount images and assemblies, many leaks fixed.
6197
6198 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6199
6200         * threadpool.c: increase the timeout for threads in the thread pool to
6201         10s.  Fixes bug #67159.
6202
6203 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
6204
6205         * class-internals.h: Sun's compiler insists on explicit
6206         signed on bit fields to handle then correctly.
6207
6208 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
6209
6210         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6211         Make the size of the array fit only the number of invalid path
6212         chars that we have.
6213
6214         * class.c (_mono_class_get): Improve the error reporting when a
6215         class referenced is not found, to assist debugging. 
6216
6217 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6218
6219         * threads.c: fix off-by-one error.
6220         * domain.c: free data allocated in the domain.
6221
6222 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6223
6224         * reflection.c (mono_method_body_get_object): Fill out exception info
6225         as well.
6226
6227         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
6228         structure.
6229         
6230 2005-01-19  Martin Baulig  <martin@ximian.com>
6231
6232         * loader.c (mono_get_method_constrained): Make this work again.
6233
6234 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6235
6236         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
6237         guint16 to match the managed side.
6238
6239         * reflection.c (mono_reflection_body_get_object): Fill out local
6240         variables array.
6241
6242         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6243         as well.
6244
6245         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6246         'local_var_sig_token'.
6247
6248 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
6249
6250         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
6251         System.Drawing.
6252
6253         * reflection.c (mono_method_body_get_object): Handle abstract and
6254         runtime methods.
6255
6256 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6257
6258         * marshal.c, loader.c, class-internals.h, reflection.c:
6259         store the emthod data for a wrapper in an array instead of a list.
6260
6261 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6262
6263         * marshal.c: change the code to allocate memory more
6264         conservatively for method wrappers.
6265
6266 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6267
6268         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6269         fields from MonoClass to the marshal info structure where they belong.
6270
6271 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6272
6273         * class.c, object.c, class-internals.h, marshal.c: rearrange
6274         some fields and tweak some types to lower memory usage.
6275
6276 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
6277
6278         * threads.c (signal_thread_state_change): Handle the case when the
6279         target thread is the current thread.
6280
6281         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6282
6283         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
6284         emit_ptr_to_object_conv. 
6285
6286         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6287         marshalling. Fixes #71352.
6288
6289 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6290
6291         * metadata.h, blob.h: move table enum to blob.h so it can be included
6292         in any header.
6293         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6294         cut the size of MonoImage/MonoDynamicImage.
6295
6296 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
6297
6298         * profiler.c (mono_profiler_install_simple): Fix default arguments.
6299
6300 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6301
6302         * reflection.c, reflection.h, icall.c: add a function to check
6303         if an attribute type is defined for a metadata object.
6304
6305 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
6306
6307         * object-internals.h: Added some needed fields from StringBuilder class.
6308         * marshal.c: Set the maxCapacity when creating a StringBuilder.
6309
6310 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
6311
6312         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6313         threads before shutting down the runtime.
6314
6315         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6316
6317 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6318
6319         * object-internal.h, threads.c: implement stacksize and 
6320         parameterized thread start functionality (requires
6321         matching corlib). Marked broken code for later removal.
6322
6323 2005-01-12  Martin Baulig  <martin@ximian.com>
6324
6325         * class-internals.h (MonoGenericClass): Moved the `initialized'
6326         flag to MonoDynamicGenericClass, removed `init_pending'.
6327         (MonoGenericInst): Added `is_reference' flag.
6328
6329 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
6330
6331         * reflection.c (mono_image_create_pefile): Only set the pe_offset
6332         inside the MSDOS header. Fixes #71201.
6333
6334         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6335         gc thread.
6336         (mono_domain_finalize): Ditto.
6337
6338 2005-01-12  Martin Baulig  <martin@ximian.com>
6339
6340         * class.c (mono_get_shared_generic_class): Use the cache for
6341         non-dynamic generic classes.
6342
6343         * class-internals.h (mono_class_create_generic_2): Removed
6344         function prototype, this function is now static inside class.c.
6345
6346         * class.c (mono_class_create_generic_2): Made this static, only
6347         call it from mono_class_init() and mono_class_setup_parent().
6348         (collect_implemented_interfaces_aux): Call mono_class_init() on
6349         the interfaces we collect.
6350         (mono_class_setup_vtable): Call mono_class_init (class->parent).
6351
6352 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6353
6354         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6355         it a real thread handle.
6356
6357         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
6358         MonoJitExceptionInfo, since each catch clause needs its own variable.
6359         
6360 2005-01-11  Dick Porter  <dick@ximian.com>
6361
6362         * image.c (mono_pe_file_open): New variant on mono_image_open()
6363         that does not set up the CLI metadata; used for FileVersionInfo so
6364         it can get the data for windows binaries too.
6365         
6366         * process.c (process_read_string_block): Don't read off the end of
6367         the StringTable block.
6368
6369         These both fix bug 70766.
6370
6371 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6372
6373         * gc.c: set some fields to NULL at GC cleanup time.
6374         * threads.c: if we quit the main thread, call exit ().
6375
6376 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6377
6378         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6379
6380 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6381
6382         * threads.h, threads.c, object.c: added accessor and settor for
6383         main_thread. Handle it specially when exiting from it: wait
6384         for other foreground threads to exit.
6385
6386 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6387
6388         * process.c, verify.c: remove some bloat.
6389
6390 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
6391
6392         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6393         the calling convention to cdecl under win32.
6394
6395 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
6396
6397         * object.c (mono_object_get_size): New function to get the size of
6398         an object instance.
6399
6400         * profiler.c (simple_allocation): Use above.
6401
6402 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
6403
6404         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6405         ves_icall_System_AppDomain_getRootDomain (as it's not required to
6406         get an appdomain by it's id and we can't assume the root's id is 0).
6407         * domain-internals.h: Change the function prototype to match.
6408         * icall.c: Change the icall table for AppDomain.
6409
6410 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
6411
6412         * locales.c (string_invariant_compare_char): Only compute
6413         GUnicodeTypes in the case where we need them.  Test for ordinality
6414         first and return if so.
6415
6416         From the commit:
6417
6418                 /*
6419                  * FIXME: here we must use the information from c1type and c2type
6420                  * to find out the proper collation, even on the InvariantCulture, the
6421                  * sorting is not done by computing the unicode values, but their
6422                  * actual sort order.
6423                  */
6424
6425 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6426
6427         * loader.c: for P/Invoke methods, allow the "Internal" shared
6428         library name to refer to the calling process symbol namespace.
6429
6430 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
6431
6432         * Makefile.am: Add the security manager to the build.
6433         * security-manager.c|h: New. Initialization of the security manager.
6434
6435 2005-01-07  Dick Porter  <dick@ximian.com>
6436
6437         * threads.c: 
6438         * monitor.c: Update thread state during Monitor and WaitHandle
6439         waits.  Fixes bug 71031.
6440
6441 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
6442
6443         * reflection.c (property_encode_signature): Correctly handle when the
6444         property has no methods.
6445
6446 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
6447
6448         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6449         
6450         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6451         fields from mb, not rmb. Fixes #71017.
6452
6453         * marshal.c (emit_ptr_to_str_conv): Add support for 
6454         ByValTStr -> string conversion. Fixes #71015.
6455
6456         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6457
6458         * mempool.c (mono_mempool_contains_addr): New helper function.
6459
6460 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6461
6462         * metadata.c (mono_metadata_compute_size): Fix size calculation of
6463         HasSematics encoded fields.
6464         
6465         * metadata.c (mono_type_to_unmanaged): Improve error message for 
6466         invalid string marshalling.
6467
6468         * metadata.c: Fix warnings.
6469         
6470 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6471
6472         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6473         profiler support.
6474
6475 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6476
6477         * domain.c object.c domain-internals.h: Revert part of r38077 since the
6478         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6479         tests.
6480
6481 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
6482
6483         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6484         so methods containing these can be AOTed.
6485
6486 2005-01-03  Martin Baulig  <martin@ximian.com>
6487
6488         * loader.c (find_method): Removed the hack for generic instances.
6489         (method_from_memberref): If our parent is a generic instance, pass
6490         its generic type definition to find_method() and then inflate the
6491         method.
6492         (mono_get_method_constrained): Pass the generic type definition to
6493         find_method() and inflate the method later.
6494
6495         * class-internals.h (MonoStats): Added `generic_class_count'.
6496
6497         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6498         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6499
6500         * reflection.c (mono_custom_attrs_from_params): Don't ignore
6501         generic type definitions.
6502
6503 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
6504
6505         * loader.c icall.c: Fix warnings.
6506
6507 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
6508
6509         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6510         blittable types. Fixes #70864.
6511
6512 2004-12-29  Martin Baulig  <martin@ximian.com>
6513
6514         * icall.c
6515         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6516
6517         * reflection.c (mono_method_get_object): Create a
6518         "System.Reflection.MonoGenericMethod" for inflated methods; don't
6519         call mono_get_inflated_method().
6520
6521         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6522
6523 2004-12-27  Martin Baulig  <martin@ximian.com>
6524
6525         * class-internals.h (MonoMethod): Added `is_inflated' flag.
6526         (MonoMethodInflated): Added `inflated' field.
6527
6528         * class.c (mono_class_inflate_generic_method): Don't really
6529         inflate the method here; just set the `is_inflated' flag in the
6530         MonoMethod.
6531         (mono_class_get_inflated_method): Actually inflate the method here
6532         if it's not already inflated; we use the MonoMethodInflated's new
6533         `inflated' field as a cache.
6534
6535 2004-12-26  Martin Baulig  <martin@ximian.com>
6536
6537         * class.c
6538         (inflate_generic_class): Moved some code out of inflate_generic_type().
6539         (mono_class_inflate_generic_method): If we're already inflated,
6540         inflate the context and use the declaring method; ie. make sure
6541         the declaring method of an inflated method is always the generic
6542         method definition.
6543         (mono_class_create_from_typedef): Create
6544         `class->generic_container->context->gclass'.
6545
6546 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
6547
6548         * metadata-internals.h, marshal.c, reflection.c: More
6549         MonoGHashTable->GHashTable.
6550
6551         * domain-internals.h, class.c: Change MonoGHashTable's into
6552         GHashTables for some cases where no gc stuff is used
6553
6554         All users: update apis
6555
6556 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
6557
6558         * metadata.c (builtin_types): Make this `const'. Makes this get
6559         put into the shareable section.
6560         (mono_metadata_init): Casts to make gcc happy.
6561
6562 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
6563
6564         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6565
6566 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
6567
6568         * icall.c: Added an internal call to retrieve the position and length
6569         of assembly-level declarative security attributes (RequestMinimum, 
6570         RequestOptional and RequestRefuse). This is used by the Assembly class
6571         to re-create the corresponding permission sets.
6572
6573 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6574
6575         * marshal.c: fix the stelemref wrapper to be type correct
6576         (and faster).
6577
6578 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6579
6580         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6581         to do key & 0x7fffffff. Hashtable already does this. It just
6582         results in longer code.
6583
6584 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
6585
6586         * appdomain.c: Bump corlib version.
6587         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6588         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6589         * reflection.c|h: Add functions to get declarative security infos
6590         (blob position and length) for assemblies, classes and methods.
6591
6592 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6593
6594         * reflection.c: sort the constant table (bug #70693).
6595
6596 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6597
6598         * object-internals.h, threads.c, domain.c: add accessors for
6599         the MonoThread and MonoDomain tls keys.
6600
6601 2004-12-18  Martin Baulig  <martin@ximian.com>
6602
6603         * class.c (inflate_generic_type): If we're inflating a generic
6604         instance, set `ngclass->context->container = context->container';
6605         ie. the container we inflated into.
6606
6607         * metadata.c (mono_metadata_parse_generic_param): Reflect above
6608         inflate_generic_type() changes.
6609
6610 2004-12-17  Martin Baulig  <martin@ximian.com>
6611
6612         * class-internals.h
6613         (MonoGenericClass): Replaced `MonoType *generic_type' with
6614         `MonoClass *generic_class'.  Removed `dynamic_info'; if
6615         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6616         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6617
6618 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
6619
6620         * exception.c (mono_exception_from_token): New helper function.
6621
6622 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
6623
6624         * assembly.c (mono_assembly_load_with_partial_name): Call 
6625         mono_assembly_loaded before invoking the preload hooks. Fixes
6626         #70564.
6627
6628         * object-internals.h (MonoThread): Change culture_info and 
6629         ui_culture_info into an array.
6630
6631         * threads.c: Cache culture info objects from more than one appdomain.
6632
6633         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
6634         current UI culture.
6635
6636 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
6637
6638         * threads.h threads.c appdomain.c: Clear the culture_info field of
6639         all threads during unloading if they point to an object in the dying
6640         appdomain.
6641
6642 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
6643
6644         * culture-info.h (TextInfoEntry): New struct
6645         * object-internals.h: sync with managed
6646         * locales.c: fill the `text_info_data' field
6647         * culture-info-tables.h: update
6648
6649 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6650
6651         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6652         collector.
6653
6654 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
6655
6656         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6657         (ves_icall_ModuleBuilder_getMethodToken): Ditto
6658
6659 2004-12-12  Martin Baulig  <martin@ximian.com>
6660
6661         * mono-debug-debugger.c (write_type): If we're an enum and the
6662         builtin types have already been initialized, call mono_class_init().
6663
6664 2004-12-11  Martin Baulig  <martin@ximian.com>
6665
6666         * metadata.c (mono_metadata_load_generic_params): Added
6667         `MonoGenericContainer *parent_container' argument; automatically
6668         compute `container->is_method'; pass the correct owner to
6669         get_constraints().      
6670
6671         * reflection.c (compare_genericparam): Sort the GenericParam table
6672         according to increasing owners. 
6673
6674 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6675
6676         * profiler.c: allow disabling the default profiler.
6677
6678 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6679
6680         * decimal.c, icall.c: allow disabling System.Decimal support.
6681
6682 2004-12-09  Marek Safar <marek.safar@seznam.cz>
6683
6684         * reflection.c: Add support for null attribute arguments.
6685
6686 2004-12-09  Martin Baulig  <martin@ximian.com>
6687
6688         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6689         names to get rid of compiler warnings.
6690
6691 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6692
6693         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
6694         mono_marshal_load_type_info (). Fixes #69625.
6695         (mono_marshal_get_ptr_to_struct): Likewise.
6696
6697 2004-12-08  Martin Baulig  <martin@ximian.com>
6698
6699         * mono-debug.h: Bumped version number to 47.
6700
6701         * mono-debug-debugger.c
6702         (mono_debugger_event_handler, mono_debugger_event): Take two
6703         guint64 arguments insteed of a gpointer and a guint32.  
6704
6705 2004-12-08  Martin Baulig  <martin@ximian.com>
6706
6707         * debug-mono-symfile.h
6708         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6709         `address' to `native_offset'.
6710
6711 2004-12-08  Martin Baulig  <martin@ximian.com>
6712
6713         * class.c (mono_class_create_from_typespec): Only inflate if we
6714         either have `context->gclass' or `context->gmethod'.
6715
6716 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
6717
6718         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6719
6720         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6721
6722         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6723
6724         * reflection.c (mono_assembly_get_object): Remove the workaround put
6725         in for the release.
6726         
6727         * appdomain.c: Use the corlib_internal field from MonoAssembly.
6728
6729         * appdomain.c: Bump corlib version.
6730
6731         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6732         be visible in other appdomains.
6733
6734 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
6735
6736         * threads.c: Interlocked inc and dec for longs were messed up,
6737         use a KISS based impl for this. Fixes 70234
6738
6739 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
6740
6741         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6742
6743 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6744
6745         * icall.c: fix to follow policy not to allow struct
6746         arguments in icalls.
6747
6748 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6749
6750         * process.c: make the patch that handles spaces in file paths work
6751         on mono/windows too.
6752
6753 2004-12-06  Martin Baulig  <martin@ximian.com>
6754
6755         * class.c (mono_class_create_generic): Call
6756         mono_class_setup_supertypes() if we're dynamic.
6757         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6758
6759 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
6760
6761         * object-internals.h: Add new fields to MonoThread.
6762
6763         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6764
6765         * icall.c threads-types.h threads.c: Add new icalls.
6766
6767         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6768
6769         * object-internals.h (MonoReflectionAssembly): Sync object layout with
6770         managed side.
6771
6772         * appdomain.c: Bump corlib version.
6773
6774         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6775         internal assemblies. Fixes #69181.
6776
6777 2004-12-05  Martin Baulig  <martin@ximian.com>
6778
6779         * class.c (mono_class_inflate_generic_signature): Make this a
6780         no-op if `context' is NULL or we don't have any type parameters;
6781         also copy `sentinelpos'.        
6782
6783 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
6784
6785         * image.c: Add unbox_wrapper_cache.
6786
6787         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6788
6789         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6790         function generator.
6791         
6792         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6793         Fixes #70173.
6794
6795         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6796         
6797 2004-12-04  Martin Baulig  <martin@ximian.com>
6798
6799         * loader.c (mono_method_get_signature_full): New public function;
6800         like mono_method_get_signature(), but with an additional
6801         `MonoGenericContext *' argument.
6802
6803         * class.c (mono_class_inflate_generic_signature): Formerly known
6804         as inflate_generic_signature(); make this public.
6805
6806 2004-12-04  Martin Baulig  <martin@ximian.com>
6807
6808         * metadata.c
6809         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6810         instead of a `MonoGenericContainer *'.  
6811         (mono_metadata_parse_array_full): Likewise.
6812         (mono_metadata_parse_signature_full): Likewise.
6813         (mono_metadata_parse_method_signature_full): Likewise.
6814         (mono_metadata_parse_generic_inst): Likewise.
6815         (mono_metadata_parse_generic_param): Likewise.
6816         (mono_metadata_parse_mh_full): Likewise.
6817         (mono_type_create_from_typespec_full): Likewise.
6818
6819 2004-12-03  Martin Baulig  <martin@ximian.com>
6820
6821         * class-internals.h (MonoGenericContainer): Replaced the
6822         `MonoGenericContext * pointer with a `MonoGenericContext'
6823         structure and made it the first element.
6824
6825 2004-12-03  Martin Baulig  <martin@ximian.com>
6826
6827         * class.c
6828         (inflate_generic_type): Set the `context->container' when creating
6829         a new MonoGenericContext.
6830         (mono_class_inflate_generic_method): Likewise.
6831         (mono_class_create_from_typespec): Just use `context->container'
6832         to get the container.
6833
6834         * loader.c (method_from_methodspec): Set `context->parent' from
6835         `context->container' - and if that's a method container, use its
6836         parent.  Also set the `context->container' when creating a new
6837         MonoGenericContext.
6838         (mono_get_method_from_token): Use just `context->container' to get
6839         the container.
6840
6841         * metadata.c (do_mono_metadata_parse_generic_class): Also set
6842         `gclass->context->container'.
6843
6844         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6845         the `context->container' when creating a new MonoGenericContext.
6846
6847 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
6848
6849         * reflection.c (compare_genericparam): Sort params with identical
6850         owner by their number. Fixes gen-111 on sparc.
6851
6852 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6853
6854         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6855         around the domain changes.
6856
6857         * appdomain.c (mono_domain_unload): Handle the case when the thread
6858         calling Unload is itself being aborted during unloading. Fixes #70022.
6859
6860         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6861
6862         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
6863         checkpoint_func as an icall so it gets a wrapper.
6864         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6865         in the cross-appdomain wrappers too.
6866
6867         * threads.c (mono_thread_has_appdomain_ref): Make this public.
6868
6869         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6870
6871         * reflection.c: Fix some memory leaks.
6872         
6873 2004-12-02  Martin Baulig  <martin@ximian.com>
6874
6875         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6876
6877         * metadata.c (generic_class_cache): New static hashtable.
6878         (mono_metadata_lookup_generic_class): New public method.
6879
6880 2004-12-02  Martin Baulig  <martin@ximian.com>
6881
6882         * class.c (mono_class_create_from_typedef): Call
6883         mono_class_setup_parent() and mono_class_create_mono_type() before
6884         parsing the interfaces.
6885
6886 2004-12-02  Martin Baulig  <martin@ximian.com>
6887
6888         * metadata.c (generic_inst_cache): New static hashtable.
6889         (mono_metadata_lookup_generic_inst): New public function.
6890         (mono_metadata_inflate_generic_inst): New public function.
6891         (mono_metadata_parse_generic_inst): New public function.
6892         (do_mono_metadata_parse_generic_class): Use the new
6893         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6894         since this'll also use the cache.
6895
6896         * reflection.c (mono_reflection_bind_generic_method_parameters):
6897         Use mono_metadata_lookup_generic_inst() to use the new cache.
6898
6899         * class.c (inflate_mono_type): Use
6900         mono_metadata_inflate_generic_inst() to inflate a generic
6901         instance; this'll also use the new cache.
6902
6903         * loader.c (method_from_methodspec): Use
6904         mono_metadata_parse_generic_inst() and
6905         mono_metadata_inflate_generic_inst() rather than parsing it
6906         manually, so we can use the new cache.
6907
6908 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
6909
6910         * threads.c (wait_for_tids): Do not incorrectly free threads when 
6911         the wait times out.
6912
6913 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6914
6915         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6916         iter->args based on whether parameters are passed in registers (i.e.
6917         MONO_ARCH_REGPARMS is defined)
6918
6919 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
6920
6921         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6922         the exception message. Fixes #70070.
6923         (method_from_methodspec): Fix warnings.
6924
6925 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6926
6927         * process.c: (complete_path) return the path quoted
6928
6929 2004-12-01  Martin Baulig  <martin@ximian.com>
6930
6931         * class-internals.h (MonoGenericInst): New structure.
6932         (MonoGenericClass): Replaced `type_argc', `type_argv' and
6933         `is_open' with `MonoGenericInst *inst'.
6934         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6935         `is_open' with `MonoGenericInst *inst'.
6936
6937 2004-11-30  Martin Baulig  <martin@ximian.com>
6938
6939         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6940
6941         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6942         to `generic_class_cache'.
6943
6944         * metadata.c
6945         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6946         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6947         (mono_generic_inst_is_valuetype): Renamed to
6948         mono_generic_class_is_valuetype().
6949
6950         * class-internals.h
6951         (MonoGenericInst): Renamed to MonoGenericClass.
6952         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6953         (MonoClass): Renamed `generic_inst' to `generic_class'.
6954         (MonoGenericContext): Renamed `ginst' to `gclass'.
6955
6956         * object-internals.h
6957         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6958
6959         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6960         mono_reflection_generic_class_initialize().
6961
6962         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6963         now known as "System.Reflection.MonoGenericClass".
6964         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6965
6966 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
6967
6968         * class-internals.h: Added a flag field to MonoClass to cache the
6969         declarative security attributes actions associated with the class.
6970         * domain-internals.h: Added booleans to MonoJitInfo to cache the
6971         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6972         applicable to the JITted method.
6973         * reflection.c|h: Added functions to extract (as flags) which security
6974         actions are available (declaratively) for a method, class or assembly.
6975         * metadata.c|h: Added functions to search the declarative security
6976         table in the metadata.
6977         
6978 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
6979
6980         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6981         EXPORTEDTYPES are already in the class name cache, so there is no
6982         need to add extra code here to look at them. Just removes a bit of
6983         cruft.
6984
6985         (ves_icall_System_Environment_get_TickCount): No need for #if
6986         WINDOWS. We already have the code in io-layer.
6987
6988 2004-11-28  Martin Baulig  <martin@ximian.com>
6989
6990         * loader.c
6991         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6992         Fixes gen-112.cs.
6993
6994 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
6995
6996         * assembly.c (do_mono_assembly_open): Instead of having a
6997         conditional WITH_BUNDLE, incorporate support for bundles here, by
6998         having a global `bundles' variable holding a pointer to the actual
6999         bundles. 
7000
7001         (mono_register_bundled_assemblies): New API call used by the
7002         bundle code. 
7003
7004         See mkbundle.1 for details.
7005         
7006 2004-11-27  Martin Baulig  <martin@ximian.com>
7007
7008         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
7009         the vtable for generic methods.
7010
7011 2004-11-26  Martin Baulig  <martin@ximian.com>
7012
7013         * metadata.c
7014         (mono_metadata_generic_method_hash): New public function.
7015         (mono_metadata_generic_method_equal): Likewise.
7016
7017         * class-internals.h
7018         (MonoGenericContainer): Added `GHashTable *method_hash'.
7019
7020         * reflection.c (ReflectionMethodBuilder): Added
7021         `MonoGenericContainer *generic_container'.
7022         (reflection_methodbuilder_to_mono_method): Don't create a new
7023         MonoGenericContainer each time we're called.
7024         (mono_reflection_bind_generic_method_parameters): Use
7025         `container->method_hash' to cache the results so we don't create a
7026         different method if we're called several times with the same
7027         arguments.
7028
7029         * loader.c (method_from_methodspec): Use the new
7030         `container->method_hash' here, too.
7031
7032 2004-11-26  Martin Baulig  <martin@ximian.com>
7033
7034         * class.c (inflate_generic_signature): Correctly compute
7035         `res->has_type_parameters'.
7036         (mono_class_vtable): Use the `has_type_parameters' flag to
7037         determine whether we're a generic method.
7038
7039         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
7040
7041 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
7042
7043         * object.c (mono_runtime_run_main): Fix a small memory leak.
7044
7045 2004-11-25  Martin Baulig  <martin@ximian.com>
7046
7047         * class.c (set_generic_param_owner): Fixed the loop.
7048
7049 2004-11-25  Martin Baulig  <martin@ximian.com>
7050
7051         * object.c (mono_class_vtable): Don't create any JIT wrappers for
7052         generic methods.
7053
7054 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
7055
7056         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
7057         names. Fixes #69787.
7058
7059 2004-11-24  Martin Baulig  <martin@ximian.com>
7060
7061         * class.c (mono_class_create_generic_2): If we don't have a
7062         `ginst->parent', inflate `gklass->parent' to get our parent.
7063
7064 2004-11-24  Martin Baulig  <martin@ximian.com>
7065
7066         * reflection.c (compare_genericparam): Correctly sort the
7067         GenericParam table; fixes #69779.
7068
7069 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
7070
7071         * reflection.c: When writing a PE file, don't create a huge
7072         buffer in memory. Just write the arrays we have to the file.
7073         This reduces memory usage.
7074
7075         * metadata-internals.h: MonoDynamicStream pefile is no longer used
7076         globally.
7077
7078 2004-11-17  Martin Baulig  <martin@ximian.com>
7079
7080         * class.c (mono_class_init): Don't setup `class->parent' for
7081         dynamic instances; moved this to mono_class_generic_2().
7082         (mono_class_create_generic): Also set `klass->inited' for dynamic
7083         generic instances.
7084         (mono_class_create_generic_2): Don't do anything for dynamic
7085         generic instances.  Set `klass->parent' here and also call
7086         mono_class_setup_parent() here. 
7087
7088         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
7089         `MonoType *parent' argument; set `ginst->parent' before calling
7090         mono_class_create_generic_2(), so we set the correct parent.
7091
7092 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
7093
7094         * reflection.c: allow getting attributes from ModuleBuilder
7095         (used by ikvm).
7096
7097 2004-11-17  Martin Baulig  <martin@ximian.com>
7098
7099         * class.c (mono_class_create_from_typedef): If a type parameter is
7100         inherited from an outer class, set its owner to that class.
7101
7102 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
7103
7104         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
7105           for (int*) written size. This fixes bug #69592.
7106
7107 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
7108
7109         * icall.c: Added IsAuthenticodePresnet internal call.
7110         * image.c|h: New function that check a MonoImage for an Authenticode
7111         signature in the certificate PE data directory.
7112         * security.c|h: New internal call to ask the runtime if an 
7113         Authenticode signature seems referenced in the PE header.
7114
7115 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
7116
7117         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
7118
7119         * reflection.c (mono_image_create_pefile): Free the assembly streams
7120         after writing out the assembly file.
7121
7122         * object.c (mono_runtime_run_main): Fix small memory leak.
7123
7124         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
7125         property access modifiers. Fixes #69389.
7126
7127 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
7128
7129         * domain.c, object.c, object-internals.h, domain-internals.h,
7130         object.h, marshal.c: keep dynamic code info per domain.
7131
7132 2004-11-15  Martin Baulig  <martin@ximian.com>
7133
7134         * class.c (mono_type_get_name_recurse): Put type arguments in
7135         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
7136         see bug #68387.
7137
7138 2004-11-15  Martin Baulig  <martin@ximian.com>
7139
7140         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7141         (mono_class_setup_vtable): When computing `the_cname' for a
7142         generic instance, don't include the namespace since we'd otherwise
7143         add it twice.
7144
7145 2004-11-15  Martin Baulig  <martin@ximian.com>
7146
7147         * class.c (mono_class_create_generic): Changed return type to void.
7148         (mono_class_create_generic_2): New public function; setup
7149         `class->method', `class->field' and `class->interfaces' here
7150         instead of in mono_class_init().
7151
7152         * class.h (mono_class_create_generic): Moved to class-internals.h.
7153
7154 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
7155
7156         * reflection.c (mono_image_create_pefile): take a file HANDLE.
7157         rather than writing to memory, write to this file. Right now,
7158         we are just writting into a buffer, and copying that. However
7159         we can avoid the buffer later.
7160
7161         (mono_dynamic_stream_reset): new function
7162
7163         * icall.c, object-internals.h: update for the above.
7164
7165 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
7166
7167         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7168         have been using gc'd memory. First it is slower, unlikely
7169         the comment in the source code said, secondly, it increases
7170         our footprint to do it in the gc.
7171
7172         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7173         the method so that it does not have to copy to managed code.
7174
7175 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
7176
7177         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7178
7179 2004-11-12  Martin Baulig  <martin@localhost>
7180
7181         * reflection.c (mono_image_create_token): Allow generic method
7182         definitions here, since they may appear in an `.override'; see
7183         gen-98/gen-99 for an example.
7184
7185 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
7186
7187         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7188         #69365.
7189
7190         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7191         descriptive.
7192
7193 2004-11-11  Martin Baulig  <martin@ximian.com>
7194
7195         * class.c (mono_class_setup_vtable): In an explicit interface
7196         implementation, the method name now includes the arity.
7197
7198 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
7199
7200         * object.c (mono_array_full_copy): Fix warning.
7201
7202 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
7203
7204         * appdomain.c: Removed look_for_method_by_name(). Use the new method
7205         mono_class_get_method_from_name() instead.
7206         
7207         * class-internals.h: Added two new types of wrappers. 
7208         Added MonoRemotingTarget enum. Added new trampoline function type, which
7209         takes an additional MonoRemotingTarget value as parameter, so it is
7210         possible to request a trampoline for a specific target.
7211         
7212         * class.c: Added new mono_class_get_method_from_name() method.
7213         
7214         * class.h: In MonoRemoteClass, we can have now to vtables, one for
7215         general remoting sinks and one specific for cross domain calls.
7216         
7217         * debug-helpers.c: Added new wrapper names.
7218         
7219         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7220         of a remote class.
7221         
7222         * image.c: Porperly delete value objects form the remoting invoke hashtable.
7223         
7224         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7225         with several other methods (mono_marshal_get_xappdomain_dispatch,
7226         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7227         and others) can generate a fast remoting wrapper for cross domain calls.
7228         More information can be found in docs/remoting.
7229         Other changes: Removed mono_find_method_by_name, and used
7230         mono_class_get_method_from_name instead.
7231         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7232         is stored in the remoting invoke hashtable.
7233         
7234         * marshal.h: published the new method for getting the xdomain wrapper,
7235         and also added a method for getting the adequate wrapper for a given
7236         method and target.
7237         
7238         * object-internals.h, object.c: Added a couple of methods for capying and
7239         cloning arrays.
7240         Modified mono_install_remoting_trampoline, which takes the new remoting
7241         trampoline that has a remoting target as parameter.
7242         mono_class_proxy_vtable now also takes a remoting target as parameter, and
7243         will return the most suitable vtable for the target.
7244         Added mono_remote_class_vtable, which returns the vtable of a remote class
7245         (which can be the normal remoting vtable or the xdomain vtable).
7246         
7247         * threads.c: the xdomain invoke and dispatch wrappers must also be
7248         protected against interruptions.
7249
7250 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7251
7252         * icall.c: use memmove in BlockCopyInternal when the source and
7253         destination arrays are the same.
7254
7255 2004-11-09  Martin Baulig  <martin@ximian.com>
7256
7257         * class-internals.h (MonoGenericContainer): Removed `method' and
7258         `signature', replaced them with `is_method' and `is_signature'
7259         flags.  Added `context'.
7260
7261         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7262         instead of a `MonoGenericContainer *'.
7263
7264         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7265         for dynamic type parameters.
7266         (mono_metadata_load_generic_params): Setup `container->context'.
7267
7268         * reflection.c (mono_reflection_setup_generic_class): Setup
7269         `tb->generic_container->context'.
7270         (do_mono_reflection_bind_generic_parameters): Use
7271         mono_class_inflate_generic_type() to correctly inflate types,
7272         rather than using our own hack just for MONO_TYPE_VAR.
7273
7274 2004-11-09  Martin Baulig  <martin@ximian.com>
7275
7276         * class.c (mono_class_inflate_generic_method): Small fix; don't
7277         crash here.
7278
7279         * icall.c
7280         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7281         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7282         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7283         (ves_icall_Type_BindGenericParameters): Likewise.
7284         (ves_icall_Type_get_IsGenericInstance): Likewise.
7285         (ves_icall_Type_GetGenericParameterPosition): Likewise.
7286         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7287         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7288         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7289
7290 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
7291
7292         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7293         assembly versions and public key tokens. Fixes #69113.
7294
7295 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7296
7297         * metadata.c: fix bug introduced with the type cache changes
7298         on 2004-11-06.
7299
7300 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7301
7302         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7303         the MonoClass pointer instead of the token in exception clauses.
7304         * reflection.c: updates for the above and make the code not depend
7305         on the structure of MonoExceptionClause.
7306
7307 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
7308
7309         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7310         Add support for dynamic assemblies. Fixes #69114.
7311
7312         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7313
7314 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
7315
7316         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7317         since most only those methods use it. the code member of
7318         MonoMethodPInvoke was dead, so that can be removed too. Also,
7319         remove inline_count (again, not used), and move slot so that it
7320         can share bits with some other flags. This saves 8 bytes in the
7321         structure and gives us about 50 kb back for mcs helloworld.cs
7322
7323         * *.[ch]: Do naming changes for the above.
7324
7325         * loader.c (mono_method_get_header): Lazily init the header
7326         on first access.
7327         (mono_get_method_from_token): don't init the header here
7328         (mono_free_method): the header may never be allocated
7329
7330         Overall, this saves 150 kb of unmanaged allocations
7331         for mcs helloworld.cs. That accounts for 10% of the unmanaged
7332         memory at runtime.
7333         
7334         * loader.c, loader.h (mono_method_get_header): new accessor.
7335
7336         * *.[ch]: use the above method. Prepares us to lazily load
7337         the header.
7338
7339         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7340         three warnings, which are actual bugs (see 69206).
7341
7342         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7343         unused. Saves a cool 4 bytes / method.
7344
7345 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
7346
7347         * metadata.c (builtin_types): Add types for System.Object here.
7348         (mono_metadata_parse_type_full): Cache MonoType*'s that are
7349         for a class or valuetype from klass->this_arg or klass->byval_arg.
7350
7351         On mcs for a hello world, this gets us down from 21836 MonoType's
7352         to 14560.
7353
7354         (mono_metadata_free_type): Account for the above change.
7355
7356 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
7357
7358         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
7359         exception instead of asserting if name is null.
7360         (ves_icall_System_AppDomain_GetData): Ditto.
7361
7362 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
7363
7364         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7365         EnumBuilder.
7366
7367         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
7368         Return NULL when the domain does not have entry_assembly set.
7369
7370         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
7371         Add a 'resource_modules' argument.
7372         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7373
7374         * reflection.c (mono_reflection_create_runtime_class): Move setting
7375         of wastypebuilder here, so mono_get_type_object () returns a MonoType
7376         for enums too.
7377
7378         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7379         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7380         Throw an ArgumentNullException if 'ptr' is null.
7381
7382         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7383         assemblies here. Fixes #69020.
7384
7385 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
7386
7387         * reflection.c (build_compressed_metadata): Fix the previous patch for
7388         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
7389         the stack.
7390
7391 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
7392
7393         * assembly.c (mono_assembly_names_equal): Allow a match if one of
7394         the cultures is false. Fixes #69090.
7395
7396         * reflection.c (build_compressed_metadata): Fix invalid memory read 
7397         detected by valgrind.
7398         
7399         * reflection.c (mono_reflection_get_type): Avoid triggering a 
7400         TypeResolve multiple times for the same type. Fixes #65577.
7401
7402 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
7403
7404         * marshal.c: Avoid using ldftn to call managed functions. It is
7405         much slower than just a call.
7406
7407         * reflection.c (mono_module_get_object): free the basename we
7408         allocate here from glib.
7409         
7410         * reflection.c (ensure_runtime_vtable): make sure to free
7411         overrides.  Also, we were allocating an array of MonoMethod not an
7412         array of MonoMethod*.
7413
7414         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7415
7416         * image.c (mono_image_close): free image->guid here.
7417
7418 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
7419
7420         * reflection.c: Fix some spec conformance issues with the PE file
7421         structures so mcs compiled apps run on the Net 2.0 beta.
7422
7423 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
7424
7425         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
7426         Implement this. Fixes #67264.
7427
7428         * debug-helpers.h debug-helpers.c marshal.c: Move 
7429         mono_find_method_by_name to debug-helpers.c.
7430
7431 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
7432
7433         * object.c (mono_release_type_locks): type_initialization_hash is
7434         a GHashTable.
7435
7436         * reflection.c object.c object-internals.h: Fix warnings.
7437
7438         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7439         without accessors. Fixes #61561.
7440
7441         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7442         application base from the root domain if not set. Fixes #65641.
7443         (mono_runtime_init): Fix warning.
7444
7445 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7446
7447         * appdomain.c: call mono_thread_pool_init.
7448         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7449         of worker threads based on the number of CPUs and the environment
7450         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7451         for non-windows (windows) systems.
7452
7453 2004-10-27  Chris Toshok  <toshok@ximian.com>
7454
7455         * mono-debug-debugger.c (write_class): don't call mono_class_init
7456         here, as even with the check for (!klass->init_pending), we get
7457         into a situation where we're hitting cycles in class
7458         initialization.  Fixes #68816.
7459
7460 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
7461
7462         * image.c: Avoid overwriting values in the loaded_images_hash when an
7463         assembly is loaded multiple times. Fixes #61152.
7464
7465         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7466         so multiple satellite assemblies for the same name can be loaded.
7467         Fixes #68259.
7468
7469         * mono_domain_assembly_preload: Actually return the loaded assembly, 
7470         not NULL.
7471
7472         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7473         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7474
7475         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7476         pending finalizers are not invoked after the appdomain has been 
7477         unloaded. Fixes #67862.
7478
7479 2004-10-22  Martin Baulig  <martin@ximian.com>
7480
7481         * mono-debug-debugger.c
7482         (mono_debugger_runtime_invoke): Don't box valuetypes.
7483
7484 2004-10-22  Chris Toshok  <toshok@ximian.com>
7485
7486         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7487         don't hide private methods.
7488
7489 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
7490
7491         * icall.c: Allows the runtime to "share" (when known) the public key
7492         token of an assembly. This avoid the need to recalculate the token 
7493         (from the public key) in managed code.
7494
7495 2004-10-21  Chris Toshok  <toshok@ximian.com>
7496
7497         * debug-helpers.c (append_class_name): argh, revert last patch.
7498         
7499 2004-10-21  Chris Toshok  <toshok@ximian.com>
7500
7501         * debug-helpers.c (append_class_name): use '+' as the delimiter,
7502         not '/', so that it matches what the debugger uses to look up
7503         methods.
7504
7505 2004-10-21  Martin Baulig  <martin@ximian.com>
7506
7507         * mono-debug-debugger.c (mono_debugger_throw_exception): New
7508         public method; this is called each time an exception is thrown and
7509         allows the debugger to use exception catch points.
7510
7511 2004-10-21  Martin Baulig  <martin@ximian.com>
7512
7513         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7514         the stack pointer and the exception object in some struct and pass
7515         that to the debugger.
7516
7517 2004-10-21  Chris Toshok  <toshok@ximian.com>
7518
7519         * mono-debug-debugger.c (do_write_class): add instance/static
7520         event support.  We don't expose "raise" or "other" yet.
7521         (event_is_static): new method.
7522
7523 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
7524
7525         * mono-debug-debugger.c
7526         (mono_debugger_handle_exception): Remove
7527         bogus return value for fussy compilers.
7528
7529 2004-10-20  Martin Baulig  <martin@ximian.com>
7530
7531         * mono-debug-debugger.c
7532         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7533         (mono_debugger_handled_exception): Likewise.
7534
7535 2004-10-20  Martin Baulig  <martin@ximian.com>
7536
7537         * mono-debug-debugger.h (MonoDebuggerEvent): Added
7538         MONO_DEBUGGER_EVENT_EXCEPTION.
7539
7540         * mono-debug-debugger.c (mono_debugger_handle_exception): New
7541         public function to send the debugger a notification for an
7542         exception and inform it about a catch/finally clause.
7543
7544 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
7545
7546         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7547         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7548         fix 2.95 build. 
7549
7550         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7551
7552 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
7553
7554         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7555         marshalled as [In,Out]. Fixes #58325.
7556
7557 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
7558
7559         * reflection.c (mono_method_body_get_object): Implement some fields.
7560
7561 2004-10-12  Martin Baulig  <martin@ximian.com>
7562
7563         * reflection.c (mono_reflection_bind_generic_parameters): Small
7564         fix, correctly retrieve our parent from a generic instance.
7565
7566 2004-10-12  Martin Baulig  <martin@ximian.com>
7567
7568         * metadata.c (mono_metadata_generic_param_equal): We always have
7569         an owner.
7570
7571         * class.c
7572         (mono_class_from_generic_parameter): We need to have an owner.
7573         (my_mono_class_from_generic_parameter): Likewise.
7574
7575         * reflection.c (mono_reflection_setup_generic_class): Renamed to
7576         mono_reflection_create_generic_class() and added a new
7577         mono_reflection_setup_generic_class().  
7578         (mono_reflection_initialize_generic_param): If we're a nested
7579         generic type and inherited from the containing class, set our
7580         owner to the outer class.
7581
7582 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
7583
7584         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7585
7586         * reflection.c (mono_method_body_get_object): New function to create
7587         a MethodBody object.
7588
7589         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7590
7591 2004-10-11  Martin Baulig  <martin@ximian.com>
7592
7593         * metadata.c (_mono_metadata_type_equal): Renamed to
7594         do_mono_metadata_type_equal() and made static.
7595
7596 2004-10-11  Martin Baulig  <martin@ximian.com>
7597
7598         * appdomain.c: Bump corlib version number to 28.
7599
7600 2004-10-10  Martin Baulig  <martin@ximian.com>
7601
7602         * class-internals.h
7603         (MonoGenericInst): Added `MonoGenericContainer *container'.
7604         (MonoGenericMethod): Likewise.
7605         (MonoGenericContext): Likewise.
7606         (MonoGenericParam): Added `MonoGenericContainer *owner'.
7607
7608         * metadata.c
7609         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7610         (do_mono_metadata_parse_generic_inst): Likewise.
7611         (mono_metadata_parse_type_full): New public method.  This is the actual
7612         mono_metadata_parse_type() implementation - with an additional
7613         `MonoGenericContainer *' argument.
7614         (mono_metadata_parse_array_full): Likewise.
7615         (mono_metadata_parse_signature_full): Likewise.
7616         (mono_metadata_parse_method_signature_full): Likewise.
7617         (mono_metadata_parse_mh_full): Likewise.
7618         (mono_type_create_from_typespec): Likewise.
7619         (mono_metadata_interfaces_from_typedef_full): New public method;
7620         this is similar to the other _full() methods, but we take a
7621         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7622         (mono_metadata_parse_generic_param): Take an additional
7623         `MonoGenericContainer *' argument and lookup the MonoGenericParam
7624         from that container.
7625         (mono_metadata_generic_param_equal): New static method to compare
7626         two type parameters.
7627         (_mono_metadata_type_equal): New static method; takes an
7628         additional `gboolean signature_only' argument - if true, we don't
7629         compare the owners of generic parameters.
7630         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7631         with a TRUE argument - do a signature-only comparision.
7632
7633         * loader.c: Use the new _full() methods and pass the
7634         MonoGenericContainer to them.
7635
7636         * object-internals.h (MonoReflectionTypeBuilder): Added
7637         `MonoGenericContainer *generic_container' field.
7638         (MonoReflectionMethodBuilder): Likewise.
7639
7640 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
7641
7642         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7643         case initial images of dynamic assemblies.
7644
7645         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7646
7647         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7648
7649         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7650         length of event->other array.
7651         (typebuilder_setup_events): Ditto.
7652
7653         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7654         'assembly_by_name' and add an 'assemblies' list.
7655
7656         * assembly.h assembly.c: Add a new search hook for determining whenever
7657         an assembly is already loaded. Use this instead of searching in the
7658         loaded_assemblies list.
7659
7660         * domain.c appdomain.c: Implement the new search hook so loaded 
7661         assemblies are now scoped by appdomain. Fixes #67727.
7662
7663 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
7664
7665         * threads.c (mono_thread_attach): Initialize synch_lock field so
7666         mono_thread_detach works again.
7667
7668         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7669         'lib' too. Fixes #63130.
7670
7671 2004-10-06  Jackson Harper  <jackson@ximian.com>
7672
7673         * culture-info-tables.h: regenerated.
7674
7675 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
7676
7677         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
7678         implemented by other interfaces in the result. Fixes #65764.
7679         
7680         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7681         Handle unloadable modules without crashing.
7682
7683         * image.c (load_modules): Revert the previous patch since modules must
7684         have a fixed index inside the array.
7685         
7686         * image.c (load_modules): Don't include native modules in the modules
7687         array.
7688
7689 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
7690
7691         * reflection.h: Add param_defaults field.
7692
7693         * reflection.c: Add support for parameter defaults in dynamic methods.
7694         Fixes #64595.
7695
7696         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7697         an empty string when a type has no namespace. Fixes #64230.
7698
7699 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
7700
7701         * tabledefs.h: Added "internal" security actions to support non-CAS
7702         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
7703         Note: they do not seems to be used anymore in 2.0 (new metadata format)
7704
7705 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
7706
7707         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7708         constructor of abstract class. Fixes #61689.
7709
7710 2004-10-04  Martin Baulig  <martin@ximian.com>
7711
7712         * class-internals.h (MonoGenericContainer): New type.
7713         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7714         `MonoGenericContainer *generic_container'.
7715         (MonoClass): Replaced `gen_params' and `num_gen_params' with
7716         `MonoGenericContainer *generic_container'.
7717
7718         * metadata.c (mono_metadata_load_generic_params): Return a
7719         `MonoGenericContainer *' instead of a `MonoGenericParam *';
7720         removed the `num' argument.
7721
7722 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
7723
7724         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7725         for dynamic images.
7726
7727         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7728         machine fields.
7729
7730         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7731
7732         * reflection.c: Save pe_kind and machine values into the generated
7733         image file.
7734
7735         * appdomain.c: Bump corlib version number.
7736
7737         * object-internals.h: Reorganize layout of LocalBuilder.
7738
7739         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
7740         New helper function.
7741
7742         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7743         created MonoType for dynamic types. Fixes #66180.
7744
7745 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
7746
7747         * threadpool.c: the ares hashtable needs a critical section around it.
7748         this prevents some nasty segfaults
7749
7750 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
7751
7752         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7753         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7754         bug 67324).
7755         
7756 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7757
7758         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7759         
7760 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
7761
7762         * image.c: Always canonicalize image file names, to avoid loading
7763         the same assembly twice when referenced using a relative path.
7764
7765 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
7766
7767         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7768
7769         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7770
7771         * marshal.c: Fix warnings.
7772
7773 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
7774
7775         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7776         attempting to marshal the delegate_trampoline as the method_addr.
7777         This patch has a static hashtable of marshalled delegates so that 
7778         we can map delegate_trampoline addresses back to delegates.  This
7779         allows a delegate passed to managed code to be passed back into native
7780         code.  Fixes #67039
7781
7782 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7783
7784         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7785
7786         * reflection.c (method_encode_code): Align method headers properly.
7787         Fixes #66025.
7788
7789 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7790
7791         * marshal.c: In the runtime invoke wrapper, reset the abort
7792         exception if it is cached. This avoids the automatic rethrowal of 
7793         the exception after the catch of the wrapper. Also check for pending
7794         interruptions before calling the managed method. This is done using
7795         the new method emit_thread_force_interrupt_checkpoint, since the
7796         normal checkpoint method is ignored when running the invoke wrapper.
7797         * object.c: If the abort exception is rethrown, set the abort_exc
7798         field of the thread, so it will be rethrown aftere every catch.
7799         * threadpool.c: Only run an interruption checkpoint if what has been
7800         requested is a stop of the thread (aborts will be ignored).
7801         * threads.c: By default, a thread will now never be interrumped while
7802         running the runtime invoke wrapper (this ensures that runtime_invoke
7803         will always return to the caller if an exception pointer is provided).
7804         There is a new special method mono_thread_force_interruption_checkpoint()
7805         to force an interruption checkpoint even if running a protected
7806         wrapper, which is used by the same runtime invoke wrapper to do a check
7807         at a safe point.
7808
7809 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7810
7811         * object.c, object-internals.h: Implemented mono_release_type_locks,
7812         which releases the cctor locks held by a thread.
7813         * threads.c, threads.h: In thread_cleanup, release cctor locks held
7814         by a thread. Added mono_thread_exit() method to be used to safely stop
7815         a thread.
7816
7817 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7818
7819         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7820         Move null check before dereference.  Avoid indexing beyond the end
7821         of the 'modules' array.
7822
7823 2004-09-28  Raja R Harinath  <rharinath@novell.com>
7824
7825         * metadata-internals.h (MonoImage): Add module_count field.
7826         * image.c (load_modules): Set image->module_count.
7827         (mono_image_load_file_for_image): Use image->module_count.
7828         * reflection.c (mono_image_load_module): Append to image->modules array 
7829         of dynamic assembly.
7830         (mono_module_get_object): Fix loop to actually increment index.
7831         Use image->module_count.
7832         * assembly.c (mono_assembly_load_references): Use image->module_count.
7833         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7834         Likewise.
7835
7836 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7837
7838         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
7839         Avoid assert on generic types.
7840
7841 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
7842
7843         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7844
7845         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7846
7847         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
7848         function to convert a MarshalSpec structure to its managed counterpart.
7849
7850         * reflection.c: Fix warnings.
7851         
7852         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7853         field.
7854
7855         * icall.c (mono_create_icall_signature): Fix build.
7856
7857 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7858
7859         * icall.c: Add MakePointType icall.
7860
7861         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7862         warnings.
7863
7864 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7865
7866         * threadpool.c: reuse allocated slots in the queue.
7867
7868 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7869
7870         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7871
7872         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7873
7874         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7875         previous change.
7876
7877         * tabledefs.h: Add constants for pinvoke attributes BestFit and
7878         ThrowOnUnmappableChar.
7879
7880         * icall.c (ves_icall_Type_GetPacking): New icall.
7881
7882 2004-09-24  Martin Baulig  <martin@ximian.com>
7883
7884         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7885
7886 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7887
7888         * appdomain.c:
7889         (mono_domain_set): allow setting a domain that is being unloaded.
7890         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7891         being unloaded.
7892
7893 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7894
7895         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7896         the GetCustomAttributes icall.
7897
7898 2004-09-23  Martin Baulig  <martin@ximian.com>
7899
7900         * object-internals.h (MonoReflectionGenericParam): Replaced
7901         'has_ctor_constraint', `has_reference_type' and `has_value_type'
7902         with `guint32 attrs'.
7903
7904 2004-09-23  Martin Baulig  <martin@ximian.com>
7905
7906         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7907
7908 2004-09-23  Martin Baulig  <martin@ximian.com>
7909
7910         * object-internals.h (GenericParameterAttributes): New enum.
7911
7912 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7913
7914         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7915         
7916         * class.c (init_events): Fill out event->other field.
7917
7918         * class.c: Fix warnings.
7919
7920         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7921
7922 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7923
7924         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7925         walk which doesn't supply the IL offset.
7926
7927 2004-09-22  Martin Baulig  <martin@ximian.com>
7928
7929         * reflection.c (mono_reflection_setup_internal_class): If we're
7930         System.ValueType, System.Object or System.Enum, set
7931         `klass->instance_size' and create the vtable.
7932         (mono_reflection_create_internal_class): If we're an enum type,
7933         get the base class from our current corlib.
7934
7935 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
7936
7937         * reflection.h (MonoResolveTokenError): New type.
7938
7939         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7940         icall.
7941
7942         * icall.c: Add an 'error' argument to the ResolveToken icalls.
7943
7944 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
7945
7946         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7947         Support also calling constructors, but only for already allocated objects.
7948
7949 2004-09-17  Geoff Norton <gnorton@customerdna.com>
7950
7951         * reflection.c (type_get_qualified_name): If the klass is null
7952         return the typename to avoid a NullRefEx.
7953         (encode_cattr_value): Get the qualified name of the boxed type,
7954         not the underlying enumtype.  Fixes #62984.
7955
7956 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
7957
7958         * marshal.c: Fix problems with previous checkin.
7959
7960 2004-09-21    <vargaz@freemail.hu>
7961
7962         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7963         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7964
7965         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7966
7967 2004-09-21  Geoff Norton <gnorton@customerdna.com>
7968
7969         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7970         should only return a type for pointers, arrays, and passbyref types.
7971         Fixes bug #63841.
7972
7973 2004-09-21  Martin Baulig  <martin@ximian.com>
7974
7975         * domain.c (mono_debugger_check_runtime_version): New public
7976         function.
7977
7978         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
7979
7980 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
7981
7982         * reflection.c: Added missing sort to the declarative security 
7983         attributes table. MS implementation stops seeing the attributes if the
7984         token number regress in the table (as shown by ildasm and permview).
7985
7986 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
7987
7988         * object-internals.h (MonoReflectionModule): Add 'token' field.
7989         
7990         * reflection.c (mono_reflection_get_token): Add support for Module
7991         and Assembly.
7992         (mono_module_get_object): Set 'token' field.
7993         (mono_module_file_get_object): Set 'token' field.
7994
7995         * icall.c: Add new Assembly and Module icalls.
7996
7997         * appdomain.c: Bump corlib version.
7998
7999 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
8000
8001         * loader.h loader.c class.h class.c: Add helper functions for obtaining
8002         tokens of metadata objects.
8003
8004         * reflection.h reflection.c (mono_reflection_get_token): New function
8005         to obtain the token of a metadata object.
8006
8007         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
8008
8009 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
8010
8011         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
8012         
8013         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
8014
8015 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
8016
8017         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
8018         * object-internals.h: Added 3 MonoArray* members to MonoReflection
8019         AssemblyBuilder to access the permissions set in the class lib.
8020         * reflection.c: Added security attributes encoding step in 
8021         mono_image_build_metadata.
8022         * tabledefs.h: Added new security actions defined in 2.0:
8023         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
8024
8025 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
8026
8027         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
8028         macro parameter.
8029
8030 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
8031  
8032         * locales.c: nullify the ICU_collator member of CompareInfo when it is
8033           finalized. There where random SIGSEVs at program termination, when
8034           an object being finalized was trying to do a string comparison and
8035           the current culture was already finalized.
8036  
8037 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8038
8039         * threads.c: call thread_cleanup before finishing the thread if we get
8040         there.
8041
8042 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
8043
8044         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
8045         assemblies from the parent. Fixes #65665.
8046
8047 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
8048
8049         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
8050         modifiers.
8051
8052 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
8053
8054         * reflection.h: add prototype for mono_get_dbnull_object
8055         * reflection.c: add prototypes for get_default_param_value_blobs 
8056         and mono_get_object_from_blob for fussier compilers
8057
8058 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
8059  
8060         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
8061         false deadlock checks in class initialization.
8062  
8063 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
8064
8065         * image.c (mono_image_addref): Fix comment.
8066
8067         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
8068         possible.
8069
8070 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
8071
8072         * reflection.c (mono_param_get_objects): Modified to return
8073         ParameterInfo.DefaultValue object.
8074
8075         (get_default_param_value_blobs):
8076         (mono_get_object_from_blob):
8077         (mono_get_dbnull_object): New helper routines. 
8078
8079         * object.c (mono_get_constant_value_from_blob): New helper routine
8080         carved out from get_default_field_value ()
8081
8082         * object-internals.h (mono_get_constant_value_from_blob): Added
8083         function declaration.
8084
8085 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
8086
8087         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
8088         referenced assemblies. Fixes #62135.
8089
8090         * exception.h exception.c (mono_get_exception_file_not_found2): New
8091         helper function.
8092
8093 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
8094
8095         * class.h class.c: Add mono_type_get_underlying_type ().
8096
8097 2004-09-09  Geoff Norton <gnorton@customerndna.com>
8098
8099         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
8100         Fix GetTypes() to support dynamically created assemblies.
8101
8102 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
8103
8104         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
8105         
8106         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
8107         previous patch.
8108
8109         * reflection.h reflection.c loader.c: Allow dynamic construction of
8110         pinvoke methods. Fixes #65571.
8111         
8112         * reflection.c (mono_reflection_get_type): Revert previous change since
8113         it causes regressions.
8114
8115 2004-09-08  Martin Baulig  <martin@ximian.com>
8116
8117         * class.c (class_compute_field_layout): Don't call
8118         mono_class_layout_fields() for open generic instances.
8119
8120 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
8121         * threads.c appdomain.c: fix typo in GC macro
8122
8123 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8124
8125         * threads.c: don't call mono_thread_detach() in start_wrapper(),
8126         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
8127
8128 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
8129
8130         * image.c (mono_image_close): Applied patch from 
8131         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
8132         assembly is loaded multiple times from data.
8133         
8134         * image.c (mono_image_open): Fix warning.
8135
8136 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8137
8138         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8139         once. Fixes #58334.
8140         
8141         * reflection.c (mono_reflection_create_runtime_class): Initialize
8142         klass->nested_classes. Fixes #61224.
8143
8144 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8145
8146         * threads.c: sched_yield() on exit, to allow threads to quit.
8147
8148 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8149
8150         * object.c (mono_unhandled_exception): Remove leftover debug code.
8151
8152 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
8153
8154         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8155
8156 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8157
8158         * marshal.c (emit_marshal_array): Really null terminate string arrays.
8159         
8160         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8161
8162 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8163
8164         * marshal.c (emit_marshal_array): Null terminate string arrays.
8165         
8166         * marshal.c (raise_auto_layout_exception): Fix warning.
8167
8168         * reflection.c (mono_param_get_objects): Initialize the default value
8169         with DBNull.Value, not null. Fixes #62123.
8170
8171 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
8172
8173         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8174         throw an exception with a cute explanation.
8175
8176 2004-09-06  Dick Porter  <dick@ximian.com>
8177
8178         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8179         Close the new process's thread handle, as we don't use it.  The
8180         handle stays around forever otherwise.
8181
8182 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8183
8184         * object.c (arith_overflow): Fix warning.
8185
8186         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8187         calling conventions in method refs. Fixes #65352.
8188
8189         * reflection.c: Fix warnings.
8190
8191 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8192
8193         * icall.c: Add a new icall for Array.Clear
8194
8195 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8196
8197         * object.c: When allocating an array, we have to throw
8198         an overflow exception if any of the lengths are < 0.
8199
8200 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8201
8202         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8203         properly. Also move implementation of string array marshalling to 
8204         managed code. Fixes #42316.
8205
8206 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8207
8208         * assembly.c: provide more information when loading an assembly fails.
8209
8210 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8211
8212         * filewatcher.c: don't expect the development fam package to be
8213         installed.
8214
8215 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
8216
8217         * marshal.c: Make a copy of the signature cookie since it will be
8218         freed by the caller.
8219         
8220         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8221
8222         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8223
8224         * metadata.c (mono_metadata_free_marshal_spec): New function to free
8225         marshal specs.
8226
8227         * marshal.c: More refactoring.
8228         
8229         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8230         smaller functions.
8231
8232 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
8233
8234         * object.c: In mono_message_invoke, fill the output parameter array after
8235           calling the managed method (it was done before the call). This fixes
8236           bug #59299.
8237
8238 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8239
8240         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8241         as well.
8242
8243 2004-09-02  Martin Baulig  <martin@ximian.com>
8244
8245         * class.c (mono_class_instance_size): Don't allow generic type
8246         definitions or open generic instances.
8247         (mono_class_array_element_size): If we're a value type, call
8248         mono_class_instance_size() on the original class.
8249
8250         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8251         handle generic instances.
8252
8253         * mono-debug-debugger.c (write_type): Handle generic instances
8254         like classes.
8255
8256 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8257
8258         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8259         the allocation request fails. Fixes #65089.
8260
8261         * object.c (mono_runtime_free_method): Do not call mono_free_method.
8262         
8263         * object.c (mono_runtime_free_method): New function to free a dynamic
8264         method.
8265
8266         * marshal.c (mono_delegate_free_ftnptr): New function to free the
8267         delegate trampoline.
8268
8269         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8270         with hasthis as dynamic,
8271
8272         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8273
8274         * domain.c (mono_jit_info_table_remove): New function to remove an
8275         entry from the jit info table.
8276
8277         * class-internals.h (MonoMethod): Add 'dynamic' field.
8278
8279         * loader.c: Fix warnings.
8280
8281 2004-09-01  Martin Baulig  <martin@ximian.com>
8282
8283         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8284         instead of mono_debugger_lock() because the latter one is a no-op
8285         unless running in the debugger.
8286
8287 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8288
8289         * class.c (class_compute_field_layout): Classes with auto-layout or
8290         reference fields are not blittable.
8291         
8292 2004-09-01  Dick Porter  <dick@ximian.com>
8293
8294         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8295         mono_image_get_filename() to get the assembly location.
8296
8297         * icall.c:
8298         * metadata.h: Fix compile warnings
8299
8300 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8301
8302         * class.c (class_compute_field_layout): System.Object is blittable.
8303
8304         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8305         as in/out. Fixes #59909.
8306
8307 2004-09-01  Martin Baulig  <martin@ximian.com>
8308
8309         * metadata.h (MONO_TYPE_ISREFERENCE): Call
8310         mono_metadata_generic_inst_is_valuetype() if we're a generic
8311         instance to check whether our underlying type is a reference type.
8312
8313 2004-09-01  Martin Baulig  <martin@ximian.com>
8314
8315         * metadata.c (mono_type_size): If we're a generic instance, call
8316         mono_class_value_size() for value types.
8317
8318 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
8319
8320         * marshal.c: Implement more custom marshalling functionality. Fixes
8321         #64915.
8322
8323 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8324
8325         * mono-debug.c, debug-mono-symfile.c: add some locking love.
8326
8327 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
8328
8329         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8330
8331         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8332
8333         * icall.c: Fix some warnings.
8334
8335         * threads.c (abort_appdomain_thread): Fix unref errors.
8336         (mono_thread_current): Fix THREAD_DEBUG define.
8337
8338 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
8339
8340         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8341
8342         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8343
8344 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
8345
8346         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
8347         string arrays.
8348
8349 2004-08-28  Martin Baulig  <martin@ximian.com>
8350
8351         * metadata.c
8352         (mono_metadata_generic_inst_is_valuetype): New public function.
8353
8354         * metadata.h (MONO_TYPE_ISSTRUCT): Call
8355         mono_metadata_generic_inst_is_valuetype() if we're a generic
8356         instance to check whether our underlying type is a valuetype.
8357
8358 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
8359
8360         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8361         #63768.
8362
8363 2004-08-25  Martin Baulig  <martin@ximian.com>
8364
8365         * loader.c (mono_get_method_from_token): Abstract methods can also
8366         be generic and thus have type parameters.
8367
8368         * metadata-internals.h
8369         (MonoDynamicImage): Added `GPtrArray *gen_params'.
8370
8371         * reflection.c (mono_image_get_generic_param_info): Don't create a
8372         metadata row, just add an entry to the `gen_params' array.
8373         (build_compressed_metadata): Sort the `gen_params' array and then
8374         actually create the metadata.
8375
8376 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8377
8378         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8379
8380 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
8381
8382         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8383
8384 2004-08-24  Martin Baulig  <martin@ximian.com>
8385
8386         * class.cs (mono_class_is_subclass_of): Like an interface, a
8387         generic instance also derives from System.Object.
8388
8389 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
8390
8391         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8392         custom modifiers to be in any order. Fixes #61990.
8393
8394 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
8395
8396         * object.c: Register mono_object_new_fast icall.
8397         
8398         * object.c (mono_class_get_allocation_ftn): Return to calling
8399         mono_object_new_fast, since it seems faster to compute the object 
8400         size in unmanaged code than passing it as a parameter.
8401
8402         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8403
8404         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8405         this function with Boehm as the oom handler, so we don't have to check
8406         the result of GC_malloc.
8407
8408         * object.c: Remove checks for oom.
8409
8410         * object.h object.c (mono_class_get_allocation_ftn): New function to
8411         return the icall which can be used to allocate an instance of a given
8412         class. 
8413
8414         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8415
8416         * class-internals.h: Add 'enabled' field.
8417
8418 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
8419
8420         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8421
8422 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
8423         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8424         value 0x0010.
8425
8426 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
8427
8428         * appdomain.c: use the Tls function for appdomain too,
8429         at Zoltan's request. Actually return in mono_context_get
8430
8431         * appdomain.c, profiler.c, threads.c: use __thread
8432
8433 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
8434
8435         * appdomain.c threads.c: Call GC_CreateThread on windows.
8436
8437         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8438         multiple libraries since this don't work on windows.
8439
8440 2004-08-18  Martin Baulig  <martin@ximian.com>
8441
8442         * class-internals.h
8443         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8444         MonoMethodHeader.
8445
8446         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8447         MonoMethodNormal since we also need it for abstract and interface
8448         methods.
8449
8450         * reflection.c
8451         (build_compressed_metadata): Sort the GenericParam table.
8452         (mono_image_create_token): Added `gboolean create_methodspec'
8453         argument; this is false when generating a MethodImpl token.
8454         (reflection_methodbuilder_to_mono_method): Abstract and interface
8455         methods may also have generic parameters.
8456
8457 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8458
8459         * appdomain.c: thread local alloc
8460
8461 2004-08-17  Martin Baulig  <martin@ximian.com>
8462
8463         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8464
8465         * icall.c
8466         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8467         argument.
8468
8469         * class.c (mono_type_get_full_name): New public function.
8470         (mono_type_get_name): Don't include the type arguments.
8471
8472 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
8473
8474         * Makefile.am: Build static versions of libmetadata and libmonoruntime
8475         for inclusion into the mono executable.
8476
8477 2004-08-16  Martin Baulig  <martin@ximian.com>
8478
8479         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8480         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8481
8482 2004-08-14  Martin Baulig  <martin@ximian.com>
8483
8484         * class.c (dup_type): Also copy the `byref' field.
8485
8486 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
8487
8488         * reflection.c (create_dynamic_mono_image): Revert the last change 
8489         since it breaks bootstrap.
8490
8491 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8492
8493         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8494
8495         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8496         not free them with g_free.
8497
8498 2004-08-11  Martin Baulig  <martin@ximian.com>
8499
8500         * reflection.c (mono_reflection_setup_internal_class): Also call
8501         mono_class_setup_mono_type() if we already have a `tb->type.type'.
8502
8503 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
8504
8505         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
8506         called during default (first) AppDomain creation. Keep track of
8507         Evidence when loading assemblies.
8508
8509 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8510
8511         * opcodes.c, opcodes.h: reduce runtime relocations.
8512
8513 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8514
8515         * culture-info.h, locales.c: fixes and chages to sue the new
8516         optimized format of the locale data.
8517         * culture-info-tables.h: regenerated.
8518
8519 2004-08-06  Geoff Norton <gnorton@customerdna.com>
8520         
8521         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8522
8523 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
8524
8525         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8526         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8527         * domain-internals.h: icall declaration.
8528         * icall.c: icall registration.
8529         * object-internals.h: New fields in MonoAssembly for CAS.
8530
8531 2004-08-05  Duncan Mak  <duncan@ximian.com>
8532
8533         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8534         CEE_LDELEM_ANY.
8535
8536 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8537
8538         * reflection.c: fix to deal with object[] arrays in custom ctors
8539         (bug #62550).
8540
8541 2004-08-05  Martin Baulig  <martin@ximian.com>
8542
8543         * class.c (mono_class_array_element_size): Added support for
8544         generic instances and correctly handle "recursive" types.
8545
8546 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8547
8548         * assembly.c: Fix warnings.
8549
8550 2004-08-04  Martin Baulig  <martin@ximian.com>
8551
8552         * class.c
8553         (mono_type_get_name_recurse): Added `gboolean include_arity'
8554         argument specifying whether or not we should include the generic
8555         arity in the type name.
8556         (_mono_type_get_name): New static function.
8557         (mono_class_setup_vtable): If we're a generic instance, don't
8558         include the generic arity in the names of explicit method
8559         implementations.        
8560
8561 2004-08-03  Martin Baulig  <martin@ximian.com>
8562
8563         * class.c (mono_type_get_name_recurse): Enclose the generic type
8564         arguments in `<', '>'.
8565
8566 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8567
8568         * gc.c: make GC warning messages use the trace API, they are just
8569         noise to most of the users.
8570
8571 2004-08-03  Martin Baulig  <martin@ximian.com>
8572
8573         * debug-mono-symfile.c (read_string): Correctly read the string.
8574
8575 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8576
8577         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8578         
8579         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8580         icalls.
8581         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8582
8583 2004-07-30  Martin Baulig  <martin@ximian.com>
8584
8585         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8586         Reflect latest symbol writer changes.   
8587
8588 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8589
8590         * object.c: always create an object if null is passed
8591         to Invoke() where a valuetype is expected.
8592
8593 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
8594
8595         * marshal.c (mono_marshal_init): make managed
8596         signatures match native ones better for 64bits.
8597
8598 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8599
8600         * appdomain.c: hack to build correctly the private bin path on windows.
8601         Fixes bug #61991.
8602
8603 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
8604
8605         * assembly.c: Load mscorlib from the correct framework directory
8606           (mono/<version>/mscorlib.dll).
8607         * appdomain.h: Added prototypes for new functions.
8608         * internals.h: Added some prototypes.
8609         * domain.c: When initializing the runtime, get from the executable and
8610           the configuration files the runtime version that the app supports.
8611           Added support methods for reading app.exe.config. Added list of versions
8612           supported by the JIT. Added two new methods: mono_init_from_assembly,
8613           which initializes the runtime and determines the required version from
8614           the provided exe file, and mono_init_version, which initializes
8615           the runtime using the provided version.
8616         * icall.c: Get machine.config from version-specific directory.
8617         * reflection.c: When generating an image, embed the version number
8618           of the current runtime.
8619
8620 2004-07-28  Dick Porter  <dick@ximian.com>
8621
8622         * socket-io.c
8623         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8624         returned sockaddr size before creating the remote address object.
8625         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8626         61608.
8627
8628 2004-07-28  Dick Porter  <dick@ximian.com>
8629
8630         * locales.c (string_invariant_compare_char): Fix invariant char
8631         compares between upper and lower cases.  Fixes bug 61458.
8632
8633 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
8634         
8635         * marshal.c: actually cache stelem.ref wrappers.
8636         
8637 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8638
8639         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
8640         sections and remove the mono_cli_rva_map () function.
8641
8642 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8643
8644         * debug-mono-symfile.c: fix one more endianess issue, from a patch
8645         by Geoff Norton (<gnorton@customerdna.com>).
8646
8647 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8648
8649         * class.c: fix class loads for pointer types (typeof(int) !=
8650         typeof(int*)).
8651
8652 2004-07-27  Martin Baulig  <martin@ximian.com>
8653
8654         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8655         reading the debugging information from an external ".mdb" file.
8656
8657 2004-07-24  Martin Baulig  <martin@ximian.com>
8658
8659         * reflection.c (mono_image_get_type_info): Only write a class
8660         layout entry if we actually have a size or a packing size.
8661
8662 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8663
8664         * reflection.c (type_get_fully_qualified_name): 
8665         insert cast to get type checking of ?: with non-gcc compilers
8666
8667 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8668
8669         * rand.c: use g_getenv for both lookups of
8670         MONO_EGD_SOCKET
8671
8672 2004-07-17  Martin Baulig  <martin@ximian.com>
8673
8674         * reflection.c (mono_reflection_bind_generic_method_parameters):
8675         Set `gmethod->reflection_info'.
8676
8677 2004-07-17  Martin Baulig  <martin@ximian.com>
8678
8679         * class.c (mono_class_create_from_typedef): Insert the newly
8680         created class into the hash table before computing the interfaces
8681         since we could be called recursively.
8682
8683 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
8684
8685         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8686         function to implement stelem.ref in managed code
8687         * class-internals.h, debug-helpers.c: a new wrapper type
8688         for the above.
8689
8690 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8691
8692         * gc.c: allow GC handles to work even when no GC is compiled in.
8693         Fix part of bug #61134 (GetAddrOfPinnedObject).
8694
8695 2004-07-13  Peter Williams  <peter@newton.cx>
8696  
8697         * process.c (complete_path): Make sure we don't attempt to execute
8698         directories.
8699  
8700 2004-07-12  Geoff Norton <gnorton@customerdna.com>
8701
8702         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
8703           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
8704           and will add/subtract the hour if needed
8705
8706 2004-07-12  Martin Baulig  <martin@ximian.com>
8707
8708         * reflection.c (mono_field_get_object): If we have
8709         `field->generic_info', take the attributes from
8710         `field->generic_info->generic_type'.    
8711
8712 2004-07-12  Martin Baulig  <martin@ximian.com>
8713
8714         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8715         This function must be called before initializing the runtime.
8716         (mono_debug_init_1): New function; call this after initializing
8717         the runtime, but before loading the assembly.  It tells the
8718         debugger to load corlib and the builtin types.
8719
8720         * mono-debug-debugger.c: Did some larger changes in the debugging
8721         code; support recursive class declarations, make sure we actually
8722         add all classes.
8723
8724 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8725
8726         * debug-helpers.c: undo my previous patch and fixed the real issue in
8727         ../mini/exceptions-x86.c
8728
8729 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8730
8731         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8732         when no HOME env. variable was set and a NullRef was thrown in a .cctor
8733         called from other .cctors.
8734
8735 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
8736
8737         * loader.c: Removed the mono_loader_wine_init hack now that we are
8738         doing a managed version of Windows.Forms.
8739
8740 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
8741
8742         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8743         threadpool.c, threads.c: remove static data from rootset.
8744
8745 2004-07-09  Dick Porter  <dick@ximian.com>
8746
8747         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8748         Don't do any more processing if the matched length was 0.  It was
8749         increasing the size of the string before.  Fixes bug 61167.
8750
8751 2004-07-09  Dick Porter  <dick@ximian.com>
8752
8753         * socket-io.h:
8754         * socket-io.c
8755         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8756         Add support for SO_PEERCRED if its available.
8757
8758 2004-07-09  Peter Bartok <pbartok@novell.com>
8759         * loader.c: winelib.exe.so error message is now only displayed if
8760         MONO_DEBUG is set. To help us avoid questions when people are trying
8761         out the new Managed.Windows.Forms.
8762
8763 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
8764
8765         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
8766         for isinst and castclass wrappers.
8767
8768         * class-internals.h icall.c: Move registration and lookup of JIT icalls
8769         to libmetadata from the JIT, so they could be used by the marshalling
8770         code and the interpreter.
8771
8772         * marshal.c: Register marshalling related JIT icalls here instead of
8773         in mini.c. Use CEE_MONO_ICALL instead of the family of 
8774         CEE_MONO_PROC<x> opcodes to call marshalling functions.
8775
8776         * metadata.h: Remove unneeded marshalling conversions.
8777
8778         * opcodes.c: Update for new opcodes.
8779         
8780 2004-07-08  Martin Baulig  <martin@ximian.com>
8781
8782         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8783         (mono_debug_get_domain_data): Make this function static.
8784
8785 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8786
8787         * gc.c, object.h: add nice GC handle API for embedders.
8788
8789 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8790
8791         * reflection.c: more changes for the new api
8792
8793         * object.c: When we reflect on a field w/ a constant value, it
8794         will not have a memory location, so we must access metadata. Also,
8795         allow easier reading of strings so that we can read them from
8796         the constant data.
8797
8798         * class.c (mono_class_layout_fields): no need for literal fields here.
8799
8800         * class-internals.h: api changes for const fields
8801
8802         * icall.c (ves_icall_get_enum_info): use new apis for const fields
8803
8804 2004-07-06  Martin Baulig  <martin@ximian.com>
8805
8806         * mono-debug.h: Increment version number to 44.
8807
8808         * mono-debug.c (mono_debug_add_wrapper): The second argument is
8809         now a gpointer, rewrote this whole method.
8810
8811         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8812         function.  Add information about the wrapper in a new "misc table".
8813
8814         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8815         for the new misc table.
8816
8817 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8818
8819         * metadata-internals.h image.c: Add a cache for helper signatures.
8820
8821         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8822
8823 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8824
8825         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8826         delegates from a delegate. Fixes #61033.
8827         
8828         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8829         marshalling of stringbuilder arrays. Fixes #59900.
8830
8831 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8832
8833         * icall.c: Add EnumBuilder:setup_enum_type icall.
8834
8835 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8836
8837         * icall.c: Added a new icall for the property version of
8838         OffsetOfStringData.
8839
8840 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8841
8842         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8843         it has a constant size across platforms.
8844
8845         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8846         stack trace.
8847
8848 2004-06-29  Martin Baulig  <martin@ximian.com>
8849
8850         * mono-debug.c (mono_debug_add_method): Protect the whole function
8851         in mono_debugger_lock(), not just parts of it.
8852
8853 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8854
8855         * reflection.c: make sure padding bytes in heaps are zeroed.
8856
8857 2004-06-24  David Waite  <mass@akuma.org>
8858
8859         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8860         image.c, loader.c, locales.c, marshal.c, metadata.c,
8861         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8862         string-icalls.c, threads.c: change to C90-style comments from C99 /
8863         C++ -style
8864
8865 2004-06-24  Dick Porter  <dick@ximian.com>
8866
8867         * threads.c
8868         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8869         return createdNew.  Fixes bug 60412.
8870
8871         * threads-types.h: 
8872         * icall.c: Add createdNew parameter to CreateMutex icall
8873
8874 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8875
8876         * reflection.c, object-internals.h: save default value in params.
8877
8878 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8879
8880         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8881         no need to build a new path combining that with the application base.
8882         Fixes bug #60442.
8883
8884 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8885
8886         * reflection.c: fixed minor standard compliance issues.
8887
8888 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8889
8890         * reflection.c: fixed issue with encoding some custom attributes
8891         (arrays in properties and fields, bug #60411).
8892
8893 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8894
8895         * reflection.c: fix start address when copying the public key token.
8896
8897 2004-06-23  Martin Baulig  <martin@ximian.com>
8898
8899         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8900         the `exc' object in a static object to put it into the GC's root set.
8901
8902 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8903
8904         * reflection.c: make mono_reflection_setup_internal_class ()
8905         callable a second time to setup a new parent class.
8906
8907 2004-06-23  Dick Porter  <dick@ximian.com>
8908
8909         * threads.c: Check for WAIT_IO_COMPLETION return values.
8910
8911 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
8912
8913         * appdomain.c: Removed the g_free on the public key token. Now copy 
8914         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8915         * assembly.c: Added public key token string value when loading 
8916         assemblies. Fix bug #60439.
8917         * icall.c: Added missing informations (like public key) in 
8918         GetReferencedAssemblies. Fix #60519.
8919         * image.h: Changed definition for public key token from const char*
8920         public_tok_value to guchar public_key_token [17];
8921         * reflection.c: Updated for changes to public key token.
8922
8923 2004-06-22  Lluis Sanchez Gual
8924
8925         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
8926         for the field in base classes.
8927
8928 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8929
8930         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8931         mark headers as not supported, they are installed only for use by the
8932         debugger.
8933
8934 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8935
8936         * *.c, *.h: avoid namespace pollution in public headers.
8937
8938 2004-06-21  Martin Baulig  <martin@ximian.com>
8939
8940         * exception.c (mono_get_exception_security): It's in
8941         "System.Security", not in "System".
8942
8943         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8944         the exception classes.
8945
8946 2004-06-21  Martin Baulig  <martin@ximian.com>
8947
8948         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8949         Protect the exception object from being finalized.
8950
8951 2004-06-21  Martin Baulig  <martin@ximian.com>
8952
8953         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8954         public function.
8955
8956 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
8957
8958         * reflection.c: Load the assembly in mono_reflection_type_from_name,
8959         if it was not loaded before. Fix parts of #60439.
8960
8961 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8962
8963         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8964         code that was broken since Ben's change: wrappers are now
8965         dependent on the method signature only again.
8966
8967 2004-06-21  Martin Baulig  <martin@ximian.com>
8968
8969         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8970         added interface support.
8971
8972 2004-06-21  Martin Baulig  <martin@ximian.com>
8973
8974         * class.c (mono_vtable_get_static_field_data): New public method.
8975
8976 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
8977
8978         * filewatcher.c : Windows build fix to be compliant with API changes.
8979
8980 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8981
8982         * class.h, class.c: more accessors.
8983         * metadata.h, metadata.c: prepare for hiding MonoType and
8984         MonoMethodSignature: people should use the accessors from now on
8985         outside of the tree.
8986
8987 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8988
8989         * *.c, *.h: more API cleanups.
8990
8991 2004-06-18  Jackson Harper  <jackson@ximian.com>
8992
8993         * assembly.c: Trace loading assemblies.
8994         * loader.c: Trace loading native libraries.
8995         * mono-config.c: Trace loading config files.
8996         
8997 2004-06-18  Dick Porter  <dick@ximian.com>
8998
8999         * locales.c: Tell ICU the lengths of strings, it can cope with
9000         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
9001
9002 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9003
9004         * image.c: swapped name/filename;
9005
9006 2004-06-18  Martin Baulig  <martin@ximian.com>
9007
9008         * mono-debug-debugger.c (write_class): Write the parent class at
9009         the end of the header.
9010
9011 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9012
9013         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
9014
9015 2004-06-17  Raja R Harinath  <rharinath@novell.com>
9016
9017         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
9018         (bundle_obj): New conditional define.
9019         (BUILT_SOURCES): Remove.
9020         ($(bundle_srcs)): Make parallel-make safe.
9021         (libmonoruntime_la_LIBADD): Make unconditional.
9022         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
9023         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
9024
9025 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
9026
9027         * culture-info-tables.h: It was inconsistent with the latest
9028           supp info files.
9029
9030 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
9031
9032         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
9033         be loaded.
9034
9035         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
9036         with gcc 2.95.
9037
9038 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9039
9040         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
9041         cleaned up public header threads.h.
9042
9043 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9044
9045         * Makefile.am, *.c, *.h: more API cleanups.
9046
9047 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9048
9049         * Makefile.am: removed monosn from compilation.
9050         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
9051         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
9052         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
9053         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
9054         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
9055         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
9056
9057 2004-06-15  Jackson Harper  <jackson@ximian.com>
9058
9059         * assembly.c: Make locales lower case when searching the GAC for
9060         assemblies. gacutil will always make locales lowercase when
9061         installing so this effectively makes them case insensitive.
9062         
9063 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
9064
9065         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
9066         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
9067           parameter which allows to choose whether the wait can be interrupted or 
9068           not. Also added the method mono_monitor_enter(), which locks the monitor
9069           using an infinite wait and without allowing interruption.
9070           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
9071           interrupted.
9072         * object.h: Added new fields in MonoThread. suspend_event holds the event
9073           used to susped/resume the thread. synch_lock is the lock object to use for
9074           modifying the thread state.
9075         * threads.c: Use the new synch_lock object for locking, instead of "this",
9076           which can generate deadlocks.
9077           Moved thread state change in Thread.Sleep and Thread.Join from managed
9078           to unmanaged code. This avoids a deadlock when the thread was suspended
9079           just after acquiring the thread lock.
9080           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
9081           Implemented Thread.Suspend using an event instead of ThreadSuspend,
9082           which is not fully implemented in the io-layer.
9083         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
9084
9085 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
9086
9087         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
9088         threads-types.h: more API cleanups.
9089
9090 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9091
9092         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
9093         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
9094         threadpool.c, threads.c: first pass at the exported API cleanup.
9095
9096 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9097
9098         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
9099
9100 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9101
9102         * icall.c: added internalGetHome.
9103
9104 2004-06-14  Dick Porter  <dick@ximian.com>
9105
9106         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
9107         possible to return successfully when '.' or '..' were the only
9108         entries in a directory, but were skipped.  The MonoIOStat was not
9109         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
9110         Fixes bug 59574.
9111
9112 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9113
9114         * reflection.c: make binaries run on .Net 1.1 by default.
9115
9116 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9117
9118         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
9119
9120 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
9121
9122         * marshal.c: keep track of struct size with explicit layout
9123         (bug #59979).
9124
9125 2004-06-12  Martin Baulig  <martin@ximian.com>
9126
9127         * mono-debug-debugger.c: Comment out a debugging g_message().
9128
9129 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9130
9131         * reflection.c, reflection.h: do not free custom attrs that are cached.
9132         * icall.c: use braces to make code clearer.
9133
9134 2004-06-11  Martin Baulig  <martin@ximian.com>
9135
9136         * class.h (MonoInflatedField): New type.
9137         (MonoClassField): Replaced `MonoType *generic_type' with
9138         `MonoInflatedField *generic_info'.
9139
9140         * icall.c
9141         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9142
9143 2004-06-11  Martin Baulig  <martin@ximian.com>
9144
9145         * reflection.c (mono_image_create_method_token): Correctly encode
9146         varargs methods.
9147
9148 2004-06-11  Martin Baulig  <martin@ximian.com>
9149
9150         * metadata.c (mono_metadata_parse_method_signature): When parsing
9151         a MethodDef which has VarArgs, also set sentinelpos if we don't
9152         have any parameters.
9153
9154 2004-06-11  Martin Baulig  <martin@ximian.com>
9155
9156         * verify.c (mono_method_verify): In CEE_CALL, use
9157         mono_method_get_signature() to get the method's signature, unless
9158         we're a PInvoke method.
9159
9160 2004-06-10  Jackson Harper  <jackson@ximian.com>
9161
9162         * assembly.c: Use <path>/lib/mono/gac for the extra paths
9163         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9164         logical name as the supplied path is just a prefix to the gac not
9165         the direct path to it.
9166         
9167 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9168
9169         * reflection.c: make the token for a created method match
9170         the token of the MethodBuilder it was created from
9171         (IKVM requires this behaviour now).
9172
9173 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9174
9175         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9176         reflection.c, socket-io.c: leak fixes.
9177
9178 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9179
9180         * icall.c: handle sentinel pos in vararg methods in position different
9181         from 0.
9182
9183 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9184
9185         * culture-info-tables.h: freshly generated.
9186
9187 2004-06-09  Martin Baulig  <martin@ximian.com>
9188
9189         * loader.c (mono_get_method_constrained): Call `mono_class_init
9190         (constrained_class)'.   
9191
9192 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
9193
9194         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9195         any methods. Fixes #59629.
9196
9197 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9198
9199         * culture-info-tables.h: reflecting locale-builder updates.
9200
9201 2004-06-08  Dick Porter  <dick@ximian.com>
9202
9203         * object.h:
9204         * locales.c: Fixed compile warnings, including a real bug in
9205         CompareInfo_internal_compare.
9206         
9207 2004-06-08  Dick Porter  <dick@ximian.com>
9208
9209         * locales.c
9210         (ves_icall_System_Globalization_CompareInfo_internal_index):
9211         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9212         Double-check the resuls of usearches, because ICU currently
9213         ignores most of the collator settings here.  Fixes bug 59720.
9214         
9215 2004-06-08  Dick Porter  <dick@ximian.com>
9216
9217         * locales.c
9218         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9219         Fix memory leak and segfault-causing typo.  No idea how this one
9220         lasted so long without being noticed.
9221
9222 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
9223
9224         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9225         any methods. Fixes #59629.
9226
9227 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9228
9229         * assembly.c:
9230         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9231         own the critical section before). Removed dead code (that's done
9232         in the preload hook).
9233
9234         (mono_assembly_load_with_partial_name): call the preload hook.
9235
9236 2004-06-08  Martin Baulig  <martin@ximian.com>
9237
9238         * metadata.c (mono_metadata_signature_alloc): Default
9239         `sentinelpos' to -1.
9240
9241         * reflection.c (mono_image_get_array_token): Likewise.
9242
9243 2004-06-08  Martin Baulig  <martin@ximian.com>
9244
9245         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9246
9247         * metadata.c (mono_metadata_parse_method_signature): When parsing
9248         a MethodDef which has VarArgs, set sentinelpos.
9249
9250         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9251         `gint16' since we're using -1 for non-varargs methods.
9252
9253         * reflection.c
9254         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9255         (method_encode_signature): Added varargs support.
9256         (method_builder_encode_signature): Likewise.
9257         (mono_image_get_varargs_method_token): New static method.
9258         (mono_image_create_method_token): New public method; this is
9259         called via an icall instead of mono_image_create_token() when
9260         calling a varargs method.       
9261
9262 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
9263
9264         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9265
9266 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9267
9268         * culture-info-tables.h : Reflecting the latest locale-builder that
9269           fixed empty array representation ({} to {0}).
9270
9271 2004-06-07  Jackson Harper  <jackson@ximian.com>
9272
9273         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9274         looking up extra gac paths. This allows MONO_GAC_PATH to act
9275         exactly like a prefix.
9276         
9277 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9278
9279         * reflection.c (mono_reflection_type_from_name): Make a copy of the
9280         type name before modifying it. Fixes #59405.
9281
9282 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9283
9284         * culture-info.h: added fields for "all datetime patterns".
9285         * locales.c: (  ves_icall_System_Globalization_CultureInfo
9286           _construct_datetime_format ()): fill xxx_patterns fields.
9287         * object.h: added fields for "all datetime patterns" to
9288           MonoDateTimeFormatInfo.
9289         * culture-info-tables.h: reflecting locale-builder updates.
9290
9291 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9292
9293         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9294         the event has no add and remove methods. Fixes #59629.
9295
9296 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
9297
9298         * object.c: Fixed possible integer overflow when allocating large
9299         strings.
9300
9301 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9302
9303         * culture-info-tables.h: reflecting locale-builder updates.
9304
9305 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9306
9307         * culture-info-tables.h: reflecting locale-builder updates.
9308
9309 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
9310
9311         * culture-info-tables.h: reflecting locale-builder updates.
9312
9313 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
9314
9315         * threads.c: Made Thread.Sleep abortable.
9316
9317 2004-06-02  Martin Baulig  <martin@ximian.com>
9318
9319         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9320
9321         * debug-mono-symfile.h: Bumped symbol file version number to 37.
9322
9323 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
9324
9325         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9326
9327 2004-05-30  Jackson Harper  <jackson@ximian.com>
9328
9329         * reflection.c: Do not hardcode assembly versions or public key
9330         tokens anymore. All of this except the corlib section was dead
9331         code anyways.
9332         
9333 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
9334
9335         * object.c (mono_runtime_invoke_array): Automatically create boxed
9336         objects for byref valuetypes if needed. Fixes #59300.
9337         
9338         * object.c (mono_method_return_message_restore): Handle 
9339         MONO_TYPE_OBJECT as well.
9340
9341 2004-05-28  Jackson Harper  <jackson@ximian.com>
9342
9343         * reflection.c: The modified type encoding was causing build
9344         problems. Reverted for now.
9345         
9346 2004-05-28  Jackson Harper  <jackson@ximian.com>
9347
9348         * reflection.c/h: Take an assembly ref so that we dont create
9349         fully qualified names when encoding types in the same assembly as
9350         the custom attribute being emitted.
9351         * appdomain.c: Increment version number.
9352         
9353 2004-05-26  Duncan Mak  <duncan@ximian.com>
9354
9355         * icall.c
9356         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9357         Set the full version number (major, minor, build, revision).
9358
9359 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
9360
9361         * marshal.c (emit_struct_conv): increment src/dst after blit
9362         (mono_marshal_get_managed_wrapper,
9363         mono_marshal_get_native_wrapper): make sure we have marshalling
9364         info before marshalling params (info computation affects
9365         blittable)
9366
9367         * class.c (class_compute_field_layout): correctly deal with
9368         blittable
9369         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9370         value types (as per what windows dows by default)
9371         (mono_class_setup_mono_type): System.ValueType is blittable
9372         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9373         blittable
9374
9375         * marshal.c (mono_marshal_load_type_info): flag types  as
9376         non-blittable if the native layout doesn't match the managed
9377         layout
9378
9379 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9380
9381         * appdomain.c: don't add stuff in the private search path that is
9382         above the application base. If application base is not set, there's
9383         no private search path.
9384
9385 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
9386
9387         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9388         byref struct arguments in native->managed marshalling.
9389
9390 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
9391
9392         * marshal.c (mono_marshal_get_runtime_invoke): correctly
9393         cache methods using signature (special case for methods
9394         that are value type or string class)
9395         
9396         * image.c (mono_image_close): clean up allocated GSList's
9397         in runtime_invoke_cache.
9398
9399 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9400
9401         * mono-config.c: set the correct path for mono_cfg_dir on windows when
9402         there's no MONO_CFG_DIR environment variable defined.
9403
9404 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9405
9406         * threads.c: windows version must be >= 0x0500 to include OpenThread.
9407
9408 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
9409
9410         * threadpool.c: Really wait for 500ms after the async call, even if the wait
9411           is interrumped.
9412         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9413           before waiting for it, and call CloseHandle after the wait to unref it.
9414           This will make sure that handles are not disposed too early.
9415
9416 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9417
9418         * appdomain.c:
9419         * appdomain.h:
9420         * icall.c: removed
9421         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9422         needed now.
9423
9424         * object.c: se the application_base only for the domain that runs
9425         Main. Fixes bug #59216,
9426
9427 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9428
9429         * appdomain.c:
9430         * object.c: only the domain in which Main is run have
9431         SetupInformation.ConfigurationFile set, so moved a few lines from
9432         appdomain.c to object.c.
9433
9434 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9435
9436         * appdomain.c: we tried to load [name].(dll|exe), but according
9437         to bug #57710, we must also try [culture]/[name].(dll|exe) and
9438         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9439         There's a test case attached to bug #58922.
9440
9441 2004-05-27  Dick Porter  <dick@ximian.com>
9442
9443         * icall.c:
9444         * file-io.c: Implemented icalls for locking and unlocking regions
9445         in a file.
9446         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9447         FALSE on error (fixes both compiler warning and real bug.)
9448
9449 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
9450
9451         * culture-info-tables.h: reflecting locale-builder updates.
9452
9453           (Added missing ChangeLog entry for 05/26)
9454
9455 2004-05-27  Jackson Harper  <jackson@ximian.com>
9456
9457         * locales.c: Fix some cut and paste errors.
9458         
9459 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9460
9461         * mono-config.c: set the correct path for config. directory on windows.
9462
9463 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9464
9465         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9466           on win32.
9467
9468 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9469
9470         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9471         from pinvoke functions.
9472         
9473         * marshal.c (mono_ftnptr_to_delegate): Implement this.
9474
9475 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9476
9477         * culture-info-tables.h: reflecting locale-builder updates.
9478
9479 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9480
9481         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9482         #59086.
9483
9484 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
9485
9486         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9487         * icall.c: Modified icalls for RNG.
9488         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
9489         Windows (CryptoAPI).
9490
9491 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9492
9493         * locales.c: Fix build.
9494
9495 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9496
9497         * culture-info-tables.h: reflecting locale-builder updates.
9498
9499 2004-05-25  Jackson Harper  <jackson@ximian.com>
9500
9501         * locales.c: When creating the current culture use the $LANGs
9502         specific culture. So DateTimeFormat and NumberFormat entries are created.
9503         
9504 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9505
9506         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9507         a char array as parameter.
9508
9509 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
9510
9511         * image.c: In mono_image_open(), always use an absolute path name to
9512           look for already loaded images.
9513
9514 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
9515
9516         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9517         missing in the windows build (like older cygwin include files).
9518
9519 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
9520
9521         * icall.c: Fixed check for possible integer overflow in Buffer_
9522         BlockCopy icall. Replaced comments style // by /* */.
9523
9524 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
9525
9526         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9527         
9528         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9529         check after MONO_VTADDR. Fixes pinvoke2.exe.
9530
9531         * marshal.h marshal.c metadata.h: Add beginnings of support for
9532         ftnptr -> delegate marshalling.
9533
9534 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
9535
9536         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9537         * threads.c: Fix warnings.
9538
9539 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
9540
9541         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9542         * icall.c: Registered icalls for Suspend and Resume.
9543         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9544           Thread.Abort.
9545         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9546         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9547         * process.c: Use WaitForSingleObjectEx.
9548         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
9549           checkpoints.
9550         * threads.c, threads.h: Make use of new Ex wait methods. Improved
9551           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9552           for Suspend and Resume. Added new mono_thread_stop, used for stoping
9553           background threads. Added basic support for Abort in Windows.
9554           Start new threads using a managed delegate invoke wrapper. This wrapper
9555           has an interruption checkpoint that is needed since an interruption
9556           can be requested before the thread leaves the unmanaged code that starts 
9557           the thread.
9558         * marshal.c: Added interruption checkpoint after every native call, and
9559           also before managed calls for wrappers called from unmanaged code to
9560           go into managed code.
9561         * object.h: Added new field in MonoThread to keep track of interruption
9562           requests.
9563
9564 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
9565
9566         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9567         calls.
9568
9569 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9570
9571         * appdomain.c:
9572         * assembly.c:
9573         * gc.c:
9574         * locales.c:
9575         * mono-config.c:
9576         * rand.c: getenv -> g_getenv (windows!)
9577
9578         * process.c: complete_path is also used on non-windows platforms.
9579
9580 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9581
9582         * icall.c: new signature for Process_Start.
9583
9584         * process.[ch]: new signature for Process_Start. If we're on windows
9585         and UseShellExecute is false, we have to search for the program by
9586         ourselves if we don't get a full path.
9587
9588 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
9591         marshalling and call CleanUpNativeData if needed. Fixes #58646.
9592
9593 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9594
9595         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9596         Fixes bug #58373.
9597
9598 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9599
9600         * process.c: use double quotes to quote program name and arguments on
9601         windows. Fixes bug #58575.
9602
9603 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9604
9605         * file-io.c: don't return "." and ".." when using windows Find*File.
9606
9607 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
9608
9609         * marshal.c: Don't pass wrappers to message init because method 
9610         addressed used to lookup metadata. part of remoting[2|3] fix.
9611
9612 2004-05-15  Jackson Harper  <jackson@ximian.com>
9613
9614         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9615         path is essentially the same as MONO_PATH except that it points to
9616         GACs instead of lib directories.
9617         * loader.h: The user gac is gone so we dont need function to
9618         enable/disable it.
9619         * mono-config.c: user gac option is now gone.
9620         
9621 2004-05-15  Jackson Harper  <jackson@ximian.com>
9622
9623         * culture-info.h: Make defines more consistent, add calendar data
9624         to the culture info table.
9625         * culture-info-tables.h: Add basic calendar data. Basically
9626         everyone gets default gregorian until all the data is
9627         updated.
9628         * locales.c: Use the new consistent defines. Set calendar data for
9629         culture info objects.
9630         * object.h: add a field for calendar data to CultureInfo
9631         
9632 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
9633
9634         * image.c: image->runtime_invoke_cache is keyed on signatures now.
9635         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9636         a signature.
9637         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9638         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9639         an extra param that is the pointer of the method to invoke. The IL for
9640         the invoke method is no longer specific to the method, but to the
9641         signature of the method. Thus, we can share the same code for multiple
9642         methods. This reduces the number of methods that have to be compiled.
9643
9644 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
9645
9646         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9647
9648         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9649
9650         * icall.c: Optimize Buffer.BlockCopy.
9651
9652 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9653
9654         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9655         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9656         quote). Changed them to "MMMM yyyy".
9657
9658 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
9659
9660         * rand.c
9661         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
9662
9663 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
9664
9665         * reflection.h: Updated after changes to managed structures.
9666
9667         * appdomain.c: Bump corlib version.
9668
9669 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9670
9671         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9672         windows.
9673
9674 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9675
9676         * Makefile.am: link to ../os/libmonoos.la on windows.
9677
9678         * assembly.c:
9679                 -If MONO_DEBUG, warn about non-existing directories in
9680                 MONO_PATH.
9681                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9682                 compile time variable.
9683                 -Removed init_default_path and call mono_set_rootdir from
9684                 libmonoos.a instead (windows only).
9685
9686         * assembly.h: declare mono_assembly_getrootdir().
9687
9688         * domain.c:
9689         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9690
9691         * loader.c: s/getenv/g_getenv/
9692
9693 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
9694
9695         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9696
9697         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9698
9699         * metadata.h: Add new marshalling conversions.
9700
9701         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9702         function.
9703
9704         * reflection.c (mono_reflection_get_type): Lookup the type in all
9705         modules of a multi-module assembly. Fixes #58291.
9706
9707 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
9708
9709         * threads.c: Before aborting a background, set the StopRequested
9710         state.  This avoids throwing the Abort exception.
9711         In mono_thread_manage, don't continue with the shutdown until all
9712         aborted threads have actually stopped.
9713
9714 2004-05-10  Jackson Harper  <jackson@ximian.com>
9715
9716         * locales.c: Remove the modifier from culture names.
9717         
9718 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9719
9720         * Makefile.am: monosn is not installed any more. It has been deprecated
9721         in favor of sn.
9722
9723 2004-05-07  Jackson Harper  <jackson@ximian.com>
9724
9725         * locales.c
9726         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9727         Fix array construction, add bailout if the length is 0.
9728
9729 2004-05-07  Dick Porter  <dick@ximian.com>
9730
9731         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9732         machine doesn't have a DNS entry.  Patch by Urs Muff
9733         (umuff@quark.com), fixes bug 57928.
9734
9735 2004-05-06  Jackson Harper  <jackson@ximian.com>
9736
9737         * reflection.c: Handle null PublicTokens properly. alloc mem for
9738         assembly names culture so we dont crash when freeing it.
9739         
9740 2004-05-06  Jackson Harper  <jackson@ximian.com>
9741
9742         * assembly.c: Check the usergac when loading with partial names.
9743         
9744 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9745
9746         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
9747         does nothing for now (not required for Linux/Windows) but the class
9748         library can call it (and a newer or modified runtime could need it).
9749         * icall.c: Registred icall.
9750
9751 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9752
9753         * loader.c: prints a message on module loading error we set MONO_DEBUG
9754         environment variable.
9755
9756 2004-05-05  Jackson Harper  <jackson@ximian.com>
9757
9758         * appdomain.c: Handle PublicKeyToken=null properly.
9759         
9760 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
9761
9762         * environment.c|h: Added icall ves_icall_System_Environment_
9763         GetOSVersionString to get the current OS version as a string.
9764         * icall.c: Registred icall.
9765
9766 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
9767
9768         * object.c: in mono_object_get_virtual_method(), take into account that
9769         non-virtual methods don't have a slot in the vtable. Check needed when
9770         the object is a proxy.
9771
9772 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9773
9774         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9775         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9776
9777         * object.c (mono_class_compute_gc_descriptor): Fix warning.
9778
9779         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9780         passed when a valuetype is expected.
9781
9782         * object.c (mono_unhandled_exception): Only set the exit code if the
9783         exception happens in the main thread. Fixes thread5.exe.
9784
9785         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9786         invalid names. Fixes #58047.
9787
9788 2004-05-03  Jackson Harper  <jackson@ximian.com>
9789
9790         * assembly.c: This line was committed accidently and is unneeded.
9791         
9792 2004-05-03  Jackson Harper  <jackson@ximian.com>
9793
9794         * icall.c: Add new icall for Assembly::LoadWithPartialName
9795         * assembly.c/.h: new function that probes the GAC to load partial
9796         assembly names by Paolo Molaro.
9797         
9798 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9799
9800         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9801         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9802         (type_get_fully_qualified_name): Added PublicKeyToken when building a
9803         full type name.
9804
9805 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9806
9807         * appdomain.c: fixed check for 'neutral' culture and removed warning.
9808         * reflection.c: fix bug when parsing a full type name and Version is not
9809         the last thing in the string.
9810
9811 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
9812
9813         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9814         crashes when it is freed.
9815
9816 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9817
9818         * assembly.c: print the compat warning to stderr.
9819
9820 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
9821
9822         * assembly.c (mono_assembly_load_references): Add a compatibility
9823         hack to run old applications that might be still referencing the
9824         3300-based assemblies, only do this for System.xxx.
9825
9826 2004-05-01  Jackson Harper  <jackson@ximian.com>
9827
9828         * appdomain.c: If the culture is neutral we set it to "".
9829         
9830 2004-04-29  Jackson Harper  <jackson@ximian.com>
9831
9832         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9833
9834 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9835  
9836         * string-icalls.c: added low overhead function for copying chars
9837         * icall.c: added needed icall for the above function
9838  
9839 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9840
9841         * icall.c: fix return value of get_global_assembly_cache.  Implemented
9842         Environment.GetLogicalDrives.
9843
9844 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
9845
9846         * rand.c: try and talk to egd or prngd
9847         for random bytes if opening devices fail.
9848
9849 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9850
9851         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9852         alignment for the type using the native alignment of its members 
9853         instead of using klass->min_align.
9854
9855         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9856
9857 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9858
9859         * file-io.c:
9860         * socket-io.c: added check for sys/aio.h.
9861
9862 2004-04-28  Dick Porter  <dick@ximian.com>
9863
9864         * threads.c: Don't abort a thread thats already aborting, when
9865         terminating everything.
9866
9867 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9868
9869         * icall.c: added 2 new async calls for Socket.
9870
9871         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9872         IO on *nix systems.
9873
9874         * threadpool.c: removed unused variable.
9875
9876 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
9877
9878         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9879
9880 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9881
9882         * locales.c: put back string_invariant_tolower () and
9883         string_invariant_toupper ().
9884
9885 2004-04-26 David Waite <mass@akuma.org>
9886
9887         * file-io.h:
9888         * socket-io.h:
9889         * threads.h:
9890         * unicode.h: remove comma from end of enumeration declarations
9891
9892 2004-04-26 David Waite <mass@akuma.org>
9893
9894         * debug-mono-symfile.h:
9895         * decimal.c:
9896         * mono_debug.h:
9897         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9898
9899
9900 2004-04-26  Jackson Harper  <jackson@ximian.com>
9901
9902         * appdomain.c: Increment version number.
9903         
9904 2004-04-26  Jackson Harper  <jackson@ximian.com>
9905
9906         * appdomain.c: Set assembly references public token value when
9907         PublicKeyToken is specified, not the hash_value. Free public token
9908         values when free assembly name data. Previously the public key
9909         token was hex decoded, however we are using hex encoded public key
9910         tokens, so this is not neccasary.
9911         * assembly.c: Lookup assemblies in the gac if their public token
9912         value is set. Add function to allow enabling user gac
9913         lookups. Specify whether or not the assembly was loaded from the
9914         GAC. Compare full assembly names when checking the cache for
9915         assemblies (Temporarily disabled see comment in code). Remove
9916         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9917         specifies trace-loader they get extra info to stdout on the
9918         loading of assemblies.
9919         * image.h: Add a field for an assembly references public token
9920         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9921         whether an assembly has been loaded from the GAC.
9922         * image.c: Remove a corlib -> mscorlib name mapping.
9923         * loader.h: Add function to enable/disable the user gac.
9924         * mono-config.c: Check if the usergac is enabled in the config
9925         file.
9926         * icall.c: New icall to determine whether or not an assembly has
9927         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9928         * tabldefs.h: Add constant for assemblyref flag that specifies a
9929         full public key is used instead of a public token.
9930         * reflection.c: Remove mscorlib -> corlib mappings. Set
9931         PublicTokenValue instead of hash value. This value is a hex
9932         string so it does not need to be expanded.
9933
9934 2004-04-26  Martin Baulig  <martin@ximian.com>
9935
9936         * mono-debug-debugger.c (mono_debugger_initialize): Set
9937         `mono_debugger_initialized' before calling mono_debug_lock().
9938
9939 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
9940
9941         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9942           InternalToUpper/InternalToLower.
9943         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9944           removed invariant culture shortcut.  This is now done in managed code.
9945         * locales.c: (string_invariant_toupper/tolower) removed.
9946
9947 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9948
9949         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9950         Added Poll internal call.
9951
9952         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9953         call for Poll. Select was too heavy for polling a single socket.
9954
9955         * threadpool.[ch]: added mono_threadpool_cleanup.
9956         * threads.c: use it. Don't use Thread_Abort on windows.
9957
9958 2004-04-23  Martin Baulig  <martin@ximian.com>
9959
9960         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9961
9962 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
9963
9964         * icall.c: Registred new icalls for key pair protection and added an
9965         icall for Environment.GetFolderPath on Windows.
9966         * security.c|h: Added new icalls for key pair protection.
9967
9968 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9969
9970         * socket-io.c: don't display the non-supported family warning for known
9971         families. Now this is not displayed on windows when checking support
9972         for IPv4/IPv6.
9973
9974 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9975
9976         * class.c: don't display the layout warning for static fields.
9977
9978 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
9979
9980         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9981         * locales.c, locales.h: Added new icalls for culture-specific
9982         Char.ToLower and Char.ToUpper.
9983
9984 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9985
9986         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9987         by David Waite.
9988
9989 2004-04-20  Martin Baulig  <martin@ximian.com>
9990
9991         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9992         of the type name before passing it to mono_reflection_type_from_name().
9993
9994 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9995
9996         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9997         encodings here. Fixes #56965.
9998
9999 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
10000
10001         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10002         fix test on strstr result not that I can see anything that
10003         relies on the result.
10004
10005 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
10006
10007         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
10008         Fixes #57081.
10009
10010         * marshal.c (mono_marshal_get_string_encoding): New helper function.
10011
10012         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
10013         function to determine which marshalling to use for strings. Fixes
10014         #56965.
10015
10016         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
10017
10018         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
10019
10020 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
10021
10022         * icall.c: #include mono-config.h
10023
10024 2004-04-15  Jackson Harper  <jackson@ximian.com>
10025
10026         * culture-info-tables.h: Fix date formats for en-US culture.
10027         
10028 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
10029
10030         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
10031         ThreadPool.SetMinThreads.
10032         * threadpool.c: Implemented ThreadPool.GetMinThreads and
10033         ThreadPool.SetMinThreads.
10034
10035 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10036
10037         * mono-config.c: also load the .config file in the directory
10038         where the assembly was found.
10039
10040 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10041
10042         * assembly.c: load per-assembly config files.
10043         * icall.c: decrapified code to get the config dir and moved to
10044         mono-config.c.
10045         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
10046         per-assembly config files. When doing a dll map lookup give precedence
10047         to the per-assembly data.
10048
10049 2004-04-14  Martin Baulig  <martin@ximian.com>
10050
10051         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
10052         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
10053         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
10054
10055         * mono-debugger-debugger.c: While the debugger is locked, remember
10056         whether the symbol tables have changes and send one single
10057         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
10058
10059 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
10060
10061         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
10062
10063         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
10064         function.
10065
10066         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
10067         account when marshalling string arrays. Fixes #56965.
10068
10069 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
10070
10071         * icall.c: Add new icalls mapping for security.
10072         * security.c|h: Add internal calls for WindowsIdentity,
10073         WindowsImpersonationContext and WindowsPrincipal.
10074
10075 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
10076
10077         * class.c: Added comment to ensure the System.MonoDummy class
10078         is removed when no longer necessary
10079
10080 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
10081
10082         * appdomain.c: Pass arguments to the bootstraping exceptions to
10083         minimize JITed methods at boot
10084
10085         * metadata.c (mono_exception_from_name_two_strings): Allow for the
10086         second string to be null.
10087
10088         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10089         Change the protocol to minimize the JIT methods at startup.  Now
10090         it Returns the internal codepage, if the value of "int_code_page"
10091         is 1 at entry, and we can not compute a suitable code page
10092         number, returns the code page as a string.
10093
10094 2004-04-13  Jackson Harper  <jackson@ximian.com>
10095
10096         * culture-info-tables.h: Fix number of decimal digits for all
10097         english locales.
10098
10099 2004-04-13  Jackson Harper  <jackson@ximian.com>
10100
10101         * icall.c: Clairfy out of sync error message. It is not always
10102         your corlib that is out of sync.
10103
10104 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
10105
10106         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
10107         properties when only the set accessor is overriden. Fixes #55874.
10108
10109 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
10110
10111         * assembly.c (mono_assembly_load_references): Make this thread safe.
10112         Fixes #56327.
10113
10114 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
10115
10116         * monosn.c: Add missing initialization calls.
10117
10118 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
10119
10120         * locales.c:
10121         ves_icall_System_Globalization_CultureInfo_construct_number_format
10122         Fix g_assert so it compiles on fussier compilers re int/ptr
10123         mismatch
10124
10125 2004-04-08  Dick Porter  <dick@ximian.com>
10126
10127         * socket-io.h:
10128         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
10129         53992.  Also rearrange the code so that the internal calls return
10130         an error value and exceptions are thrown from managed code.
10131
10132         * icall.c: Add type info to the socket icalls.
10133
10134 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10135
10136         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10137         owes me a beer.
10138
10139 2004-04-07  Martin Baulig  <martin@ximian.com>
10140
10141         * class.c (mono_class_from_generic_parameter): Don't default
10142         `klass->parent' to `mono_defaults.object_type'.
10143
10144 2004-04-07  Martin Baulig  <martin@ximian.com>
10145
10146         * reflection.c (mono_reflection_initialize_generic_parameter): Set
10147         `param->pklass->reflection_info'.       
10148
10149 2004-04-07  Jackson Harper  <jackson@ximian.com>
10150
10151         * culture-info-tables.h: Fix date separator symbol.
10152         
10153 2004-04-07  Martin Baulig  <martin@ximian.com>
10154
10155         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10156         from System.Type to System.MonoType.
10157
10158 2004-04-07  Martin Baulig  <martin@ximian.com>
10159
10160         * reflection.h
10161         (MonoReflectionGenericParam): Added `has_reference_type' and
10162         `has_value_type' fields.
10163
10164         * reflection.c (mono_image_get_generic_param_info): Encode the
10165         correct flags if we have the `class' or `struct' constraint.
10166
10167 2004-04-07  Martin Baulig  <martin@ximian.com>
10168
10169         * reflection.h
10170         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10171
10172 2004-04-07  Jackson Harper  <jackson@ximian.com>
10173
10174         * appdomain.c: Revert extra patches, just wanted to bump the
10175         version number.
10176         
10177 2004-04-07  Jackson Harper  <jackson@ximian.com>
10178
10179         * Makefile.am: Add culture-info private headers.
10180         * icall.c: Add new icalls for contructing locales.
10181         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10182         * locales.h: Declare new culture info construction methods.
10183         * object.h: Add new fields used to avoid the CultureMap to
10184         MonoCultureInfo.
10185         * culture-info.h: Definition of structs used in the culture info
10186         tables.
10187         * culture-info-tables.h: Autogenerated tables that contain culture
10188         info data. This file was generated with the locale-builder tool.
10189         * appdomain.c: Incement corlib version number.
10190         
10191 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
10192
10193         * appdomain.c: (mono_runtime_init) move mono_thread_init
10194         to before mono_object_new calls so critical sections
10195         are initialized before use.
10196
10197 2004-04-07  Martin Baulig  <martin@ximian.com>
10198
10199         * icall.c
10200         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10201         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10202         (ves_icall_MonoGenericParam_initialize): Removed.
10203         (monogenericparam_icalls): Removed.
10204         (generictypeparambuilder_icalls): Added new table for
10205         System.Reflection.Emit.GenericTypeParameterBuilder.
10206
10207         * reflection.c
10208         (mono_reflection_define_generic_parameter): Removed.
10209         (mono_reflection_initialize_generic_parameter): This is now called
10210         from GenericTypeParameterBuilder's .ctor.
10211
10212 2004-04-06  Martin Baulig  <martin@ximian.com>
10213
10214         * class.c (mono_class_init): Don't inflate nested classes in a
10215         generic instance.
10216         (mono_type_get_name_recurse): Include the generic arguments for
10217         generic instances and generic type declarations.
10218         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10219         (_mono_class_get_instantiation_name): Removed.
10220         (mono_class_create_generic): Always use `gklass->name' as our name.
10221
10222         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10223
10224         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10225         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10226         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10227         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10228         closed generic methods here.
10229
10230         * reflection.c
10231         (mono_reflection_generic_inst_get_nested_types): Removed.
10232         (inflate_mono_method): Copy the generic parameters from the
10233         MonoMethodHeader into out MonoGenericMethod.
10234
10235 2004-04-06  Martin Baulig  <martin@ximian.com>
10236
10237         * row-indexes.h
10238         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10239
10240         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10241
10242         * reflection.c (build_compressed_metadata): If we have any entries
10243         in the GenericParam, MethodSpec or GenericParamConstraint tables,
10244         set the header version to 1.1.
10245
10246 2004-04-06  Martin Baulig  <martin@ximian.com>
10247
10248         * class.c (mono_class_init): If we're a generic instance,
10249         initialize our nested classes, too.
10250         (_mono_class_get_instantiation_name): Deal with the new `!%d'
10251         suffix. 
10252
10253 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10254
10255         * process.c: quote the argument passed to the shell on windows.
10256
10257 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10258
10259         * threads.c (mono_alloc_special_static_data): Allow this to be
10260         called during startup.
10261
10262 2004-04-02  Martin Baulig  <martin@ximian.com>
10263
10264         * icall.c
10265         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10266
10267 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
10268
10269         * icall.c: Fix build.
10270
10271 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
10272
10273         * Makefile.am: Added security.c|h.
10274         * icall.c: Added icall for get_UserName;
10275         * security.c: New file for security related icalls. Added function
10276         get_UserName for System.Environment (fix #56144).
10277         * security.h: New. Header file for security.c
10278
10279 2004-04-02  Dick Porter  <dick@ximian.com>
10280
10281         * icall.c: Deleted the icalls that were obsoleted some time ago
10282         by the ICU string code, and which were mixed into the icall
10283         rearranging.  Fixes bug 55969.
10284
10285         * string-icalls.h: 
10286         * string-icalls.c: Deleted the code that those icalls reference.
10287
10288 2004-04-01  Martin Baulig  <martin@ximian.com>
10289
10290         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10291
10292         * class.c (mono_class_from_generic_parameter): Don't set 
10293         TYPE_ATTRIBUTE_INTERFACE.
10294         (my_mono_class_from_generic_parameter): Likewise.
10295
10296 2004-04-01  Martin Baulig  <martin@ximian.com>
10297
10298         * loader.c (find_method): Added an optional `MonoClass *ic'
10299         argument to search in a specific interface.
10300         (mono_get_method_constrained): New public function.
10301
10302 2004-04-01  Martin Baulig  <martin@ximian.com>
10303
10304         * reflection.c (mono_image_get_generic_field_token): Use the
10305         `handleref' cache here.
10306
10307 2004-04-01  Martin Baulig  <martin@ximian.com>
10308
10309         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10310
10311         * reflection.c (create_generic_typespec): Use the `typespec' hash
10312         here, not the `typeref' one.    
10313
10314 2004-04-01  Martin Baulig  <martin@ximian.com>
10315
10316         * class.c (mono_class_inflate_generic_type): Moved the
10317         functionality into a new static inflate_generic_type() which
10318         returns NULL if it didn't do anything.  Only increment the
10319         `mono_stats.inflated_type_count' if we actually inflated
10320         something.
10321         (mono_class_get_full): Check the classes type to see whether we
10322         need to inflate it; also inflate MONO_TYPE_(M)VAR.
10323
10324 2004-04-01  Jackson Harper  <jackson@ximian.com>
10325
10326         * reflection.c: Set culture for assembly references.
10327         
10328 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
10329
10330         * reflection.[ch], icall.[ch], Fix support for pinning variables.
10331
10332 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10333
10334         * assembly.c:
10335         (do_mono_assembly_open): the critical section also covers
10336         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10337
10338 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10339
10340         * threads.c:
10341         (mono_manage_threads): abort the background threads when finishing.
10342         Fixes bug #47232.
10343
10344 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10345
10346         * gc.c: only close the done_event handle if there was no timeout.
10347         C-ified comments.
10348
10349 2004-03-30  Martin Baulig  <martin@ximian.com>
10350
10351         * icall.c (icall_entries): It's called "System.Activator", not
10352         "System.Activation".    
10353
10354 2004-03-30  Martin Baulig  <martin@ximian.com>
10355
10356         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10357         (mono_class_create_from_typespec): Likewise.
10358
10359 2004-03-30  Martin Baulig  <martin@ximian.com>
10360
10361         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10362         `has_ctor_constraint' and `initialized'.
10363
10364 2004-03-30  Martin Baulig  <martin@ximian.com>
10365
10366         * reflection.c (encode_new_constraint): New static function to add
10367         the constructor constraint attribute to a type parameter.
10368         (encode_constraints): Call encode_new_constraint() if necessary.
10369
10370         * reflection.h
10371         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10372
10373         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10374         
10375 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
10376
10377         * reflection.c, icall.c: add support for pinning variables. 
10378
10379 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
10380
10381         * marshal.c (mono_marshal_get_managed_wrapper):
10382         init bool local with zero rather than null.
10383
10384 2004-03-29  Martin Baulig  <martin@ximian.com>
10385
10386         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10387         the "official" behavior here.
10388         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10389
10390 2004-03-29  Martin Baulig  <martin@ximian.com>
10391
10392         * icall.c: Reflect latest API changes.
10393
10394 2004-03-29  Martin Baulig  <martin@ximian.com>
10395
10396         * loader.c (mono_get_method_from_token): Also call
10397         mono_metadata_load_generic_params () for abstract and interface
10398         methods; replace the type arguments in the method signature with
10399         the ones which are loaded from the metadata.
10400
10401 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
10402
10403         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10404         of the lock is not the current thread. MS.NET don't do it, in spite of
10405         what the documentation says. See bug #56157.
10406
10407 2004-03-28  Martin Baulig  <martin@ximian.com>
10408
10409         * class.c (mono_class_init): Don't call init_properties() and
10410         init_events() for generic instances; set `prop->parent' when
10411         inflating properties.
10412
10413         * reflection.c (mono_generic_inst_get_object): Call
10414         `mono_class_init (ginst->klass)'.
10415         (mono_type_get_object): Only create a MonoGenericInst if your
10416         generic type is a TypeBuilder.
10417         (do_mono_reflection_bind_generic_parameters): Only set
10418         `ginst->is_dynamic' if our generic type is a TypeBuilder.
10419
10420 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
10421
10422         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10423         Fixes #56091.
10424
10425 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10426
10427         * icall.c: added Kill_internal icall.
10428         * process.[ch]: added Kill_internal icall.
10429
10430 2004-03-25  Martin Baulig  <martin@ximian.com>
10431
10432         * class.h (MonoStats): Added `generic_instance_count',
10433         `inflated_method_count', `inflated_type_count' and
10434         `generics_metadata_size'.       
10435
10436 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10437
10438         * reflection.c: no warnings now.
10439
10440 2004-03-25  Martin Baulig  <martin@ximian.com>
10441
10442         * class.c (mono_class_get_full): New public function; does a
10443         mono_class_get(), but also takes a `MonoGenericContext *'.
10444
10445         * loader.c (mono_field_from_memberref): Renamed to
10446         `field_from_memberref', made static and added `MonoGenericContext *'
10447         argument.
10448         (mono_field_from_token): Added `MonoGenericInst *' argument.
10449         (method_from_memberef): Likewise.
10450         (mono_get_method_from_token): Likewise.
10451         (mono_get_method_full): New public function; does a
10452         mono_get_method(), but also takes a `MonoGenericContext *'.
10453
10454         * verify.c (mono_method_verify): Get the method's generic context
10455         and pass it to mono_field_from_token(), mono_get_method_full() and
10456         mono_class_get_full().
10457
10458 2004-03-25  Martin Baulig  <martin@ximian.com>
10459
10460         * class.c (mono_class_inflate_generic_type): Take a
10461         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10462         `MonoGenericMethod *'.
10463
10464 2004-03-25  Martin Baulig  <martin@ximian.com>
10465
10466         * loader.h (MonoMethodInflated): Store the MonoGenericContext
10467         instead of the MonoGenericMethod here.
10468
10469 2004-03-25  Martin Baulig  <martin@ximian.com>
10470
10471         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10472         each time we create a new MonoGenericInst, we also create a new
10473         context which points back to us.
10474
10475         * class.c (inflate_method): Use `ginst->context' instead of
10476         creating a new context.
10477
10478         * loader.c (method_from_memberref): Use
10479         `klass->generic_inst->context' instead of creating a new context.
10480
10481 2004-03-25  Martin Baulig  <martin@ximian.com>
10482
10483         * class.h (MonoGenericContext): New struct.
10484         (MonoGenericMethod): Removed `generic_inst'.
10485
10486         * class.c (mono_class_inflate_generic_method): Take a
10487         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10488
10489 2004-03-25  Martin Baulig  <martin@ximian.com>
10490
10491         * loader.h (MonoMethodInflated): New typedef.
10492
10493         * metadata.h (MonoMethodSignature): Removed `gen_method', make
10494         `generic_param_count' consume just 30 bits, added `is_inflated'
10495         and `has_type_parameters' flags (one bit each).
10496
10497         * class.c (mono_class_inflate_generic_method): Create a
10498         MonoMethodInflated instead of a MonoMethodNormal and set
10499         `is_inflated' in the method signature.
10500
10501         * class.h (MonoGenericMethod): Removed `generic_method'.
10502
10503 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
10504
10505         * image.c: Make sure the name of a MonoImage is always an absolute path.
10506           This fixes bug #54415.
10507
10508 2004-03-24  Martin Baulig  <martin@ximian.com>
10509
10510         * class.c (mono_class_setup_vtable): If we're a generic instance,
10511         use our generic type's vtable size.
10512
10513 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
10514
10515         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10516         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
10517         problems.
10518
10519 2004-03-23  Martin Baulig  <martin@ximian.com>
10520
10521         * class.h (MonoDynamicGenericInst): Added `int count_events' and
10522         `MonoEvent *events'.
10523
10524         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10525         (typebuilder_icalls): Added "get_event_info"; calls
10526         mono_reflection_event_builder_get_event_info(). 
10527
10528         * reflection.c (mono_reflection_generic_inst_initialize): Added
10529         `MonoArray *events'.
10530         (mono_reflection_event_builder_get_event_info): New function.
10531
10532 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
10533
10534         * object.h: add mono_type_initialization_init
10535
10536         * object.c (mono_runtime_class_init): 
10537         implement class constructor synchronization rules
10538         to cope with threading issues.  
10539         add mono_type_initialization_init
10540
10541         * appdomain.c (mono_runtime_init): call 
10542         mono_type_initialization_init
10543
10544         * class.h: removing initializing field from MonoVTable
10545
10546 2004-03-23  Martin Baulig  <martin@ximian.com>
10547
10548         * class.c (my_mono_class_from_generic_parameter): Use
10549         `param->name' if it's not NULL. 
10550
10551 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
10552
10553         * class.c: do not insert non-virtual methods in the vtable.
10554         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10555         that means the method is non-virtual. This never would have
10556         happened before.
10557
10558 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
10559
10560         * profiler.c: Added lock for accessing coverage_hash.
10561
10562 2004-03-22  Martin Baulig  <martin@ximian.com>
10563
10564         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10565         `method->method->signature->generic_param_count != 0' to make it
10566         work for interface methods.
10567
10568 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10569
10570         * process.c: quote the string passed to the shell using g_shell_quote.
10571
10572 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10573
10574         * threads.c:
10575         (mono_threads_manage): don't remove the finalizer thread and self
10576         from the threads hash table so that mono_thread_manage can be called
10577         more than once.
10578
10579 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10580
10581         * process.c: quote the arguments when UseShellExecute is true. Fixes
10582         bug #55790.
10583
10584 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10585
10586         * threads.c: set mono_thread_detach as a cleanup routine for every
10587         thread. This way it's always executed upon thread termination, either
10588         aborted or finished normally. No more xsp hangs!
10589
10590 2004-03-17  Martin Baulig  <martin@ximian.com>
10591
10592         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10593         `int count_nested' and a `MonoType **nested'.
10594
10595         * reflection.c (mono_reflection_bind_generic_parameters): Moved
10596         most of the functionality into a new static
10597         do_mono_reflection_bind_generic_parameters() and don't take a
10598         `MonoType *nested_in' argument any more.  Don't compute nested
10599         types here.
10600         (mono_reflection_generic_inst_get_nested_types): New public method
10601         to get nested types.
10602
10603         * class.c (mono_class_create_generic): Set `klass->nested_in' if
10604         we're a nested class.
10605
10606         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10607         mono_reflection_generic_inst_get_nested_types() to compute the
10608         nested types.
10609
10610 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10611
10612         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10613         descriptive error message under windows.
10614         
10615 2004-03-17  Martin Baulig  <martin@ximian.com>
10616
10617         * class.c (dup_type): Added `const MonoType *original' argument;
10618         copy the attrs from the original type.
10619
10620 2004-03-17  Martin Baulig  <martin@ximian.com>
10621
10622         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10623         `m->generic_inst_cache' here.
10624
10625 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10626
10627         * exception.h exception.c: Add stack_overflow_exception.
10628
10629 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10630
10631         * threadpool.c:
10632         (overlapped_callback): call SetEvent *after* invoking the callback.
10633         No need to call CloseHandle.
10634
10635 2004-03-16  Martin Baulig  <martin@ximian.com>
10636
10637         * reflection.c (mono_image_get_fieldref_token): Take a
10638         `MonoReflectionField *' instead of a `MonoClassField *' and a
10639         `MonoClass *'; store the `MonoReflectionField *' in the hash.
10640
10641 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10642
10643         * appdomain.c: don't add the culture to the filename we're looking for
10644         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10645
10646 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10647
10648         * locales.c: don't ignore symbols when doing case insensitive compares.
10649         Thanks Dick! Fixes bug #54046.
10650
10651         * threads.c: surround 'threads' usage with enter/leave in
10652         mono_thread_manage.
10653
10654 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
10655
10656         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
10657         implicitly marshalled as [Out]. Fixes #55450.
10658
10659         (mono_marshal_get_runtime_invoke): Zero out the result if there is
10660         an exception.
10661
10662 2004-03-16  Martin Baulig  <martin@ximian.com>
10663
10664         * class.c (mono_class_from_generic_parameter): Use the actual
10665         parameter name. 
10666
10667 2004-03-16  Martin Baulig  <martin@ximian.com>
10668
10669         * reflection.c (type_get_signature_size): New static function.
10670         Compues the size of the type in a method signature.
10671         (method_get_signature_size): New static function; calls
10672         type_get_signature_size() to compute the actual size of the
10673         method's signature.
10674         (method_encode_signature): Use method_get_signature_size() to get
10675         the signature's size rather than using `nparams * 10'.
10676
10677 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10678
10679         * file-io.h: define here WapiOverlapped on windows. I don't want the
10680         regular OVERLAPPED one.
10681
10682         * file-io.c:
10683         * threadpool.c: somehow, BindIoCompletionCallback is not found.
10684         Disabling AIO on windows.
10685
10686 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10687
10688         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10689         bug #55385.
10690
10691 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10692
10693         * appdomain.c: upgraded corlib version.
10694
10695         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10696         and BeginWrite. Allow opening files for asynchrnous operations.
10697
10698         * file-io.h: new struct that maps FileStreamAsyncResult.
10699         * icall.c: added new icalls.
10700         * process.[ch]: support setting child process environment variables
10701         and use the SHELL or COMSPEC when UseShellExecute is true.
10702
10703         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10704         callback for async. IO is here and also BindHandle.
10705
10706         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10707         from here.
10708
10709 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
10710
10711         * reflection.c (create_custom_attr): Allow len == 0.
10712
10713         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10714         computation on big-endian machines.
10715
10716 2004-03-13  Martin Baulig  <martin@ximian.com>
10717
10718         * class.h (MonoGenericInst): Added `int count_ifaces'.
10719
10720         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10721         `ginst->count_ifaces' instead `klass->interface_count' since we
10722         may get called before the vtable is created.
10723
10724         * loader.c (mono_method_get_param_names): If we're a generic
10725         instance, return and don't initialize the class.
10726
10727         * reflection.c (mono_reflection_setup_generic_class): Don't call
10728         ensure_runtime_vtable().
10729         (mono_reflection_bind_generic_parameters): Set
10730         `ginst->count_ifaces'.
10731
10732 2004-03-11  Jackson Harper <jackson@ximian.com>
10733
10734         * icall.c:
10735         * unicode.c:
10736         * unicode.h: Remove unused System.Char icalls.
10737         
10738 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
10739
10740         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10741         code when we P/Invoke the first library in Windows.Forms, instead
10742         of when we first open the assembly.
10743
10744         * assembly.c: Drop the lookup from here.
10745
10746 2004-03-10  Martin Baulig  <martin@ximian.com>
10747
10748         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10749         class for properties, fields and events.  Finally fixes #54945.
10750
10751 2004-03-10  Martin Baulig  <martin@ximian.com>
10752
10753         * metadata.c (mono_metadata_class_equal): New static function;
10754         checks whether two generic instances or two generic parameters are
10755         equal.
10756         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10757         compare classes.        
10758
10759 2004-03-10  Martin Baulig  <martin@ximian.com>
10760
10761         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10762
10763         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10764         argument and write it into the `reflection_info' field.
10765
10766         * icall.c
10767         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10768         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10769
10770 2004-03-09  Jackson Harper  <jackson@ximian.com>
10771
10772         * char-conversions.h: use 8 bits for numeric data its all we need
10773         * icall.c: numeric data is only 8 bits now.
10774
10775 2004-03-09  Martin Baulig  <martin@ximian.com>
10776
10777         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10778
10779         * class.c (init_properties, init_events): Initialize the new
10780         `parent' field.
10781
10782         * reflection.c (typebuilder_setup_properties): Likewise.
10783         (typebuilder_setup_events): Likewise.
10784
10785         * reflection.h (MonoEventInfo): Replaced `parent with
10786         `declaring_type' and `reflected_type'.
10787
10788         * icall.c (ves_icall_get_property_info): Distinguish between
10789         declaring and reflected type.
10790         (ves_icall_get_event_info): Likewise.
10791
10792 2004-03-09  Martin Baulig  <martin@ximian.com>
10793
10794         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10795         (ves_icall_Type_GetField): Correctly set field->klass.
10796
10797 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
10798
10799         * loader.h: Fix warning.
10800
10801 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
10802
10803         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10804         library routine if present.  Notice that it will still continue
10805         executing even if its missing, for those working on the Gtk#
10806         edition of Windows.Forms.
10807
10808         * assembly.c (do_mono_assembly_open): If loading the
10809         System.Windows.Forms call mono_loader_wini_init.
10810
10811 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
10812
10813         * class.h: Added MonoRemoteClass struct.
10814         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10815         function for MonoStrings.
10816         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10817         Added internal call for getting the proxy type.
10818         * marshal.c: Get the type of transparent proxies from its remote_class.
10819         Added methods that generate the IL for type checks and casts:
10820         mono_marshal_get_isinst, mono_marshal_get_castclass, 
10821         mono_marshal_get_proxy_cancast.
10822         * marshal.h: Declaration of the previous new methods.
10823         * object.c: Added new moethods for creating and updating MonoRemoteClass
10824         instances: mono_remote_class, mono_upgrade_remote_class, 
10825         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10826         * verify.c: FIx transparent_proxy_fields layout.
10827         * appdomain.c: Bump corlib version.
10828
10829 2004-03-04  Jackson Harper  <jackson@ximian.com>
10830
10831         * icall.c: Add icall to access char conversion tables.
10832         * char-conversions.h: Character conversion tables.
10833         * Makefile.am: Add char-conversions.h private header file.
10834         
10835 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
10836
10837         * appdomain.c (unload_thread_main): Increase unloading timeout to
10838         10 sec as a temporary workaround for Nant problems.
10839
10840 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
10841
10842         * gc.c: Add checks for GC_enable and GC_disable.
10843
10844         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10845         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
10846         (bug #54988).
10847         
10848 2004-02-27  Martin Baulig  <martin@ximian.com>
10849
10850         * reflection.c (mono_reflection_bind_generic_parameters): Take a
10851         `MonoReflectionType *' instead of a `MonoType *'.
10852
10853 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
10854
10855         * gc.c (run_finalize): Avoid finalizing the object representing the
10856         finalizer thread.
10857         (finalizer_thread): Fix warning.
10858
10859 2004-02-25  Martin Baulig  <martin@ximian.com>
10860
10861         * class.c (_mono_class_get_instantiation_name): Added `int offset'
10862         argument for nested types.
10863         (mono_class_create_generic): Added support for nested generictypes.
10864
10865         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10866         `GList *nested'.
10867
10868         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10869
10870         * reflection.c (method_encode_signature): Increase the minimum
10871         value of `size' from 10 to 11.
10872         (mono_reflection_bind_generic_parameters): Take `int type_argc'
10873         and `MonoType **types' arguments instead of the `MonoArray
10874         *types'; added `MonoType *nested_in'.  Recursively instantiate
10875         nested classes. 
10876
10877 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
10878
10879         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
10880         stack_overflow_ex members which are used by exception handling.
10881
10882         * appdomain.c (mono_runtime_init): Initialize the new members.
10883
10884         * gc.c (mono_gc_enable): New helper function.
10885         * gc.c (mono_gc_disable): New helper function.
10886
10887 2004-02-23  Martin Baulig  <martin@ximian.com>
10888
10889         * icall.c: I must have been really stupid - make it actually work
10890         this time ;-)
10891
10892 2004-02-23  Martin Baulig  <martin@ximian.com>
10893
10894         * loader.c (method_from_memberref): Only inflate the method if
10895         it's in another klass.
10896
10897 2004-02-23  Martin Baulig  <martin@ximian.com>
10898
10899         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10900         (mono_class_init): If we're a generic instance and an interface,
10901         compute `class->interface_id'; also create `class->interfaces'
10902         here and inflate them.
10903
10904         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10905         `ginst->is_open'.
10906         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10907
10908         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10909
10910 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
10911
10912         * reflection.c (method_encode_code): Improved the error message
10913         generated by the exception.
10914
10915 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10916
10917         * icall.c: Martin did not do what he said in the ChangeLog for
10918         2004-02-18, but put back the changes for properties and events.
10919         Commenting those changes out again and adding comment to bug #54518.
10920         
10921         * process.c: removed warning.
10922
10923 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
10924
10925         * marshal.c (emit_struct_conv): Print an error message instead of
10926         asserting when a type does not have the StructLayout attribute.
10927
10928 2004-02-20  Martin Baulig  <martin@ximian.com>
10929
10930         * reflection.c (mono_type_get_object): Also use the cache for
10931         generic instances.
10932         (mono_reflection_bind_generic_parameters): Always compute
10933         `ginst->ifaces'.        
10934
10935 2004-02-20  Martin Baulig  <martin@ximian.com>
10936
10937         * class.h (MonoGenericMethod): Removed `klass'.
10938
10939         * class.c (mono_class_inflate_generic_method): Added `MonoClass
10940         *klass' argument.
10941
10942 2004-02-20  Martin Baulig  <martin@ximian.com>
10943
10944         * reflection.c (method_encode_methodspec): Actually use the
10945         uninflated signature for the memberref.
10946
10947 2004-02-20  Martin Baulig  <martin@ximian.com>
10948
10949         * class.h (MonoGenericMethod): Removed `declaring'.
10950
10951         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10952         is NULL, compute it here.
10953
10954 2004-02-20  Martin Baulig  <martin@ximian.com>
10955
10956         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10957
10958         * metadata.c (mono_metadata_generic_inst_hash): New method.
10959         (mono_metadata_generic_inst_equal): New method.
10960
10961         * reflection.c (mono_reflection_bind_generic_parameters): Use the
10962         `klass->image->generic_inst_cache' cache to avoid creating
10963         duplicate MonoGenericInst's.
10964
10965         * class.c (mono_class_inflate_generic_type): Use the cache.
10966
10967 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10968
10969         * object.c: fixed gc descriptor calculation for embedded valuetypes.
10970
10971 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10972
10973         * icall.c: added Socket.WSAIoctl icall.
10974
10975         * socket-io.[ch]: implemented
10976         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10977
10978 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
10979
10980         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10981
10982 2004-02-18  Urs C Muff  <umuff@quark.com>
10983
10984         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10985         this work on PPC and other big-endian architectures.
10986
10987         * debug-mono-symfile.h: Prepended the names of all the `guint32'
10988         fields with an underscore to make sure they're only accessed by
10989         the read32() macro.
10990
10991 2004-02-18  Martin Baulig  <martin@ximian.com>
10992
10993         * icall.c: Put the klass->refclass changes back for methods and
10994         fields, but not for properties and events.  We're currently not
10995         distinguishing between DeclaringType and ReflectedType for
10996         properties and events, that's what caused the regressions.
10997
10998 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10999
11000         * object.c:
11001         (mono_async_result_new): the handle can be NULL.
11002
11003         * threadpool.c: Use an event instead of a semaphore, don't initialize
11004         it until needed. This saves quite a few semaphores from being created
11005         when using the threadpool.
11006
11007 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
11008
11009         * object.c (mono_string_is_interned_lookup): Fix interning of long
11010         strings. Fixes #54473.
11011
11012         * domain.c (ldstr_equal): Optimize if the two strings are equal.
11013
11014         * icall.c: Revert the klass->refclass changes since they introduce
11015         regressions (bug #54518).
11016
11017 2004-02-18  Martin Baulig  <martin@ximian.com>
11018
11019         * class.c (mono_class_init): If we're a generic instance and don't
11020         come from a TypeBuilder, inflate our members here.
11021         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
11022         (mono_class_create_generic): New public method.
11023         (mono_class_initialize_generic): Removed.
11024         (get_instantiation_name): Renamed to
11025         _mono_class_get_instantiation_name() and made it public.
11026
11027 2004-02-18  Martin Baulig  <martin@ximian.com>
11028
11029         * class.c (mono_class_inflate_generic_type): Clear the new
11030         instance's `nginst->klass' when inflating a generic instance.
11031         (mono_class_is_subclass_of): Added (basic) support for generic
11032         instances.
11033
11034 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
11035
11036         * appdomain.h, domain.c: use a MonoCodeManager instead of a
11037         MonoMempool to hold compiled native code.
11038
11039 2004-02-17  Martin Baulig  <martin@ximian.com>
11040
11041         * class.h (MonoDynamicGenericInst): Added `count_properties' and
11042         `properties'.
11043
11044         * reflection.c (mono_reflection_generic_inst_initialize): Added
11045         `MonoArray *properties' argument.
11046
11047         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
11048
11049 2004-02-17  Martin Baulig  <martin@ximian.com>
11050
11051         * icall.c (ves_icall_Type_GetFields): Renamed to
11052         ves_icall_Type_GetFields_internal() and added a
11053         `MonoReflectionType *rtype' argument; pass it to
11054         mono_field_get_object() to set the field's "reflected" type.
11055         (ves_icall_Type_GetConstructors): Likewise.
11056         (ves_icall_Type_GetEvents): Likewise.
11057         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
11058         argument; pass it to mono_method_get_object() to set the method's
11059         "reflected" type.       
11060
11061 2004-02-17  Martin Baulig  <martin@ximian.com>
11062
11063         * class.h (MonoDynamicGenericInst): New type.
11064         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
11065
11066         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
11067         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
11068         (ves_icall_MonoGenericInst_GetFields): New interncall.
11069
11070         * class.c (mono_class_from_generic): Don't call
11071         mono_class_initialize_generic() if this is a dynamic instance;
11072         ie. it's being created from a TypeBuilder.
11073         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
11074         `class->byval_arg.type'.
11075
11076         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
11077         to `inflate_method' and made static.
11078         (mono_reflection_inflate_field): Removed.
11079         (mono_reflection_generic_inst_initialize): New public method.
11080
11081         * reflection.h (MonoReflectionGenericInst): Removed `methods',
11082         `ctors' and `fields'; added `initialized'.
11083
11084 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11085
11086         * debug-helpers.c (mono_method_full_name): Fix output for empty
11087         namespaces.
11088
11089 2004-02-12  Martin Baulig  <martin@ximian.com>
11090
11091         * class.h (MonoClassField): Added `MonoType *generic_type'.
11092
11093         * reflection.c (mono_image_get_fieldref_token): Added support for
11094         instantiated generic types.
11095         (field_encode_inflated_field): Removed.
11096         (mono_image_get_inflated_field_token): Removed.
11097         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
11098
11099         * reflection.h (MonoReflectionInflatedField): Removed.
11100
11101 2004-02-12  Martin Baulig  <martin@ximian.com>
11102
11103         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
11104         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
11105
11106         * reflection.c (mono_image_get_methodspec_token): Take a
11107         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
11108         (mono_image_create_token): Check whether we have a
11109         `method->signature->gen_method' and call
11110         mono_image_get_methodspec_token() if appropriate.
11111         (inflated_method_get_object): Removed.
11112         (mono_reflection_bind_generic_method_parameters): Return a
11113         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
11114         (mono_reflection_inflate_method_or_ctor): Likewise.
11115
11116         * reflection.h (MonoReflectionInflatedMethod): Removed.
11117
11118 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
11119
11120         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
11121         for custom valuetype marshalling.
11122
11123         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
11124
11125 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11126
11127         * icall.c: fixed WSAGetLastError_internal name.
11128
11129 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11130
11131         * threads.c (mono_thread_attach): Allow this to be called multiple
11132         times for a thread.
11133         
11134         * threads.c (build_wait_tids): Do not wait for ourselves.
11135
11136         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
11137         appdomain list is empty.
11138
11139         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11140         memory returned by mono_string_builder_to_utf16, since it points into
11141         managed memory. Thanks to Bernie Solomon for noticing this.
11142
11143         * icall.c: Add AppDomainSetup icalls.
11144
11145         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11146
11147         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11148         types.
11149
11150         * reflection.c (reflection_methodbuilder_to_mono_method): Save
11151         custom attributes to the method_aux struct. Also fix array indexes etc.
11152
11153         * loader.c (mono_method_get_param_names): Make dynamic case work again.
11154         
11155 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11156
11157         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11158         (both static and runtime) and reduce startup time.
11159
11160 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11161
11162         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11163         AsAny marshalling conversion instead of crashing.
11164
11165         * marshal.c: Fix warnings.
11166
11167 2004-02-09  Martin Baulig  <martin@ximian.com>
11168
11169         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11170
11171         * reflection.h (MonoReflectionInflatedMethod): Removed the
11172         `declaring' field, it's now in the unmanaged MonoGenericMethod.
11173
11174         * reflection.c (method_encode_methodspec): Removed the `method'
11175         argument; we get it from `gmethod->declaring'.
11176         (inflated_method_get_object): Removed the `declaring' argument.
11177
11178 2004-02-09  Martin Baulig  <martin@ximian.com>
11179
11180         * class.h (MonoGenericMethod): New type.
11181         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11182         `generic_method'.
11183
11184         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11185         a `MonoGenericMethod *gen_method' one.
11186
11187         * class.c (mono_class_inflate_generic_type): Take an additional
11188         `MonoGenericMethod * argument.  This is only non-NULL if we're
11189         inflating types for a generic method.   
11190         (mono_class_inflate_generic_signature): Renamed to
11191         inflate_generic_signature() and made static; take a
11192         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11193         (inflate_generic_header): Take a `MonoGenericMethod *' argument
11194         instead of a `MonoGenericInst *' one.
11195         (mono_class_inflate_generic_method): Likewise.
11196
11197         * reflection.c (encode_generic_method_sig): Take a
11198         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11199         (method_encode_methodspec): Likewise.
11200         (inflated_method_get_object): Likewise. 
11201
11202         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11203         field with a `MonoGenericMethod *gmethod' one.  
11204
11205 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
11206
11207         * class.h (mono_class_has_parent): add parens to expansion
11208         so you can ! this.
11209
11210 2004-02-08  Martin Baulig  <martin@ximian.com>
11211
11212         * image.h (MonoImage): Removed `generics_cache'.
11213
11214         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11215         instead of a `MonoType *' argument; removed the `inflate_methods'
11216         argument.  Don't inflate methods here.
11217
11218         * loader.c (find_method): If it's a generic instance, call
11219         mono_class_init() on the `sclass->generic_inst->generic_type'.
11220
11221         * metadata.c (mono_type_size): Make this work on uninitialized
11222         generic instances; call it on the `ginst->generic_type's class.
11223
11224         * reflection.c (mono_reflection_bind_generic_parameters): Call
11225         mono_class_from_generic() to create the `ginst->klass'.
11226
11227 2004-02-08  Martin Baulig  <martin@ximian.com>
11228
11229         * class.h (MonoClass): Changed type of `generic_inst' from
11230         `MonoType *' to `MonoGenericInst *'.
11231
11232 2004-02-08  Martin Baulig  <martin@ximian.com>
11233
11234         * icall.c (ves_icall_Type_BindGenericParameters): Just call
11235         mono_type_get_object(), this is now creating a `MonoGenericInst'
11236         for MONO_TYPE_GENERICINST.
11237         (ves_icall_MonoGenericInst_GetParentType): Likewise.
11238         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11239
11240         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11241         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11242         (inflated_method_get_object): Added `MonoClass *refclass' argument.
11243         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11244         and reflected type.
11245
11246         * reflection.h (MonoReflectionInflatedMethod): Removed
11247         `declaring_type' and `reflected_type'.
11248
11249 2004-02-08  Martin Baulig  <martin@ximian.com>
11250
11251         * class.h (MonoGenericInst): Added `MonoType *parent' and
11252         `MonoType **ifaces'.
11253
11254         * reflection.h (MonoReflectionGenericInst): Removed `klass',
11255         `parent' and `interfaces'.
11256
11257         * reflection.c (mono_reflection_bind_generic_parameters): Take a
11258         `MonoType *' argument and return a `MonoType *'.
11259
11260         * icall.c
11261         (ves_icall_MonoGenericInst_GetParentType): New interncall.
11262         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
11263
11264 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11265
11266         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11267         valuetype marshalling.
11268
11269 2004-02-06  Martin Baulig  <martin@ximian.com>
11270
11271         * class.c
11272         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11273         (my_mono_class_from_generic_parameter): Likewise.
11274
11275 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11276
11277         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11278         contents of the symbol files lazily.
11279
11280         * object.h (MonoThread): Add 'name' and 'name_len' fields.
11281
11282         * threads.h threads.c icall.c: New icalls for getting and setting the
11283         threads name.
11284
11285 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
11286
11287         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
11288         Raise an exception when the domain is not found.
11289
11290 2004-02-03  Martin Baulig  <martin@ximian.com>
11291
11292         * reflection.c (mono_image_get_methodspec_token): Use the
11293         uninflated signature; fixes gen-33.
11294
11295 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11296
11297         * gc.c threads.c: Make the finalizer thread a normal managed thread so
11298         the finalizer code can use thread functionality.
11299
11300         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
11301         the finalizer thread.
11302
11303         * threads.c: Make some functions more robust.
11304
11305         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11306
11307         * metadata.h: Add new marshalling conventions.
11308
11309         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11310         stringbuilder marshalling. Fixes #53700.
11311
11312         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11313
11314         * reflection.c (mono_image_get_type_info): Save declarative security
11315         info.
11316
11317         * reflection.c (mono_image_get_field_info): Handle uninitialized 
11318         unmanaged fields as well.
11319
11320         * appdomain.c: Bump corlib version.
11321
11322 2004-02-01  Martin Baulig  <martin@ximian.com>
11323
11324         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11325         method type arguments.  
11326
11327 2004-01-30  Duncan Mak  <duncan@ximian.com>
11328
11329         * marshal.h: Add prototype for
11330         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11331         and
11332         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11333         fix the build.
11334
11335 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
11336
11337         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11338         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11339
11340 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11341
11342         * marshal.c (mono_marshal_get_native_wrapper): Add support for
11343         custom marshalling of valuetypes.
11344
11345         * marshal.c: Fix some warnings.
11346
11347 2004-01-29  Martin Baulig  <martin@ximian.com>
11348
11349         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11350         for generic method parameters.
11351
11352         * reflection.c (method_encode_methodspec): Write the uninflated
11353         signature into the methodspec table.
11354         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11355         is always the uninflated method.
11356         (reflection_methodbuilder_to_mono_method): Copy the generic
11357         parameters from the MethodBuilder into `header->gen_params'.
11358
11359 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11360
11361         * class.c (mono_class_from_generic_parameter): Fix warning.
11362
11363 2004-01-27  Martin Baulig  <martin@ximian.com>
11364
11365         * class.c (mono_class_from_generic_parameter): Don't create
11366         `klass->methods' here.  
11367
11368 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
11369
11370         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11371         extension since it does not work with libraries named lib<FOO>.dll.so.
11372
11373 2004-01-25  Martin Baulig  <martin@ximian.com>
11374
11375         * class.c (mono_class_inflate_generic_type): Added support for
11376         MONO_TYPE_GENERICINST.
11377
11378         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11379         inflate methods on open constructed types.      
11380
11381 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11382
11383         * object.c: fire ProcessExit event in the root AppDomain after running
11384         Main. Fixes bug #53299.
11385
11386 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11387
11388         * socket-io.c: include the new socket-wrappers.h header.
11389         Use the wrappers instead of the unix socket functions to make the code
11390         more clear.
11391
11392 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11393
11394         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11395
11396         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11397         Fixes #22532.
11398
11399 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
11400
11401         * reflection.c (mono_image_create_pefile): Handle the case when the
11402         entry point is not a MethodBuilder.
11403
11404         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11405         field to ReflectionMethod since it is not allways a builder.
11406
11407         * reflection.c (type_get_fully_qualified_name): New helper function to
11408         return the fully qualified name of a type.
11409
11410         * reflection.c (encode_marshal_blob): Always emit the fully qualified
11411         type name for custom marshallers.
11412
11413         * reflection.c (mono_marshal_spec_from_builder): Ditto.
11414
11415         * class.c (mono_class_setup_vtable): If a parent class already 
11416         implements an interface, use the implementing methods from that class.
11417         Fixes #53148.
11418
11419 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11420
11421         * threadpool.c: just return instead of ExitThread to allow for thread
11422         clean up earlier.
11423
11424 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
11425
11426         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11427         when closing resource modules.
11428
11429         * reflection.c (mono_image_create_pefile): Handle the case when the
11430         entry point is not a MethodBuilder.
11431
11432         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11433         field to ReflectionMethod since it is not allways a builder.
11434
11435 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
11436
11437         * marshal.c (mono_marshal_get_managed_wrapper): 
11438         mono_marshal_alloc takes native int so CONV_I
11439         the arg for 64bits.
11440
11441 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
11442
11443         * reflection.c (fixup_cattrs): New function to fixup the methoddef
11444         tokens in the cattr table. Fixes #53108.
11445
11446 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11447
11448         * loader.c: don't trim ".dll" before looking up in the config file.
11449         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11450
11451 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11452
11453         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
11454         Return the module which contains the resource as well.
11455         (ves_icall_System_Reflection_Module_Close): New icall.
11456
11457         * appdomain.c: Bump corlib version number.
11458
11459         * image.c (mono_image_addref): New public function.
11460
11461         * assembly.c: Call mono_image_addref.
11462
11463         * reflection.c (mono_module_get_object): Increase reference count of 
11464         the image.
11465
11466         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11467         Fixes #22532.
11468
11469         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11470         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
11471         proper exceptions on DllImport problems.
11472
11473 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11474
11475         * class.c, metadata.c: eliminate CSIZE macro.
11476
11477 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
11478
11479         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11480         * object.h: Added async_callback field in MonoAsyncResult.
11481         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11482         * verify.c: Added async_callback in MonoAsyncResult layout.
11483
11484 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
11485
11486         * reflection.c (mono_reflection_get_custom_attrs): Add support
11487         for Modules.
11488
11489 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11490
11491         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
11492         marshalling.
11493         (mono_marshal_method_from_wrapper): Add null pointer check.
11494
11495 2004-01-16  Martin Baulig  <martin@ximian.com>
11496
11497         * debug-mono-symfile.h: Set version number to 36 and reflect
11498         latest symbol writer changes.
11499
11500 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11501
11502         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11503         multi-dimensional arrays.
11504         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11505         (mono_class_from_mono_type): Use bounded_array_class_get.
11506         
11507         * class.c (mono_bounded_array_class_get): New function which takes
11508         a 'bounded' bool argument to distinguish vectors from one dimensional
11509         arrays.
11510
11511         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
11512         bounded_array_class_get if the array has bounds.
11513
11514         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11515         Search modules loaded using AssemblyBuilder:AddModule as well.
11516
11517 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11518
11519         * appdomain.c: increased corlib version.
11520         * filewatcher.c: removed g_print.
11521         * icall.c:
11522         (get_property_info): only allocate what is actually requested.
11523         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11524
11525 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11526
11527         * Makefile.am: added filewatcher.[ch]
11528         * filewatcher.[ch]: FileSystemWatcher runtime support.
11529         * icall.c: added new FSW icalls.
11530
11531 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11532
11533         * string-icalls.c: fix stringbuilder regression as suggested by
11534         Iain McCoy <iain@mccoy.id.au>.
11535
11536 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11537
11538         * process.c (process_read_stringtable_block): Recognize '007f' as
11539         a language neutral stringtable block.
11540
11541 2004-01-12  Patrik Torstensson
11542
11543         * object.h (MonoStringBuilder) : Changed layout to support our
11544         new stringbuilder class.
11545         * marshal.c: Change marshalling to support the new layout of 
11546         string builder.
11547         * appdomain.c: increased version number because new layout of
11548         string builder.
11549
11550 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
11551
11552         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11553         assembly name as an string instead of an AssemblyName, since it is
11554         easier to extract info from it.
11555
11556         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11557         the culture subdirectories too. Fixes #52231.
11558
11559 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11560
11561         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11562         It takes 2 new parameters with an optional name for the method to look
11563         for and case ignoring info.
11564
11565         * threadpool.c: removed unused variable.
11566
11567 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11568
11569         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11570         It takes 2 new parameters with an optional name for the property to look
11571         for and case ignoring info.
11572         Fixes bug #52753.
11573
11574 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11575
11576         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11577         Fix #52451.
11578
11579 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11580
11581         * appdomain.c:
11582         * assembly.c: escape the uri before passing it to g_filename_from_uri.
11583         Fixes bug #52630.
11584
11585 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
11586
11587         * reflection.c: Add support for more than one unmanaged resource.
11588
11589         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11590         in field->def_value, as done in all other cases.
11591
11592         * reflection.c (mono_reflection_get_custom_attrs): Add support for
11593         TypeBuilders.
11594
11595         * reflection.c (mono_reflection_create_runtime_class): Remove 
11596         errorneous assignment to klass->element_class, since it is already
11597         done in mono_reflection_setup_internal_class.
11598
11599 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11600
11601         * gc.c: added missing LeaveCriticalSection.
11602         * icall.c: indented a couple of lines.
11603         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11604         if we call EndInvoke inside a callback. Fixes bug #52601.
11605
11606 2004-01-07  Martin Baulig  <martin@ximian.com>
11607
11608         * mono-debug-debugger.h
11609         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11610
11611 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
11612
11613         * appdomain.c: Use messages in NotImplementedException.
11614
11615         * exception.c (mono_get_exception_not_implemented): Now this takes
11616         a message argument.
11617
11618         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11619         exception instead of g_asserting an aborting when something is not
11620         implemented.
11621
11622         Add some inline docs.
11623
11624 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
11625
11626         * reflection.h: Update after changes to object layout.
11627
11628         * reflection.c: Implement saving of unmanaged aka win32 resources.
11629
11630         * appdomain.c: Bump version number.
11631
11632         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
11633         Handle missing domains gracefully.
11634
11635 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
11636
11637         * file-io.c : On Windows, there are much more invalid_path_chars.
11638
11639 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11640
11641         * class.h, object.c: prepare for GetType () speedup.
11642
11643 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
11644
11645         * profiler.c: workaround for --profile null reference exception on
11646           cygwin. Patch by Patrik Torstensson.
11647
11648 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
11649
11650         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11651         make work for unaligned access.
11652
11653 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11654
11655         * class.c: small cleanup (class->fields [i] -> field).
11656         * image.c: check address of metadata is valid.
11657
11658 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
11659
11660         * assembly.h assembly.c (mono_assembly_loaded): New public function to
11661         search the list of loaded assemblies.
11662
11663         * reflection.c (mono_reflection_type_from_name): Use 
11664         mono_assembly_loaded instead of mono_image_loaded.
11665
11666         * reflection.c: Fix warnings.
11667
11668 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
11669
11670         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
11671         is dynamic. This is needed since an assembly can contain both dynamic and
11672         non-dynamic images.
11673
11674         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
11675         assembly->dynamic.
11676
11677         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11678
11679         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11680         to store modules loaded using AddModule.
11681
11682         * reflection.c (mono_image_fill_file_table): Generalize this so it works
11683         on Modules.
11684
11685         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11686
11687         * reflection.c (mono_image_fill_export_table_from_module): New function to
11688         fill out the EXPORTEDTYPES table from a module.
11689
11690         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11691         into a separate function. Also handle loaded non-dynamic modules.
11692
11693         * reflection.c (mono_image_basic_init): Fix memory allocation.
11694
11695         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11696
11697         * assembly.c (mono_assembly_load_references): Make this public.
11698
11699 2003-12-19  Martin Baulig  <martin@ximian.com>
11700
11701         * class.c (mono_class_initialize_generic): Made this static, take
11702         a `MonoGenericInst *' instead of a `MonoClass *'.
11703         (mono_class_from_generic): Call mono_class_initialize_generic()
11704         unless we're already initialized or being called from
11705         do_mono_metadata_parse_generic_inst().
11706
11707         * class.h (MonoGenericInst): Added `initialized' and
11708         `init_pending' flags.
11709
11710         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11711         `mono_class_init (gklass)' or mono_class_initialize_generic()
11712         here; set `generic_inst->init_pending' while parsing the
11713         `type_argv'.
11714
11715 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
11716
11717         * locales.c: include string.h for memxxx prototypes
11718
11719 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
11720
11721         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11722         constructor when accessing literal fields.
11723
11724 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
11725
11726         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11727
11728         * reflection.c (assembly_add_resource_manifest): New function to fill
11729         the MANIFESTRESOURCE table.
11730
11731         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11732
11733         * reflection.h: Update to changes in class layout.
11734
11735         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
11736         Reenable call to mono_runtime_is_shutting_down ().
11737
11738         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11739         determine if the runtime is shutting down.
11740
11741 2003-12-16  Jackson Harper <jackson@ximian.com>
11742
11743         * icall.c: comment out call to mono_runtime_is_shutting_down to
11744         fix build.
11745         
11746 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
11747
11748         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11749         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11750
11751 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
11752
11753         * reflection.c: move definition of swap_with_size
11754         to before its first call
11755
11756 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
11757
11758         * appdomain.c (mono_runtime_is_shutting_down): New public function.
11759
11760         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11761         icall.
11762
11763         * object.c: Fix warnings.
11764
11765         * icall.c (ves_icall_Type_Get...): Only consider inherited static
11766         members if FlattenHierarchy is set.
11767
11768         * reflection.c (mono_image_add_decl_security): New function to emit
11769         declarative security.
11770
11771         * reflection.h reflection.c: Add support for declarative security.
11772
11773         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11774         
11775 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
11776
11777         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11778         
11779         * appdomain.c verify.c: Moved corlib version checking into its own
11780         function in appdomain.c since it needs to create vtables etc.
11781
11782 2003-12-13  Patrik Torstensson <p@rxc.se>
11783
11784         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
11785         instead of unwrapped server.
11786
11787 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
11788
11789         * verify.c (check_corlib): Fix field index.
11790
11791 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
11792
11793         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11794         GetGacPath icall.
11795
11796 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
11797
11798         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11799         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11800         cope with sizeof(size_t) != sizeof(guint32).
11801
11802 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11803
11804         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11805         in case of failure.
11806
11807 2003-12-10  Mark Crichton <crichton@gimp.org>
11808
11809         * icall.c: removed the GetNonZeroBytes.  We now handle this case
11810         in managed code.
11811
11812         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
11813
11814 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11815
11816         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11817         marked as deleted.
11818
11819 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
11820
11821         * verify.c (check_corlib): Handle the case when the version field is 
11822         initialized by a static constructor.
11823
11824 2003-12-08  Patrik Torstensson  <p@rxc.se>
11825
11826     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11827
11828 2003-12-08  Martin Baulig  <martin@ximian.com>
11829
11830         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11831         a MonoReflectionGenericParameter, also take the parameter index
11832         and name as arguments.
11833         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11834         (ves_icall_MonoGenericParam_initialize): New interncall.
11835         (ves_icall_Type_make_byref_type): New interncall.
11836
11837         * reflection.h (MonoReflectionGenericParam): Derive from
11838         MonoReflectionType, not just from MonoObject.  Added `refobj' and
11839         `index' fields.
11840
11841         * reflection.c (mono_reflection_define_generic_parameter): Create
11842         and return a new MonoReflectionGenericParam; don't initialize the
11843         constraints here.
11844         (mono_reflection_initialize_generic_parameter): New public method;
11845         initializes the constraints and creates the `param->pklass'.
11846
11847 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
11848
11849         * reflection.h reflection.c: Use the new fields 'num_types', 
11850         'num_fields' and 'num_methods' to track the number of types etc.
11851
11852         * verify.c (check_corlib): Check corlib version number.
11853
11854 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
11855
11856         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11857         function works on all methods.
11858
11859 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
11860
11861         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11862         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11863         the custom_type_info flag of the transparent proxy.
11864         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11865         objects that supports IRemotingTypeInfo.
11866         * object.h: Added custom_type_info field in transparent proxy.
11867
11868 2003-12-06  Martin Baulig  <martin@ximian.com>
11869
11870         * class.c (mono_class_create_from_generic): Removed.
11871         (mono_class_from_generic): Check `ginst->klass' before doing
11872         anything else.  This is important to fully support "recursive"
11873         generic types.
11874
11875         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11876         empty `generic_inst->klass' before doing anything else.
11877
11878 2003-12-06  Dick Porter  <dick@ximian.com>
11879
11880         * verify.c: 
11881         * object.h:
11882         * icall.c:
11883         * locales.c: Use C structs to access class fields.  Don't do a
11884         conversion between MonoString and UChar because both are
11885         platform-endian UTF-16.  Compare now takes startindex and count
11886         parameters.  Add a char overload for IndexOf.  Speed up the
11887         invariant string IndexOf.
11888
11889 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
11890
11891         * Makefile.am (monosn_LDADD): Fix parallel build.
11892
11893 2003-12-04  Martin Baulig  <martin@ximian.com>
11894
11895         * icall.c
11896         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11897         (ves_icall_Type_make_array_type): New interncall.       
11898
11899 2003-12-04  Martin Baulig  <martin@ximian.com>
11900
11901         * locales.c: also change it in the !HAVE_ICU case.
11902
11903 2003-12-04  Dick Porter  <dick@ximian.com>
11904
11905         * icall.c:
11906         * locales.c: construct_compareinfo is now in CompareInfo, not
11907         CultureInfo.
11908
11909 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
11910
11911         * image.c (mono_image_load_file_for_image): Cache loaded images in the
11912         image->files array.
11913
11914         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11915         table as well.
11916
11917         * assembly.c (mono_assembly_load_references): Only load references
11918         once.
11919
11920         * class.c (mono_class_from_name): Avoid linear search of the 
11921         EXPORTEDTYPE table.
11922
11923         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11924
11925 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
11926
11927         * image.h (MonoImage): Add 'field_cache' field.
11928
11929         * loader.c (mono_field_from_token): Cache field lookups.
11930         
11931         * reflection.c (mono_module_get_object): Fix name property.
11932
11933         * icall.c (ves_icall_get_enum_info): Update after changes to 
11934         mono_metadata_get_constant_index ().
11935
11936         * icall.c: Get rid of get_type_info icall, use a separate icall for
11937         each type property to avoid needless memory allocations. Fixes #51514.
11938
11939         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11940         to avoid needless binary searches.
11941
11942         * class.c (class_compute_field_layout): Move the initialization of
11943         field->def_value to mono_class_vtable ().
11944
11945         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11946         non-corlib types.
11947
11948         * object.c (mono_object_allocate): Make it inline.
11949
11950         * object.c (mono_object_allocate_spec): Make it inline.
11951         
11952 2003-12-02  Dick Porter  <dick@ximian.com>
11953
11954         * locales.c (create_NumberFormat): NumberFormatInfo construction.
11955         Patch by Mohammad DAMT (mdamt@cdl2000.com).
11956
11957 2003-12-01  Dick Porter  <dick@ximian.com>
11958
11959         * threads.c: Fix signature and call in CreateMutex and
11960         CreateEvent.
11961
11962 2003-12-01  Dick Porter  <dick@ximian.com>
11963
11964         * icall.c: 
11965         * locales.c: Implement string compares and searching
11966
11967         * object.h: Add extra Thread field
11968
11969 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
11970
11971         * reflection.c (fixup_method): Add support for MonoCMethod.
11972
11973 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
11974
11975         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11976
11977         * reflection.c (assembly_name_to_aname): Allow extra characters in
11978         assembly names. Fixes #51468.
11979
11980 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
11981
11982         * exception.c (mono_exception_from_name_domain): New helper function.
11983
11984         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11985         exception object in the correct domain.
11986
11987         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
11988         formatting + make a copy a the input data.
11989
11990         * loader.c (mono_get_method_from_token): Methods which contain
11991         native code do not have entries in the ImplMap.
11992
11993         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11994         Thanks to Gonzalo for spotting this.
11995         
11996         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11997         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11998
11999         * assembly.h (mono_assembly_load_from): Split the second part of 
12000         assembly loading into a new public function.
12001
12002         * exception.h (mono_get_exception_bad_image_format): New function.
12003
12004 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
12005
12006         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12007         Enumerate all modules inside a dynamic assembly. Fixes #51293.
12008         
12009         * icall.c: Add new icall for creating dynamic methods.
12010
12011         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
12012
12013         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
12014
12015         * reflection.c (mono_reflection_create_dynamic_method): New icall to
12016         create a dynamic method.
12017
12018         * reflection.c (resolve_object): New helper function.
12019
12020         * reflection.c: Generalize ReflectionMethodBuilder and the functions
12021         which manipulate it so they can also work on dynamic methods.
12022
12023         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
12024         creating the MonoReflectionMethodAux structure if it is not needed.
12025         
12026         * reflection.h verify.c: Update after changes to object layout.
12027
12028         * reflection.c (method_builder_encode_signature): Fix compilation on
12029         gcc 2.95.x.
12030
12031 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
12032
12033         * appdomain.h: Added support for context static fields. Added static_data
12034           field to MonoAppContext and renamed thread_static_fields to a more
12035           generic special_static_fields in MonoAppDomain, since it can now contain
12036           context static fields.
12037         * domain.c: Updated hashtable name.
12038         * object.c: Replaced field_is_thread_static() for a more generic
12039           field_is_special_static() which also checks for context static attribute.
12040           In mono_class_vtable(), added support for static context fields.
12041         * threads.c: Changed methods that manage thread static fields to more
12042           generic methods so they can be reused both for thread and context static
12043           data.
12044         * threads.h: Declared some new methods.
12045
12046 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
12047
12048         * reflection.h: Update after changes to the managed types.
12049
12050         * reflection.c (encode_custom_modifiers): New helper function.
12051
12052         * reflection.c (method_encode_signature): Emit custom modifiers.
12053
12054         * reflection.c (field_encode_signature): Emit custom modifiers.
12055
12056 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12057
12058         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
12059
12060         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
12061         implementation.
12062
12063         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
12064         icall.
12065
12066         * object.c (mono_field_get_value_object): New function.
12067
12068         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
12069         specific.
12070
12071 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12072
12073         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
12074         return a preallocated out-of-memory exception instance.
12075
12076         * object.c (out_of_memory): Use the new function.
12077
12078         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
12079         flag is before the custom modifiers. Fixes #49802.
12080
12081 2003-11-16  Martin Baulig  <martin@ximian.com>
12082
12083         * class.c (mono_class_is_open_constructed_type): Implemented the
12084         MONO_TYPE_GENERICINST case.
12085
12086 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12087
12088         * assembly.c (mono_assembly_fill_assembly_name): New function to
12089         fill out the MonoAssemblyName structure.
12090         (mono_assembly_open): Use the new function.
12091
12092         * icall.c (fill_reflection_assembly_name): New helper function.
12093
12094         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
12095         new function.
12096
12097         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
12098
12099 2003-11-15  Martin Baulig  <martin@ximian.com>
12100
12101         * class.c (mono_class_is_open_constructed_type): New public
12102         function; checks whether a type is an open constructed type,
12103         ie. whether it still contains type parameters.
12104         (mono_class_inflate_generic_type): If we're a type parameter and
12105         the inflated type is also a MONO_TYPE_(M)VAR, return the original
12106         type.
12107
12108         * class.h (MonoGenericInst): Added `guint32 is_open'.
12109
12110         * loader.c (method_from_methodspec): Check whether we're an open
12111         or closed constructed type and set `ginst->is_open'.
12112
12113         * reflection.c (mono_reflection_bind_generic_parameters): Check
12114         whether we're an open or closed constructed type and set
12115         `ginst->is_open'.
12116         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
12117         from open constructed types.
12118
12119 2003-11-15  Martin Baulig  <martin@ximian.com>
12120
12121         * reflection.c (mono_reflection_bind_generic_parameters): If we're
12122         a generic instance (instead of a generic type declaration) with
12123         unbound generic parameters, bind them to our actual types.
12124
12125 2003-11-14  Martin Baulig  <martin@ximian.com>
12126
12127         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
12128
12129         * reflection.c (mono_reflection_bind_generic_parameters): If we're
12130         an interface type, populate `res->interfaces' with instantiated
12131         versions of all the interfaces we inherit.
12132
12133 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
12134
12135         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12136         when MONO_PATH is set but doesn't contain the install dir.
12137
12138 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12139
12140         * icall.c:
12141         (ves_icall_Type_GetInterfaces): don't return an interface twice when
12142         it's also implemented in base classes. Fixes bug #50927.
12143
12144 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
12145
12146         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12147         if this method is called from a finalizer. Fixes #50913.
12148
12149 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
12150
12151         * threads.c: Implement VolatileRead/VolatileWrite
12152
12153         * icall.c: Add new icalls for VolatileRead/VolatileWrite
12154
12155 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12156
12157         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
12158         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12159         2.95.3.
12160
12161         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
12162         from Peter Ross (pro@missioncriticalit.com).
12163         
12164 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
12165
12166         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12167
12168 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12169
12170         * assembly.c (mono_assembly_load_references): Disable check because it
12171         triggers on older corlibs which lots of people have.
12172
12173 2003-11-12  Jackson Harper  <jackson@ximian.com>
12174
12175         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12176         load corlib.dll if mscorlib.dll is not found.
12177         * assembly.h: Remove corlib name define.
12178         * class.c:
12179         * domain.c:
12180         * image.c: Change corlib name to mscorlib.
12181         
12182 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12183
12184         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12185
12186 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
12187
12188         * appdomain.h: Added loader_optimization here to sync with the C#
12189         code, and add disallow_binding_redirects field.
12190
12191 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12192
12193         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12194
12195         * reflection.c (mono_image_build_metadata): Fix crash on modules
12196         with no types.
12197
12198         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12199
12200         * icall.c (ves_icall_get_method_info): Return callingConvention as
12201         well.
12202
12203         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
12204         namespaces from the EXPORTEDTYPE table as well.
12205
12206         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12207         from all modules inside the assembly.
12208         
12209 2003-11-11  Martin Baulig  <martin@ximian.com>
12210
12211         * reflection.c (mono_reflection_bind_generic_parameters): Make
12212         this work for interfaces.
12213
12214 2003-11-11  Martin Baulig  <martin@ximian.com>
12215
12216         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12217
12218 2003-11-11  Martin Baulig  <martin@ximian.com>
12219
12220         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12221         "MonoInflatedMethod" and "MonoInflatedCtor".
12222
12223 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12224
12225         * reflection.c (resolution_scope_from_image): Use the assembly table
12226         from the manifest module, since other modules don't have it.
12227
12228         * debug-helpers.c (mono_type_full_name): New helper function.
12229
12230         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12231
12232         * image.c (mono_image_load_file_for_image): New public function which
12233         is a replacement for the load_file_for_image in class.c.
12234
12235         * assembly.c (mono_assembly_load_module): A wrapper for the function
12236         above which does assembly association and reference loading too.
12237
12238         * class.c (mono_class_from_name): Call mono_assembly_load_module.
12239
12240 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12241
12242         * appdomain.c: not all of the attributes for the full assembly name
12243         are required and the order doesn't matter. Fixes bug #50787.
12244
12245 2003-11-10  Dick Porter  <dick@ximian.com>
12246
12247         * locales.c: Use platform-endian UTF16
12248
12249 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12250
12251         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12252         
12253 2003-11-10  Martin Baulig  <martin@ximian.com>
12254
12255         * metadata.c
12256         (mono_metadata_load_generic_params): Make this actually work.
12257
12258         * reflection.c (mono_reflection_bind_generic_parameters): If our
12259         parent is a generic instance, pass all the `types' to it, no
12260         matter whether it has the same number of type parameters or not.
12261
12262 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12263
12264         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12265
12266         * assembly.c (mono_assembly_load_references): Move the image<->assembly
12267         assignment code to this function so it gets called recursively for all
12268         modules.
12269
12270         * image.c (load_modules): Remove the assembly assignment since it is
12271         now done by mono_assembly_load_references.
12272         
12273         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12274         Add 'module' argument.
12275         (mono_module_get_types): New helper function.
12276         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12277
12278 2003-11-08  Martin Baulig  <martin@ximian.com>
12279
12280         * class.c (mono_class_inflate_generic_method): Interface method
12281         don't have a header.
12282
12283         * reflection.c (mono_image_get_methodspec_token): Take an
12284         additional `MonoGenericInst *' argument instead of reading it from
12285         the header; this is necessary to support interfaces.
12286         (mono_image_create_token): Pass the `MonoGenericInst *' from the
12287         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12288         (inflated_method_get_object): Take an additional `MonoGenericInst *'
12289         argument.
12290
12291         * reflection.h (MonoReflectionInflatedMethod): Added
12292         `MonoGenericInst *ginst'.
12293
12294 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
12295
12296         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12297
12298 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
12299
12300         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12301
12302 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12303
12304         * reflection.c 
12305         (reflection_methodbuilder_from_method_builder):
12306         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
12307         initialize a ReflectionMethodBuilder structure.
12308         (mono_image_get_methodbuilder_token):
12309         (mono_image_get_ctorbuilder_token): New functions to emit memberref
12310         tokens which point to types in another module inside the same assembly.
12311
12312         * reflection.c: Use the new helper functions.
12313         
12314         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12315
12316         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
12317         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12318
12319         * reflection.c (resolution_scope_from_image): Emit a moduleref if
12320         neccesary.
12321
12322         * reflection.c (mono_image_build_metadata): Emit metadata only for the
12323         current module. Emit the manifest only for the main module.
12324
12325         * reflection.c (mono_image_create_token): Add assertion when a 
12326         memberref needs to be created.
12327
12328         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12329
12330         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
12331         larger buffer for the custom attribute blob. Fixes #50637.
12332         
12333 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12334
12335         * threadpool.c: notify listener on async processing handles after
12336         invoking the async callback. Thanks to Zoltan.
12337
12338 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12339
12340         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
12341         avoid code duplication.
12342
12343         * reflection.h (MonoDynamicImage): New type which is currently unused,
12344         but will be used through the ref.emit code in place of 
12345         MonoDynamicAssembly.
12346
12347         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12348         object layout.
12349
12350         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12351         a MonoDynamicImage instead of just a MonoImage.
12352         
12353         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12354         icalls to ModuleBuilder but keep their semantics, so they will work
12355         with moduleb->assemblyb. This will change later.
12356         
12357 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12358
12359         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12360         object layout.
12361
12362         * reflection.c (mono_image_build_metadata): Avoid creation of a default
12363         main module, since it is now done by the managed code.
12364
12365 2003-11-03  Martin Baulig  <martin@ximian.com>
12366
12367         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12368         `ginst->klass' here.
12369         (method_encode_methodspec): Don't use the `ginst->generic_method's
12370         klass if it's a generic instance, use `ginst->klass' in this case.
12371
12372 2003-11-03  Martin Baulig  <martin@ximian.com>
12373
12374         * reflection.c (mono_image_get_generic_method_param_info):
12375         Removed, use mono_image_get_generic_param_info() instead.
12376         (mono_image_get_type_info): Write the GenericParam table before
12377         the Method table.  This is neccessary because in the GenericParam
12378         table, type parameters of the class (ie. '!0' etc.) must come
12379         before the ones from its generic methods (ie. '!!0' etc).
12380
12381 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12382
12383         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12384
12385 2003-11-02  Martin Baulig  <martin@ximian.com>
12386
12387         * reflection.c (create_generic_typespec): Take a
12388         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12389         the generic parameters from it.
12390
12391 2003-11-02  Martin Baulig  <martin@ximian.com>
12392
12393         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12394         instead of a `MonoClassField *' since we just need the type.
12395         (create_generic_typespec): New static function.  Creates a
12396         TypeSpec token for a generic type declaration.
12397         (mono_image_get_generic_field_token): New static function.
12398         (mono_image_create_token): If we're a FieldBuilder in a generic
12399         type declaration, call mono_image_get_generic_field_token() to get
12400         the token.
12401
12402 2003-11-02  Martin Baulig  <martin@ximian.com>
12403
12404         * reflection.h
12405         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12406         `MonoReflectionGenericInst *declaring_type' and
12407         `MonoReflectionGenericInst *reflected_type' fields.
12408
12409         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12410         `MonoReflectionGenericInst *declaring_type' and a
12411         `MonoReflectionGenericInst *reflected_type' argument instead of a
12412         single `MonoReflectionGenericInst *type' one.  Set
12413         `res->declaring_type' and `res->reflected_type' from them.
12414         (mono_reflection_inflate_field): Likewise.      
12415
12416 2003-11-02  Martin Baulig  <martin@ximian.com>
12417
12418         * class.c (mono_class_setup_vtable): Don't store generic methods
12419         in the vtable.  
12420
12421 2003-11-02  Martin Baulig  <martin@ximian.com>
12422
12423         * reflection.h (MonoReflectionGenericInst): Added
12424         `MonoReflectionType *declaring_type'.
12425
12426         * reflection.c (mono_reflection_bind_generic_parameters): Use
12427         `if (tb->parent)' instead of `klass->parent'.
12428
12429 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
12430
12431         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12432         with an empty ASSEMBLY table.
12433
12434         * reflection.c (mono_image_build_metadata): Avoid using the same loop
12435         variable in the inner and outer loops.
12436
12437 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12438
12439         * metadata.h (mono_metadata_make_token): Put parentheses around macro
12440         argument.
12441
12442         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12443         
12444         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
12445         icalls. Instead, do everything in managed code. This is needed since
12446         it is hard to restore the original domain etc. in unmanaged code in the
12447         presence of undeniable exceptions.
12448
12449         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
12450         New icalls to push and pop appdomain refs.
12451
12452 2003-10-31  Martin Baulig  <martin@ximian.com>
12453
12454         * class.c (inflate_generic_type): Renamed to
12455         mono_class_inflate_generic_type() and made it public.
12456
12457         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12458         New interncall.
12459
12460         * loader.c (mono_field_from_memberref): Also set the retklass for
12461         typespecs.
12462
12463         * fielder.c (mono_image_get_inflated_field_token): New static
12464         method; creates a metadata token for an inflated field.
12465         (mono_image_create_token, fixup_method): Added support for
12466         "MonoInflatedField".
12467         (fieldbuilder_to_mono_class_field): New static function.
12468         (mono_reflection_inflate_field): New public function.
12469
12470         * reflection.h
12471         (MonoReflectionGenericInst): Added `MonoArray *fields'.
12472         (MonoReflectionInflatedField): New typedef.     
12473
12474 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
12475
12476         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12477         for Solaris and other platforms without s6_addr16
12478
12479 2003-10-30  Martin Baulig  <martin@ximian.com>
12480
12481         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12482         argument instead of two.
12483         (mono_class_inflate_generic_signature): Likewise.
12484         (inflate_generic_header): Likewise.
12485         (mono_class_inflate_generic_method): Likewise.  In addition, if
12486         `ginst->klass' is set, it becomes the new `method->klass'.
12487
12488         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12489         field.
12490
12491         * reflection.c (encode_generic_method_sig): Write a 0xa as the
12492         first byte. [FIXME]
12493         (method_encode_methodspec): If we have generic parameters, create
12494         a MethodSpec instead of a MethodRef.
12495         (fixup_method): Added support for "MonoInflatedMethod" and
12496         "MonoInflatedCtor".
12497         (mono_image_create_token): Added support for "MonoInflatedMethod"
12498         and "MonoInflatedCtor".
12499         (inflated_method_get_object): New static function; returns a
12500         managed "System.Reflection.MonoInflatedMethod" object.
12501         (mono_reflection_bind_generic_method_parameters): Return a
12502         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12503         (mono_reflection_inflate_method_or_ctor): Likewise.
12504         (mono_image_get_generic_method_param_info): Initialize unused
12505         fields to zero.
12506         (mono_image_get_generic_param_info): Likewise.
12507
12508         * reflection.h (MonoReflectionInflatedMethod): New public
12509         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
12510         "S.R.MonoInflatedCtor" classes.
12511
12512         * loader.c (method_from_memberref): If we're a TypeSpec and it
12513         resolves to a generic instance, inflate the method.
12514
12515 2003-10-28  Dick Porter  <dick@ximian.com>
12516
12517         * object.c (mono_runtime_run_main): Convert command-line arguments
12518         into utf8, falling back to the user's locale encoding to do so.
12519
12520 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12521
12522         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12523         at this time.
12524
12525         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12526
12527         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12528         up icalls at method definition time. Partially fixes #33569.
12529
12530 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
12531
12532         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12533         marshalling of arrays. Fixes #50116.
12534
12535         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12536
12537         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12538         points to a vtable in the dying appdomain.
12539
12540         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12541         listeners into unmanaged code inside the lock.
12542
12543         * object.c (mono_class_vtable): Turn off typed allocation in non-root
12544         domains and add some comments.
12545
12546 2003-10-25  Martin Baulig  <martin@ximian.com>
12547
12548         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12549
12550         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12551
12552         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12553         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12554         currently parsing.  Create the generic class and store it in
12555         `generic_inst->klass' before parsing the type arguments.  This is
12556         required to support "recursive" definitions; see mcs/tests/gen-23.cs
12557         for an example.
12558         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12559         to support recursive typespec entries.
12560
12561         * class.c (mono_class_setup_parent): If our parent is a generic
12562         instance, we may get called before it has its name set.
12563         (mono_class_from_generic): Splitted into
12564         mono_class_create_from_generic() and mono_class_initialize_generic().
12565
12566 2003-10-25  Martin Baulig  <martin@ximian.com>
12567
12568         * icall.c (ves_icall_Type_BindGenericParameters): Return a
12569         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12570         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12571         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12572
12573         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12574         (create_typespec): Likewise.
12575         (mono_reflection_bind_generic_parameters): Return a
12576         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12577         (mono_reflection_inflate_method_or_ctor): New public function.
12578
12579         * reflection.h (MonoReflectionGenericInst): New typedef.        
12580
12581 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12582
12583         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12584         inside the domain lock. Fixes #49993.
12585         
12586         * object.c (mono_class_vtable): When typed allocation is used, 
12587         allocate vtables in the GC heap instead of in the mempool, since the
12588         vtables contain GC descriptors which are used by the collector even
12589         after the domain owning the mempool is unloaded.
12590
12591         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12592
12593         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12594         reflect what it does. Also invalidate mempools instead of freeing
12595         them if a define is set.
12596
12597         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12598         of the appdomain.
12599         
12600         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12601         hold the finalizable objects in this domain.
12602
12603         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12604         appdomain.
12605
12606         * appdomain.c (mono_domain_set): New function to set the current
12607         appdomain, but only if it is not being unloaded.
12608
12609         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12610         appdomain which is being unloaded.
12611         
12612         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12613         unloading of the root appdomain.
12614
12615         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12616         icall to execute a method in another appdomain. Intended as a 
12617         replacement for InternalSetDomain, which can confuse the code 
12618         generation in the JIT.
12619
12620         * appdomain.c (mono_domain_is_unloading): New function to determine
12621         whenever an appdomain is unloading.
12622
12623         * appdomain.c (mono_domain_unload): New function to correctly unload
12624         an appdomain.
12625
12626         * assembly.c (mono_assembly_load_references): Check that an assembly
12627         does not references itself.
12628
12629         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12630         domain manually, it asks the finalizer thread to do it, then waits for
12631         the result. Also added a timeout.
12632
12633         * icall.c: Register the new icalls.
12634
12635         * threads.h threads.c: Export the mono_gc_stop_world and 
12636         mono_gc_start_world functions.
12637         
12638         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
12639         function to fill out the mempool with 0x2a.
12640
12641 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
12642
12643         * reflection.h (MonoReflectionMethodAux): New structure to store
12644         information which is rarely used, thus is not in the MonoMethod
12645         structure.
12646
12647         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12648         store the aux info.
12649
12650         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12651         and marshalling info into the aux structure.
12652
12653         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12654         from the aux structure.
12655
12656         * loader.c (mono_method_get_param_names): Retrieve the param names from
12657         the aux structure.
12658         
12659 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
12660
12661         * exception.h exception.c: Add AppDomainUnloadedException && fix 
12662         warning.
12663
12664 2003-10-21  Dick Porter  <dick@ximian.com>
12665
12666         * socket-io.c
12667         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12668         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12669
12670 2003-10-21  Martin Baulig  <martin@ximian.com>
12671
12672         * reflection.c (mono_reflection_bind_generic_parameters):
12673         `klass->parent' is NULL for interfaces.
12674
12675 2003-10-21  Martin Baulig  <martin@ximian.com>
12676
12677         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12678
12679 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
12680
12681         * exception.c (mono_exception_from_name_msg): New helper function for
12682         creating exceptions and initializing their message field.
12683
12684         * exception.c: Simplify functions using the new helper.
12685
12686         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12687         New function.
12688
12689         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12690         mono_raise_exception, since otherwise gcc doesn't generate the function
12691         epilog for raise_exception, confusing the stack unwinding in the JIT.
12692         Fixes #45043.
12693
12694         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12695         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12696         Fixes #49499.
12697
12698 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12699
12700         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12701         utf8.
12702
12703 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
12704
12705         * icall.c: Removed GetUninitializedObject method because
12706           AllocateUninitializedClassInstance does the same.
12707
12708 2003-10-18  Martin Baulig  <martin@ximian.com>
12709
12710         * class.c (inflate_generic_signature): Renamed to
12711         mono_class_inflate_generic_signature() and made it public.
12712         (my_mono_class_from_generic_parameter): New static function; if we
12713         don't already have the generic parameter's MonoClass, create a
12714         very simple one which is just used internally in the runtime and
12715         not passed back to managed code.
12716
12717         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12718
12719         * metadata.h (MonoMethodSignature): Moved the
12720         `MonoGenericParam *gen_params' to the MonoMethodHeader.
12721         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12722
12723         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12724         ves_icall_MonoMethod_GetGenericArguments(); this is now an
12725         interncall on the MonoMethod class, not on MethodInfo.
12726         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12727         calling mono_reflection_bind_generic_method_parameters() directly.
12728
12729         * loader.c (mono_method_get_signature): If this is a MethodSpec;
12730         return the already computed `method->signature'.
12731         (method_from_methodspec): New static function to load a method
12732         from a MethodSpec entry.
12733         (mono_get_method_from_token): Call the new method_from_methodspec()
12734         for MethodSpec tokens.  
12735         (mono_get_method_from_token): If we're a generic method, load the
12736         type parameters.
12737
12738         * reflection.c (mono_image_get_memberref_token): Allow
12739         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12740         table.
12741         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12742         (mono_image_create_token): First check whether it's a generic
12743         method (so we'd need to create a MethodSpec), then do the other
12744         two alternatives.
12745         (mono_reflection_bind_generic_method_parameters): Return a
12746         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12747         called directly from the interncall.
12748
12749 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
12750
12751         * reflection.c (load_public_key): Move loading of the public key
12752         into managed code.
12753
12754         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12755
12756         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12757         fields.
12758
12759         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12760         culture, hash_alg and public_key. Fixes #49555.
12761
12762 2003-10-17  Martin Baulig  <martin@ximian.com>
12763
12764         * class.h (MonoGenericInst): Moved this declaration here and added
12765         `MonoMethod *generic_method'.
12766
12767         * icall.c
12768         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12769         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12770
12771         * metadata.c (mono_metadata_type_equal): Two types of
12772         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12773         index; ie. don't compare the address of the `MonoGenericParam'
12774         structure.
12775         (mono_metadata_load_generic_params): Removed the `MonoMethod
12776         *method' argument.
12777
12778         * metadata.h (MonoGenericInst): Moved declaration to class.h.
12779         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12780
12781         * reflection.c (method_encode_signature): Encode the number of
12782         generic parameters.
12783         (encode_generic_method_sig): New static function.
12784         (method_encode_methodspec): New static function; creates an entry
12785         in the MethodSpec table for a generic method.
12786         (mono_image_get_methodspec_token): New static function.
12787         (mono_image_create_token): Call mono_image_get_methodspec_token()
12788         for generic methods.
12789         (mono_reflection_bind_generic_method_parameters): New public
12790         function.  Instantiates a generic method.
12791
12792 2003-10-16  Martin Baulig  <martin@ximian.com>
12793
12794         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12795         *gen_params' here from MonoMethodHeader.
12796
12797         * metadata.c (mono_metadata_parse_method_signature): If we have
12798         generic parameters, initialize `method->gen_params' and then set
12799         the correct `type->data.generic_param' in all the parameters.
12800
12801 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
12802
12803         * threads.c (mono_threads_get_default_stacksize): New function to 
12804         return the default stacksize.
12805
12806         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12807         termination of the finalizer thread, since the previous method had
12808         race conditions. Fixes #49628.
12809
12810         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12811         as for the other managed threads.
12812
12813 2003-10-16  Martin Baulig  <martin@ximian.com>
12814
12815         * class.c (inflate_generic_signature): Copy `generic_param_count'
12816         and `gen_params'.
12817
12818         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12819         New interncall.
12820
12821         * metadata.c (mono_metadata_parse_method_signature): Actually set
12822         the `method->generic_param_count' here.
12823         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12824
12825 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
12826
12827         * object.h: Add a new field to TypedRef to simplify the implementation
12828         of the REFANY opcodes in the JIT.
12829
12830         * icall.c: Make use of the new field.
12831
12832         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12833         dynamically.
12834
12835 2003-10-15  Martin Baulig  <martin@ximian.com>
12836
12837         * class.c (mono_class_from_gen_param): Renamed to
12838         mono_class_from_generic_parameter() and moved most of the
12839         functionality from mono_reflection_define_generic_parameter()
12840         here; ie. we create a "real" class here.
12841         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12842         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12843         previously been called.
12844
12845         * class.h (MonoGenericParam): Moved the declaration of this struct
12846         here from metadata.h and added `MonoMethod *method'.
12847
12848         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12849         interncall.
12850
12851         * loader.c (mono_get_method_from_token): If we have any generic
12852         parameters, call mono_metadata_load_generic_params() to read them
12853         from the MONO_TABLE_GENERICPAR.
12854
12855         * metadata.c (mono_metadata_load_generic_params): Added
12856         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12857
12858         * metadata.h (MonoMethodSignature): Replaced
12859         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12860         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12861
12862         * reflection.c (mono_reflection_define_generic_parameter): Moved
12863         most of the functionality into the new
12864         mono_class_from_generic_parameter(); set the `method' field if
12865         we're a method parameter.       
12866
12867 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
12868
12869         * marshal.c (emit_struct_conv): if native size is 0
12870         emit no code.
12871
12872 2003-10-14  Martin Baulig  <martin@ximian.com>
12873
12874         * icall.c: The generics API has changed in the spec since it was
12875         added to System.Type; these modifications make it match the spec
12876         again.
12877         (ves_icall_Type_GetGenericParameters): Renamed to
12878         `ves_icall_Type_GetGenericArguments'.
12879         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12880         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12881         `ves_icall_MonoType_get_HasGenericArguments'.
12882         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12883         `ves_icall_MonoType_get_IsGenericParameter'.
12884         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12885         this is no interncall anymore.
12886         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12887         `ves_icall_TypeBuilder_get_IsGenericParameter'.
12888
12889 2003-10-14  Martin Baulig  <martin@ximian.com>
12890
12891         * reflection.c (mono_reflection_bind_generic_parameters): Also
12892         inflate generic methods if we're reading the class from IL.
12893
12894 2003-10-13  Martin Baulig  <martin@ximian.com>
12895
12896         * reflection.c (mono_reflection_define_generic_parameter): This
12897         method isn't called directly from the icall anymore; take a
12898         `MonoReflectionAssemblyBuilder *' so we can use this for type and
12899         method generic parameters.
12900         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12901         (method_builder_encode_signature): Encode generic parameters.
12902         (mono_image_get_method_info): Write generic params to the
12903         MONO_TABLE_GENERICPARAM table.
12904
12905         * reflection.h (MonoReflectionMethodBuilder): Added
12906         `MonoArray *generic_params'.
12907
12908         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12909
12910         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12911         wrapper for mono_reflection_define_generic_parameter().
12912         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
12913
12914 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
12915
12916         * marshal.h: Add missing function to fix build.
12917
12918         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
12919         the SetLastError pinvoke attribute.
12920
12921         * marshal.c (mono_marshal_set_last_error): New helper function called
12922         by the generated code.
12923         
12924         * marshal.c (mono_mb_emit_branch): New helper function.
12925
12926         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12927
12928         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12929         classes as parameters and return values of delegates. Fixes #29256. 
12930
12931 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
12932
12933         * locales.c: use gint32 in non HAVE_ICU case
12934
12935 2003-10-11  Martin Baulig  <martin@ximian.com>
12936
12937         * mono-debug.c (mono_debug_add_method): Added a workaround for
12938         bug #48591.
12939
12940 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
12941
12942         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12943         delegates passed to native code must use the STDCALL calling 
12944         convention. Fixes #35987.
12945
12946 2003-10-10  Martin Baulig  <martin@ximian.com>
12947
12948         * class.c (inflate_generic_type): If we're inflating for a generic
12949         type instance (and not for a generic method), return
12950         MONO_TYPE_MVAR unchanged.
12951
12952 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12953
12954         * string-icalls.c: Join ignores null strings in the source array.
12955         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12956         * threads.c: GetAvailableTheads is slightly more accurate.
12957
12958 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
12959
12960         * threads.h threads.c : add mono_threads_set_default_stacksize
12961         and pass default to CreateThread calls.
12962
12963 2003-10-09  Dick Porter  <dick@ximian.com>
12964
12965         * icall.c:
12966         * locales.h:
12967         * locales.c: Internal calls for constructing CultureInfo and
12968         related objects from libicu (if its available.)
12969
12970 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
12971
12972         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12973
12974 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12975
12976         * threadpool.c: added an argument to async_invoke_thread that is the
12977         item to process, pass the MonoAsyncResult to the thread start function
12978         when creating a new thread. This way we don't need to acquire any lock
12979         when we're creating a new thread. Readded a semaphore for faster
12980         response times (instead of that Sleep i added).
12981
12982 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
12983
12984         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12985         get daylight change dates better on Windows, fix handling
12986         of platforms without tm_gmtoff.
12987
12988 2003-10-06  Martin Baulig  <martin@ximian.com>
12989
12990         * class.c (inflate_generic_method): Renamed to
12991         mono_class_inflate_generic_method() and made public.
12992         (mono_class_init): Don't inflate the generic methods here.
12993         (mono_class_from_generic): Added `gboolean inflate_methods'
12994         argument.  Inflate the methods here.
12995
12996         * loader.c (mono_method_get_param_names): Ignore instances of
12997         generic types for the moment.
12998
12999         * reflection.c (fixup_method): Added support for inflated methods.
13000         (mono_image_create_token): Use mono_image_get_methodref_token()
13001         for inflated methods.
13002         (mono_custom_attrs_from_param): Ignore instances of generic types
13003         for the moment.
13004         (mono_reflection_bind_generic_parameters): New public function.
13005         Moved all the functionality from
13006         ves_icall_Type_BindGenericParameters() here and added support for
13007         dynamic types.
13008         (mono_reflection_define_generic_parameter): Initialize
13009         `klass->methods' here.
13010
13011         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
13012         functionality into mono_reflection_define_generic_parameter().
13013         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
13014         TypeBuilder, return that TypeBuilder.
13015
13016 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13017
13018         * appdomain.c: removed mono_delegate_semaphore.
13019
13020         * threadpool.c:
13021         (mono_thread_pool_add): moved hash table creation inside and the thread 
13022         creation outside of the critical region.
13023         (mono_thread_pool_finish): removed obsolete code.
13024         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
13025         continue or exit the thread depending on the queue.
13026
13027 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
13028
13029         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
13030         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
13031         handle more bool marshalling options
13032
13033 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
13034
13035         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
13036         arrays of structs. Also add a more descriptive error message when
13037         a structure member is marshalled as LPArray.
13038
13039 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13040
13041         * marshal.c (mono_marshal_get_native_wrapper): Add support for
13042         marshalling arrays of complex types. Fixes #29098. Also remove an
13043         usused and incomplete function.
13044
13045 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13046
13047         * gc.c: report heap_size - free_bytes as total memory allocated
13048         (bug#49362).
13049
13050 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13051
13052         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
13053         fix timezone handling problems on Windows.
13054         
13055         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
13056         asserts when the year is outside the range handled by ms the functions.
13057
13058         * class.c (setup_interface_offsets): If the class is an interface,
13059         fill out its interface_offsets slot.
13060
13061 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13062
13063         * threadpool.c: mark threadpool threads as background.
13064
13065 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
13066
13067         * decimal.c - define DECINLINE to nothing if not using GCC
13068
13069 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * assembly.c: More refcount fixes.
13072
13073 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13074
13075         * string-icalls.c: if we're not trimming, return the same string.
13076         When not splitting, don't create a new string.
13077
13078 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13079
13080         * image.c:
13081         (mono_image_open): increment the ref_count inside the critical section.
13082
13083 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
13084
13085         * image.c (mono_image_open): Fix reference counting bug.
13086
13087 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
13088
13089         * marshal.c (mono_marshal_type_size) struct alignment changed for 
13090         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
13091         64bits. Avoid leak in mono_marshal_get_native_wrapper when
13092         mono_lookup_pinvoke_call throws.        
13093
13094 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13095
13096         * reflection.c (mono_reflection_parse_type): Fix #49114.
13097
13098         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
13099         temporary workaround for cygwin header problem.
13100
13101         * object.c (mono_object_isinst): Synchronize this with the code
13102         generated by the JIT for casts.
13103
13104 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13105
13106         * reflection.c (encode_type): Fix #38332.
13107
13108 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13109
13110         * marshal.c (mono_marshal_method_from_wrapper): New function to return
13111         the original method from the wrapper method.
13112
13113 2003-09-25  Martin Baulig  <martin@ximian.com>
13114
13115         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
13116         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
13117         (ves_icall_Type_get_IsGenericInstance): New interncall.
13118
13119 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
13120
13121         * object.c: fix cast warning in big endian code.
13122
13123 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
13124
13125         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
13126         
13127 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13128
13129         * assembly.c: don't call check_env from mono_assembly_load. It's
13130         already done once in mono_assemblies_init and may cause headaches when
13131         multiple threads are loading assemblies.
13132
13133 2003-09-19  Martin Baulig  <martin@ximian.com>
13134
13135         * reflection.c (mono_reflection_define_generic_parameter): Don't
13136         allocate `klass->methods', set `klass->flags' to
13137         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13138
13139 2003-09-18  Martin Baulig  <martin@ximian.com>
13140
13141         * class.c (mono_class_init): Don't create `class->methods' if it's
13142         already initialized.
13143
13144         * metadata.c (mono_metadata_load_generic_params): Make this
13145         actually work.
13146
13147         * reflection.c (mono_reflection_define_generic_parameter): Set
13148         parent class and interfaces from the constraints.
13149
13150         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13151         to keep this struct in sync with the declaration in TypeBuilder.cs.
13152
13153 2003-09-17  Martin Baulig  <martin@ximian.com>
13154
13155         * metadata.h (MonoType): Replaced the data's `int type_param'
13156         field with `MonoGenericParam *generic_param'.
13157         (MonoGenericParam): Added `MonoClass *klass'.
13158
13159         * class.c (mono_class_from_gen_param): Removed the
13160         `MonoImage *image' and `int type_num' arguments.
13161
13162         * metadata.c (mono_metadata_parse_generic_param): New static
13163         method; creates a MonoGenericParam which just contains the index.
13164         (do_mono_metadata_parse_type): Call
13165         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13166         MONO_TYPE_MVAR.
13167
13168         * reflection.c (mono_image_typedef_or_ref): Generic type
13169         parameters may be in the same assembly, but never use a typedef
13170         for them.
13171         (mono_reflection_define_generic_parameter): We're now creating a
13172         "real" class for the type parameter; it's now safe to call
13173         mono_class_from_mono_type() on the class'es type, it'll do the
13174         right thing.
13175
13176 2003-09-16  Martin Baulig  <martin@ximian.com>
13177
13178         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13179         `symfile->range_entry_size' and `symfile->class_entry_size' here;
13180         the `symfile' data structure must be fully initialized before it
13181         gets added to the table.
13182
13183 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13184
13185         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13186
13187         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13188         class init trampolines.
13189
13190 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13191
13192         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13193         to the built-in profiler to turn off time and allocation profiling
13194         respectively.
13195
13196 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13197
13198         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13199         g_direct_equal.
13200
13201         * debug-helpers.c (mono_method_full_name): Print the wrapper type
13202         in human readable form.
13203
13204 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13205
13206         * reflection.c icall.c: Fixed warnings.
13207
13208         * image.c (load_class_names): Use a temporary hash table to hold the
13209         namespaces in order to avoid doing many string comparisons.
13210
13211         * image.h: Fix typo.
13212
13213         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13214         Pass NULL instead of g_direct_equal to the GHashTable constructor 
13215         since the NULL case is short-circuited inside g_hash_table_lookup, 
13216         leading to better performance.  
13217
13218         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13219         obtain the first custom attribute for a given index. Depends on the
13220         CustomAttribute table being sorted by the parent field.
13221
13222         * reflection.c (mono_custom_attrs_from_index): Use the new function 
13223         for better performance.
13224
13225 2003-09-07  Martin Baulig  <martin@ximian.com>
13226
13227         * class.c (mono_class_init): If we're a generic instance, inflate
13228         all our methods instead of loading them from the image.
13229         (mono_class_from_generic): Set `class->methods = gklass->methods'.
13230
13231 2003-09-07  Martin Baulig  <martin@ximian.com>
13232
13233         * mono-debug-debugger.c: Added support for constructors.
13234
13235 2003-09-06  Martin Baulig  <martin@ximian.com>
13236
13237         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13238         New interncall.
13239
13240         * reflection.c (mono_reflection_setup_generic_class): Call
13241         ensure_runtime_vtable() to create the vtable.
13242
13243 2003-09-05  Martin Baulig  <martin@ximian.com>
13244
13245         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13246         MONO_TYPE_MVAR.
13247
13248 2003-09-04  Martin Baulig  <martin@ximian.com>
13249
13250         * reflection.c (mono_reflection_define_generic_parameter): Generic
13251         parameters start with zero.
13252
13253 2003-09-04  Martin Baulig  <martin@ximian.com>
13254
13255         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13256
13257         * reflection.h (MonoReflectionGenericParam): New typedef.
13258         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13259         the generic parameters from the managed TypeBuilder.
13260
13261         * reflection.c (mono_reflection_define_generic_parameter): New function.
13262         (mono_reflection_create_runtime_class): Encode generic parameters.
13263         (mono_reflection_setup_generic_class): New function; this is
13264         called after adding adding all generic params to the TypeBuilder.
13265         (encode_type): Added MONO_TYPE_VAR.
13266
13267 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13268
13269         * class.h class.c (mono_class_needs_cctor_run): Moved this method
13270         here from the JIT.
13271
13272         * assembly.h assembly.c: Moved the AOT loading code into an assembly
13273         load hook.
13274
13275 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
13276
13277         * reflection.h reflection.c class.h class.c: Delete duplicate 
13278         definition of mono_type_get_name () from reflection.c and export the
13279         one in class.c.
13280
13281         * class.c: Class loading fixes from Bernie Solomon 
13282         (bernard@ugsolutions.com).
13283
13284         * reflection.c: Endianness fixes from Bernie Solomon 
13285         (bernard@ugsolutions.com).
13286         
13287 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13288
13289         * assembly.h assembly.c: Define a file format version for AOT
13290         libraries.
13291         
13292         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13293
13294         * appdomain.h (MonoJitInfo): New field to determine whenever the
13295         code is domain neutral.
13296         
13297 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
13298
13299         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13300
13301 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13302
13303         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
13304         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13305         Avoid caching the result since strings must be domain specific. Fixes
13306         #48050.
13307
13308 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13309
13310         * marshal.c (mono_marshal_init): Make this callable multiple times
13311         since it is hard to find a correct place to call it.
13312
13313         * object.c (mono_runtime_class_init): Execute static constructors in
13314         the correct appdomain.
13315
13316         * image.c (build_guid_table): Handle the case when multiple images have
13317         the same GUID.
13318
13319 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13320
13321         * icall.c: added a couple of icalls for System.Web.
13322
13323 2003-08-28  Martin Baulig  <martin@ximian.com>
13324
13325         * icall.c (ves_icall_Type_BindGenericParameters): Use
13326         `klass->generic_inst' instead of `&klass->byval_arg' in the
13327         mono_type_get_object() call.  The returned type must be
13328         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13329
13330 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13331
13332         * NOTES: New file.
13333
13334         * object.c (mono_class_proxy_vtable): Make it thread safe.
13335
13336         * pedump.c: Fix warning.
13337
13338         * object.c appdomain.h: Get rid of metadata_section. 
13339         It is no longer needed and it was causing deadlocks with domain->lock.
13340
13341         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13342
13343 2003-08-26  Martin Baulig  <martin@ximian.com>
13344
13345         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13346
13347 2003-08-26  Martin Baulig  <martin@ximian.com>
13348
13349         * pedump.c (main): Call mono_metadata_init(),
13350         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13351         and mono_loader_init().
13352
13353 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
13354
13355         * loader.h: Add missing include to fix build.
13356
13357         * image.h: mono_image_load_references is no more.
13358
13359         * assembly.c: Reworked assembly loading to make it really thread safe.
13360         After these changes, the assembly returned by mono_assembly_open is
13361         fully initialized, i.e. all its references assemblies are loaded.
13362
13363         * assembly.c (mono_image_load_references): Renamed to 
13364         mono_assembly_load_references, and made private, since clients no
13365         longer need to call it.
13366
13367         * class.c: Removed calls to mono_assembly_load_references, since it was
13368         a source of deadlocks.
13369
13370         * loader.h loader.c class.h class.c: Protect data structures using a 
13371         new lock, the loader lock.
13372
13373         * class.c (mono_class_setup_vtable): Create temporary hash tables and
13374         GPtrArrays only when needed.
13375
13376         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
13377         into empty structures by mcs. Fixes pinvoke7.cs.
13378         
13379         * domain.c (mono_init): Call a new initialization function.
13380
13381         * appdomain.c (mono_runtime_init): Call the new initializer function
13382         of the marshal module.
13383
13384         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13385         inserted into empty structures by mcs. Fixes pinvoke7.cs.
13386
13387         * marshal.h marshal.c: Added locks around the wrapper caches to make
13388         this module thread safe.
13389
13390         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13391         this argument. Fixes pinvoke1.exe.
13392
13393 2003-08-25  Lluis Sanchez <lluis@ximian.com>
13394
13395         * object.h: Added call_type field to MonoMethodMessage and the corresponding
13396         enumeration of values. Removed fields to store remote call output values in
13397         MonoAsyncResult. Not needed any more.
13398         * object.c: Initialize call_type and async_result fields in mono_message_init.
13399         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13400         dispatching the message.
13401         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13402         async call to finish. To do it use a message with EndInvoke call type.
13403
13404 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13405
13406         * loader.h loader.c (mono_method_hash_marhal_info): New function which
13407         determines whenever a method has marshalling info.
13408
13409 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13410
13411         * assembly.c: fix the build on windows.
13412
13413 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13414
13415         * object.cs: Fixed bug #47785.
13416
13417 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13418
13419         * string-icalls.c (StringReplace): If their are no occurances of
13420         the old string found return a reference to the supplied
13421         string. This saves some memory and matches MS behavoir.
13422         
13423 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13424
13425         * socket-io.c: fixed compilation for systems that define AF_INET6
13426         and don't define SOL_IP/SOL_IPV6.
13427
13428 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
13429
13430         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13431         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13432
13433         * rawbuffer.c rawbuffer.h: Make this module thread safe.
13434
13435         * domain.c: Make this module thread safe.
13436
13437         * domain.c (mono_init): Call new initialization function.
13438
13439         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13440         reference types too. Fixes #38812.
13441
13442         * image.c (mono_image_init): Fixed warnings.
13443
13444         * class.c (mono_class_from_typeref): Handle assembly load failure
13445         correctly.
13446
13447         * appdomain.c (add_assemblies_to_domain): Handle the case when
13448         the references of an assembly are not yet loaded.
13449
13450         * metadata.c image.c assembly.c: Moved initialization of global
13451         variables to a separate function called at startup since lazy 
13452         initialization of these variables is not thread safe.
13453         
13454         * image.c assembly.c: Made this module thread safe by adding locks in 
13455         the appropriate places.
13456
13457         * domain.c (mono_init): Call the new initialization functions of the
13458         three modules.
13459
13460 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
13461
13462         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13463           make a direct call. It is proxy's work to make the call asynchronous.
13464           mono_delegate_end_invoke(): If the targe is a proxy, just collect
13465           the return values.
13466         * object.cs: mono_method_call_message_new(): read AsyncResult and
13467           state object from parameters list, if this info is requested.
13468         * object.h: Added fields to store remote call output values in
13469           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13470
13471 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13472
13473         * object.h: add needed fields to MonoThread.
13474         * threads.c, threads.h: allow registering a function to cleanup data
13475         allocated per thread by the JIT.
13476
13477 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13478
13479         * loader.h: portability fix by Bernie Solomon
13480         * <bernard@ugsolutions.com>.
13481
13482 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
13483
13484         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
13485         return a MonoArray. This simplifies the code and also ensures that
13486         the cache allways contains an object reference as a value.
13487
13488         * icall.c (ves_icall_get_parameter_info): Simplified using the new
13489         function.
13490
13491 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13492
13493         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13494         fixes a problem with byte ordering when getting the address family for
13495         a socket.
13496
13497 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
13498
13499         * .cvsignore: Added monosn.
13500
13501         * reflection.h reflection.c loader.c: Added support for parameter
13502         marshalling to dynamically created types. Fixes #47295.
13503
13504 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13505
13506         * rand.c: remove useless warnings.
13507
13508 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13509
13510         * class.c: implemented ldtoken for methods and fieldrefs.
13511
13512 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13513
13514         * threadpool.c: when mono_async_invoke was called, no one took care of
13515         monitoring the queue. So if the method invoked took some time and we
13516         got new async invoke requests after 500 ms (the thread created waited
13517         that long in WaitForSingleObject), the new async invoke was not called
13518         until the previous one finished.
13519
13520         This is fixed now. Thanks to Totte for helping with it.
13521
13522 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13523
13524         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13525
13526 2003-08-11  Martin Baulig  <martin@ximian.com>
13527
13528         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13529
13530 2003-08-06  Martin Baulig  <martin@ximian.com>
13531
13532         * mono-debug-debugger.c: Added support for static fields,
13533         properties and methods.
13534
13535 2003-08-06  Martin Baulig  <martin@ximian.com>
13536
13537         * mono-debug-debugger.c: Don't store the MonoString's vtable to
13538         make this work for applications with multiple application domains.
13539
13540 2003-08-04  Martin Baulig  <martin@ximian.com>
13541
13542         * mono-debug-debugger.c: Completely reworked the type support; the
13543         most important thing is that we're now just using one single
13544         `MonoType' instance per type.
13545
13546 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13547
13548         * mono-endian.h, mono-endian.c, icall.c: Added icall
13549         ves_icall_System_Double_AssertEndianity to assert double word endianity
13550         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13551
13552 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13553
13554         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13555         support, icalls and fixes.
13556
13557 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
13558
13559         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13560         classes that are a punctuation character in .NET is not the same a
13561         g_unichar_ispunct.
13562
13563 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13564
13565         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13566
13567 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
13568
13569         * icall.c: Add new MemCopy internalcall.
13570         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13571         Simplified code; It is not necessary to handle all the cases here,
13572         as the C# code takes care of it.  Only handle the case of the name
13573         resource embedded into the assembly.
13574
13575         Changed signature to return the data pointer and the size of the
13576         data. 
13577
13578 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
13579
13580         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13581         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13582
13583 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13584
13585         * socket-io.c: ignore EINTR error in select.
13586
13587 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13588
13589         * class.h, class.c: removed unused subclasses field in MonoClass.
13590
13591 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13592
13593         * icall.c: improve fix of get_base_definition(). If the parent class
13594           doesn't have the mehod, look at the parent of the parent.
13595         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13596           to check if a parameter is an in or out parameter
13597           (PARAM_ATTRIBUTE_IN is not set by default).
13598           mono_method_return_message_restore(): Use mono_class_value_size to
13599           get the size of a value type. mono_type_stack_size (parameterType)
13600           does not return the correct value if parameterType is byRef.
13601           mono_load_remote_field(), mono_load_remote_field_new(),
13602           mono_store_remote_field(), mono_store_remote_field_new():
13603           raise exception if the remote call returns an exception.
13604
13605 2003-07-28  Martin Baulig  <martin@ximian.com>
13606
13607         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13608         method.  This is a wrapper around mono_runtime_invoke() which
13609         boxes the instance object if neccessary.
13610
13611 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13612
13613         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13614         metadata.h, row-indexes.h, verify.c: first cut of generics support.
13615
13616 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13617
13618         * icall.c: disable mcs bug workaround.
13619
13620 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13621
13622         * object.c (mono_runtime_class_init): Take the metadata_section
13623         mutex before obtaining the domain mutex.
13624
13625         * appdomain.h: Added definition of metadata_section mutex here. 
13626
13627         * object.c: define metadata_mutex here.
13628
13629 2003-07-24  Ravi Pratap  <ravi@ximian.com>
13630
13631         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13632         fixed.
13633
13634 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
13635
13636         * reflection.c: Fix bug #46669
13637
13638 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13639
13640         * exception.c:
13641         * exception.h:
13642         * icall.c:
13643         * object.h: fill in the type name for TypeLoadException.
13644
13645 2003-07-23  Ravi Pratap  <ravi@ximian.com>
13646
13647         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13648         relationship between TypeBuilders while compiling corlib) and bug
13649         45993 (Array types returned from the runtime while compiling
13650         corlib were from the loaded corlib).
13651
13652 2003-07-22  Martin Baulig  <martin@ximian.com>
13653
13654         * mono-debug-debugger.c: Reworked the type support a bit more;
13655         distinguish between types and classes.
13656
13657 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13658
13659         * icall.c: add IsArrayImpl icall.
13660
13661 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
13662
13663         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13664         initializing real_size only once. Also fix bug #46602.
13665
13666 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
13667
13668         * object.c: Renamed mono_metadata_section to metadata_section.
13669
13670 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
13671
13672         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13673           empty array if the type is an array. Fixed.
13674           ves_icall_MonoMethod_get_base_definition: if the base method
13675           is abstract, get the MethodInfo from the list of methods of
13676           the class.
13677         * reflection.c: ParameterInfo.PositionImpl should be zero-based
13678           and it was 1-based. Fixed in mono_param_get_objects.
13679
13680 2003-07-20  Martin Baulig  <martin@ximian.com>
13681
13682         * mono-debug.h: Set version number to 31.
13683         (mono_debug_init): Added `MonoDomain *' argument.
13684
13685         * mono-debug-debugger.c: Reworked the type support; explicitly
13686         tell the debugger about builtin types; pass the `klass' address to
13687         the debugger.
13688
13689 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13690
13691         * image.c: Allow new metadata tables to be loaded without a
13692         warning. Also update the warning message to give the new constant value.
13693                 
13694 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13695
13696         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13697         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
13698         array type representation changes.
13699
13700 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13701
13702         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13703         on Environment.Exit () call.
13704
13705 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13706
13707         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13708         requires a matching corlib.
13709
13710 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13711
13712         * Changelog: My editor decided to add a CR to each line. Sorry about that.
13713           Committed again without the CRs.
13714         
13715 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
13716
13717         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13718           getting it from the "this" socket instance. Did not work
13719           if the socket is a subclass of Socket.
13720           Also fixed bug #35371.
13721
13722 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13723
13724         * metadata.c: fixed size for TypedByRef.
13725         * loader.c: when searching for a method, consider the vararg amrker.
13726         * unicode.c, decimal.c: constify some arrays.
13727
13728 2003-07-15  Dick Porter  <dick@ximian.com>
13729
13730         * socket-io.c: Fixed compilation for gcc < 3.2.
13731
13732         Fixed compilation for machines that don't have AF_INET6 (thanks to
13733         Bernie Solomon <bernard@ugsolutions.com> for that part.)
13734
13735         Fixed compile warnings.
13736         
13737         Fixed formatting and line endings.
13738
13739 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
13740
13741         * socket-io.h:
13742         * socket-io.c: Added IPv6 support.
13743
13744 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
13745
13746         * class.c (mono_class_is_assignable_from): New function to implement
13747         the is_assignable_from logic. Used by mono_object_isinst, 
13748         Type::IsAssignableFrom () and the interpreter.
13749
13750         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13751         Object, even interfaces.
13752         
13753         * object.c (mono_object_isinst): Implement in terms of 
13754         is_assignable_from.
13755
13756         * icall.c (ves_icall_type_is_assignable_from): New icall.
13757
13758 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
13759
13760         * domain.c (foreach_domain): fix compiler warning.
13761
13762 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
13763
13764         * image.c (load_metadata_ptrs): use g_strndup because strndup is
13765         not available on all plattforms
13766
13767 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
13768
13769         * image.h image.c: Store the metadata version string in MonoImage.
13770         * icall.c: New icall to retrieve the image version.
13771         * reflection.c (create_dynamic_image): Fill in the image version field
13772         * reflection.c (build_compressed_metadata): Use the image version
13773         from the image structure.
13774
13775 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13776
13777         * appdomain.c: modified comment.
13778         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13779         That will be its last iteration when mono_gc_cleanup is called from
13780         mono_runtime_cleanup and before the domain is unloaded.
13781
13782         Fixes bug #45962.
13783
13784 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
13785
13786         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13787         attributes.
13788
13789 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13790
13791         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13792         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13793         Bernie Solomon <bernard@ugsolutions.com>.
13794
13795 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13796
13797         * object.c, object.h: provide mono_object_new_fast() for faster
13798         allocation in some special cases.
13799
13800 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13801
13802         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13803         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13804
13805 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13806
13807         * threadpool.c: fix leaks.
13808
13809 2003-07-01  Dick Porter  <dick@ximian.com>
13810
13811         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13812         using MonoGHashTables.  Fixes threadpool bug posted to list.
13813
13814 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13815
13816         * image.h, image.c: added support to load an assembly from a byte array.
13817         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
13818         assembly bundle support.
13819
13820 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
13821
13822         * threadpool.c (mono_thread_pool_add): keep a reference to the
13823         AsyncResult to prevent GC
13824
13825 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13826
13827         * class.c: leak fix.
13828
13829 2003-06-25  Dick Porter  <dick@ximian.com>
13830
13831         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13832         for the async object, the WaitHandle object will close the handle.
13833         Fixes bug 45321.
13834
13835 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13836
13837         * class.c: in mono_array_class_get (), lookup from the hash with the
13838         same type we insert: this works around a bug in
13839         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13840         lluis. The real fix will have to wait for after the release.
13841
13842 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13843
13844         * icall.c: fix memory leak when getting type members.
13845
13846 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13847
13848         * reflection.c: added more pubtoken special cases.
13849
13850 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13851
13852         * class.c: handle field offset correctly when class size
13853         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13854
13855 2003-06-20  Martin Baulig  <martin@ximian.com>
13856
13857         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13858         *image' field.
13859
13860 2003-06-20  Martin Baulig  <martin@ximian.com>
13861
13862         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13863
13864 2003-06-20  Martin Baulig  <martin@ximian.com>
13865
13866         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
13867         just distinguish between variables in registers and variables at
13868         an offset relative to a register.
13869
13870 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13871
13872         * icall.c: #ifdef out latest changes until mcs is fixed.
13873
13874 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13875
13876         * icall.c: return members in metadata order.
13877
13878 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13879
13880         * icall.c: avoid infinite loop in GetTimeZoneData.
13881
13882 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13883
13884         * icall.c: added Marshal.Prelink/All icalls.
13885
13886 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13887
13888         * object.c, object.h: fix warnings and do some overflow checking
13889         when creating arrays.
13890
13891 2003-06-17  Dick Porter  <dick@ximian.com>
13892
13893         * file-io.h:
13894         * file-io.c: File attributes need to be tweaked slightly when
13895         passed from the managed to the w32 world.
13896
13897 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13898         * profiler.h profiler-private.h profiler.c: Rework last patch
13899         based on suggestion by Paolo.
13900         
13901 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13902
13903         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
13904         instruction level coverage data collection.
13905         * profiler.h profiler.c (: Added new callback function which can be
13906         used by the profiler to limit which functions should have coverage
13907         instrumentation.
13908         * profiler.c (mono_profiler_load): Call g_module_build_path to
13909         generate the file name of the profiler library.
13910
13911 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13912
13913         * profiler.c, profiler.h, profiler-private.h: added basic block 
13914         coverage profiling API.
13915
13916 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
13917
13918         * reflection.c (mono_reflection_create_runtime_class): Add support
13919         for events in dynamically generated code.
13920
13921         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13922         not allocated.
13923
13924 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13925
13926         * icall.c: when getting timezone info, return reasonable values if we
13927         can't get the actual data.
13928
13929 2003-06-14  Dick Porter  <dick@ximian.com>
13930
13931         * threads.c (start_wrapper): Remove the reference to the thread
13932         object in the TLS data, so the thread object can be finalized.
13933         This won't be reached if the thread threw an uncaught exception,
13934         so those thread handles will stay referenced :-( (This is due to
13935         missing support for scanning thread-specific data in the Boehm GC
13936         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13937
13938 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13939
13940         * reflection.c: ensure streams and tables are first allocated with
13941         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13942
13943 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13944
13945         * icall.c: fixed GetElementType for byrefs (bug# 44792).
13946
13947 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
13948
13949         * reflection.c (mono_reflection_create_runtime_class): Add support for
13950         properties to dynamically created classes.
13951         * reflection.c: Fix a few places where non-MonoObjects were inserted
13952         into the tokens hashtable.
13953
13954 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13955
13956         * object.c: some support to handle out of memory exceptions.
13957
13958 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
13959
13960         * marshal.c (mono_marshal_get_native_wrapper): support reference
13961         return types
13962
13963 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13964
13965         * object.h, object.c: more portability stuff from Bernie Solomon.
13966         Unexport mono_object_allocate(). Added mono_object_unbox ().
13967         Set exitcode when an unhandled exception is thrown.
13968
13969 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
13970
13971         * marshal.c (mono_marshal_get_native_wrapper): use custom
13972         marshaler for return types.
13973
13974 2003-06-10  Dick Porter  <dick@ximian.com>
13975
13976         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13977         ip_mreq is available
13978
13979 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13980
13981         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13982         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13983         by Bernie Solomon <bernard@ugsolutions.com>.
13984
13985 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
13986
13987         * gc.c (mono_gc_init): Avoid error message on shutdown when
13988         GC_DONT_GC=1 is used.
13989
13990         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
13991         New icall to return the GUID of a module.
13992
13993 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13994
13995         * class.c: ensure instance size always includes the parent's size
13996         even whem class size is set explicitly (fixes bug#44294).
13997
13998 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13999
14000         * profiler.h, profiler.c: made the simple profiler thread-safe,
14001         get more accurate timing info. Allow the loading of an
14002         externally-developed profiler module.
14003
14004 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
14005
14006         * marshal.c (mono_marshal_get_native_wrapper): improved
14007         class/byref arguments.
14008         (mono_marshal_get_native_wrapper): better string marshaling support.
14009
14010 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14011
14012         * class.c: ensure .pack and .size are handled correctly and
14013         simplified layout of static fields.
14014
14015 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14016
14017         * appdomain.c
14018         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
14019
14020         * loader.c (mono_lookup_pinvoke_call): look for modules in the
14021         current directory (fix bug 44008)
14022
14023 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
14024
14025         * marshal.c (mono_marshal_get_native_wrapper): started support for
14026         custom marshalers.
14027         (mono_delegate_to_ftnptr): consider marshalling specifications
14028
14029 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14030
14031         * reflection.c, reflection.h: emit custom marshal info.
14032
14033 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14034
14035         * object.c: free the GError.
14036         * icall.c: added CloseEvent_internal.
14037         * threads.[ch]:
14038         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
14039         call.
14040
14041 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
14042
14043         * loader.c (mono_method_get_signature): Add support for dynamic
14044         assemblies.
14045
14046 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14047
14048         * reflection.c: fixed bug #43905.
14049
14050 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14051
14052         * class.c, domain.c, icall.c, metadata.h, object.h: support for
14053         handling TypedReference and ArgIterator.
14054         * loader.c, loader.h: added function to get signature at call site.
14055
14056 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14057
14058         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
14059         data readonly. Buglets and warning fixes. Some MethodSpec support.
14060
14061 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14062
14063         * class.h, class.c, object.c: remove relative numbering support.
14064
14065 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
14066
14067         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
14068         free the string, until we get a chance to fix Gtk#
14069
14070 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14071
14072         * marshal.c: revert last patch.
14073
14074 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14075
14076         * icall.c: updates for new mono_class_vtable() not calling
14077         the type constructor anymore.
14078
14079 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14080
14081         * object.h, object.c: separate vtable creation from type
14082         initialization. Make running the .cctor thread safe.
14083
14084 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14085
14086         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
14087
14088 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14089
14090         * loader.c (mono_get_method): consider calling convention
14091
14092 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
14093
14094         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
14095         to return the invisible global type for a module.
14096
14097         * reflection.c (mono_image_build_metadata): Emit global fields too.
14098
14099 2003-05-20  Peter Williams  <peterw@ximian.com>
14100
14101         * loader.c (mono_lookup_internal_call): Add a few newlines.
14102
14103 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
14104
14105         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
14106         literal strings.
14107
14108         * appdomain.c (set_domain_search_path): Recalculate search path when
14109         AppDomainSetup.PrivateBinPath changes.
14110
14111         * object.c (mono_class_compute_gc_descriptor): It turns out some
14112         parts of the class libs (like System.Thread) holds pointers to
14113         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
14114         to treat native int a pointer type here.
14115         
14116 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
14117
14118         * appdomain.h, domain.c: add hashtable for jump target resolution.
14119
14120 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
14121
14122         * reflection.h reflection.c icall.c: Added new icalls 
14123         GetManifestResourceInfoInternal, GetModulesInternal and support
14124         infrastructure.
14125
14126 2003-05-16  Dick Porter  <dick@ximian.com>
14127
14128         * icall.c:
14129         * file-io.h:
14130         * file-io.c: Implement System.IO.MonoIO::GetTempPath
14131
14132 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
14133
14134         * object.c: mono_store_remote_field: little fix to previous patch.
14135
14136 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14137
14138         * class.c: add constructors to array classes.
14139         * icall.c: special case array construction for InternalInvoke (),
14140
14141 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
14142
14143         * class.h class.c reflection.c object.c: Added support for field
14144         defaults in dynamically generated classes.
14145
14146 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14147
14148         * reflection.c: properly encode charset for ddlimport.
14149
14150 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14151
14152         * threads.c: allow compiling without GC.
14153
14154 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14155
14156         * appdomain.h, object.c, object.h, threads.c, threads.h: added
14157         handling of thread static data.
14158
14159 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14160
14161         * reflection.h, reflection.c: added mono_custom_attrs_free ().
14162
14163 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14164
14165         * class.c (mono_array_class_get): always set the serializable flags
14166         (mono_array_class_get): always set the SEALED attribute for array types
14167
14168 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
14169
14170         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14171         attributes (fix for bug 42021).
14172
14173 2003-05-12  Dick Porter  <dick@ximian.com>
14174
14175         * gc.c: Don't run finalizers when the finalizer thread is
14176         finishing up, because the default domain has already been
14177         destroyed.
14178
14179 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
14180
14181         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14182         value is null, we should throw an exception.   This is slightly
14183         different than the other conventions used for the constructor.
14184
14185 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14186
14187         * socket-io.c: fixed windows build.
14188
14189 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14190
14191         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14192
14193 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
14194
14195         * object.c (mono_string_new_wrapper): Compatibility fix for MS
14196         compilers.
14197
14198 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
14199
14200         * class.c (mono_class_layout_fields): Add experimental GC aware
14201         auto layout facility. Requires class library changes to work correctly.
14202
14203         (mono_class_setup_vtable): Avoid overriding explicit interface
14204         method implementations. Fixes iface3.exe test.
14205
14206         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14207         object reference.
14208         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14209         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14210
14211         * metadata.h: Add new type classification macro which determines
14212         whenever the type holds an object reference.
14213
14214 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14215
14216         * marshal.c (mono_marshal_get_native_wrapper): cleanups
14217
14218 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
14219
14220         * gc.c (finalizer_thread): Work around a GC bug.
14221
14222 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
14223
14224         * marshal.c (emit_struct_conv): allow unions
14225
14226         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14227
14228 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
14229
14230         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14231
14232 2003-05-06  Martin Baulig  <martin@ximian.com>
14233
14234         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14235
14236 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14237
14238         * socket-io.c:
14239         (Select_internal): allow NULLs, don't create arrays if not needed.
14240         Coupled with Socket.cs changes.
14241
14242         * threadpool.c:
14243         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14244         register a finalizer for it that will close the semaphore handle. This
14245         fixes the leak and make Lupus' test run with > 4080 loops.
14246
14247 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14248
14249         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14250         Jerome Laban (bug #42287)
14251
14252 2003-05-02  Martin Baulig  <martin@ximian.com>
14253
14254         * debug-mono-symfile.h
14255         (MonoSymbolFile): Moved declaration into mono-debug.h.
14256         (MonoDebugMethodJitInfo): Likewise.
14257         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14258         argument.
14259         (_mono_debug_address_from_il_offset): Take a
14260         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14261
14262         * mono-debug.h
14263         (MonoDebugDomainData): New struct.
14264         (mono_debug_get_domain_data): New function.
14265         (mono_debug_add_method): Take an additional `MonoDomain *'
14266         argument.
14267         (mono_debug_source_location_from_address): Likewise.
14268         (mono_debug_il_offset_from_address): Likewise.
14269         (mono_debug_address_from_il_offset): Likewise.
14270
14271 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14272
14273         * reflection.c: one more check for null type in custom attrs.
14274
14275 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14276
14277         * reflection.c: avoid warning (comparison is always false due to limited
14278         range of data type).
14279
14280 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14281
14282         * icall.c: throw an exception in Type.GetField if the argument 'name'
14283         is NULL.
14284
14285 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14286
14287         * reflection.c: fixed handling of enums in named arguments to custom
14288         attributes (bug #42123).
14289
14290 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14291
14292         * reflection.c: use the right array element type and handle
14293         a null for a Type argument, too.
14294
14295 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14296
14297         * reflection.c: handle arrays as arguments to custom attributes.
14298
14299 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14300
14301         * reflection.c: handle a string value in a custom attr
14302         ctor that takes an object.
14303
14304 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14305
14306         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14307         (fix bug #42063)
14308
14309 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14310
14311         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14312
14313 2003-04-27  Martin Baulig  <martin@ximian.com>
14314
14315         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14316         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14317         MONO_DEBUGGER_EVENT_BREAKPOINT.
14318         (mono_breakpoint_trampoline_code): Removed.
14319         (mono_debugger_event_handler): The last argument is now a
14320         `guint32'.
14321         (mono_debugger_insert_breakpoint_full): Removed the
14322         `use_trampoline' argument.
14323         (mono_debugger_method_has_breakpoint): Likewise.
14324         (mono_debugger_trampoline_breakpoint_callback): Renamed to
14325         mono_debugger_breakpoint_callback(); take the method and
14326         breakpoint number as arguments.
14327
14328 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14329
14330         * metadata.c: fix off by one when loading parameters attributes.
14331
14332 2003-04-24  Martin Baulig  <martin@ximian.com>
14333
14334         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14335
14336 2003-04-24  Martin Baulig  <martin@ximian.com>
14337
14338         * mono-debug-debugger.c: Moved all code which interacts with the
14339         Mono Debugger here.
14340
14341         * debug-mono-symfile.c: This code now just deals with the symbol
14342         file itself, the debugger code is now in mono-debug-debugger.c.
14343
14344 2003-04-23  Martin Baulig  <martin@ximian.com>
14345
14346         * mono-debug.c (mono_debug_source_location_from_il_offset):
14347         New method; like mono_debug_source_location_from_address(), but
14348         takes an IL offset instead of a machine address.
14349
14350 2003-04-23  Martin Baulig  <martin@ximian.com>
14351
14352         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14353         `line' field; this is now computed by the debugger.
14354
14355 2003-04-23  Martin Baulig  <martin@ximian.com>
14356
14357         * mono-debug.[ch]: New files.  This is the new debugging interface.
14358
14359         * mono-debug-debugger.[ch]: New files.  Moved all code which
14360         interacts with the Mono Debugger here.
14361
14362 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14363
14364         * domain.c (mono_init): initialize mono_defaults.monitor_class
14365
14366 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
14367
14368         * reflection.c (method_encode_code): Add a spicy exception to help
14369         future compiler authors.
14370
14371 2003-04-21  Martin Baulig  <martin@ximian.com>
14372
14373         * icall.c
14374         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14375         Make this work with relative pathnames; g_filename_to_uri() needs
14376         an absolute filename.
14377
14378 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
14379
14380         * icall.c: Track name changes in Object and ValueType.
14381
14382 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
14383
14384         * metadata.c (mono_type_stack_size): size should be a multiple of
14385         sizeof (gpointer)
14386
14387 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14388
14389         * gc.c:
14390         (internal_domain_finalize): moved into mono_domain_finalize. No need
14391         to create another thread because the finalizers will be run in the
14392         finalizer thread.
14393         
14394         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14395         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14396         to be run (MS does this too).
14397
14398 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14399
14400         * object.c (mono_class_compute_gc_descriptor): Update comment.
14401
14402         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14403
14404         * image.h: Add synchronized wrapper cache.
14405
14406         * image.c (do_mono_image_open): Initialize cache.
14407
14408         * reflection.c (create_dynamic_mono_image): Initialize cache.
14409
14410 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14411
14412         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14413         ves_icall_System_Buffer_ByteLengthInternal.
14414
14415 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14416
14417         * reflection.c: setup klass->nested_in earlier. Allow
14418         a dash in the assembly name.
14419
14420 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
14421
14422         * metadata.c (mono_type_to_unmanaged): dont access
14423         type->data.klass for MONO_TYPE_OBJECT
14424         (mono_type_to_unmanaged): consider System.Delegate class
14425
14426 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14427
14428         * class.c: just setup supertypes in the proper place instead of
14429         initializing the full element class for arrays.
14430
14431 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14432
14433         * class.c: ensure the element class of arrays is initialized.
14434         Setup the supertype info for array classes, too.
14435
14436 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
14437
14438         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14439
14440 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14441
14442         * Makefile.am: re-added -m option when running cygpath. This way,
14443         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14444         separator.
14445         * mono-config.c: same codepath for locating mono config file for WIN32
14446         and the rest.
14447         * assembly.c: if mono_assembly_setrootdir is called, don't override
14448         the value set.
14449
14450 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14451
14452         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14453         MONO_ASSEMBLIES variable.
14454
14455 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14456
14457         * icall.c: added Assembly::GetNamespaces() icall.
14458
14459 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14460
14461         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14462
14463 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
14464
14465         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14466         * object.c: fixed bug in the construction of vtable for proxies
14467
14468 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14469
14470         * object.c (mono_array_new): Mark mono_array_new as an icall.
14471
14472 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14473
14474         * class.c: fixed test for public method when overriding interfaces.
14475         Closes bug #40970.
14476
14477 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14478
14479         * appdomain.h, domain.c: added mono_domain_foreach() to
14480         be able to access the currently loaded appdomains.
14481         * object.c: make string interning work across sppdomains.
14482         Mark some functions for use as icalls.
14483
14484 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14485
14486         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14487
14488         * reflection.h reflection.c: Allocate long living data using 
14489         GC_MALLOC_ATOMIC so the collector does not need to scan it.
14490
14491         * reflection.c: Double the allocation size in streams instead of
14492         increasing it, to prevent unneccesary copying on large assemblies.
14493         
14494         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14495         creation if the assembly does not have the Run flag set.
14496
14497 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14498
14499         * class.h: avoid the C++ keywords in header files (Jerome Laban
14500         spotted and fixed this).
14501
14502 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14503
14504         * object.c:
14505         (mono_unhandled_exception): fill in the arguments for the
14506         UnhandledException event. Only trigger that event for the default
14507         domain (as MS does).
14508
14509 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
14510
14511         * object.c: Improve typed allocation stuff based on suggestions from
14512         Paolo. Also turn it on if the GC library supports it.
14513
14514 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14515
14516         * object.c object.h class.h: Added experimental typed allocation
14517         facility using the interfaces in gc_gcj.h.
14518
14519         * os/gc_wrapper.h: Added new include files.
14520         
14521 2003-04-03  Martin Baulig  <martin@ximian.com>
14522
14523         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14524         which is not yet enabled by default.
14525
14526         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14527         functions.
14528         (mono_gc_lock, mono_gc_unlock): New static functions.
14529
14530         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14531         functions; stop/start the world for the garbage collector.  This
14532         is using the windows API; we need to complete the SuspendThread()/
14533         ResumeThread() implementation in the io-layer to make this work on Unix.
14534         (mono_gc_push_all_stacks): New public function; tells the garbage
14535         collector about the stack pointers from all managed threads.
14536
14537 2003-04-03  Martin Baulig  <martin@ximian.com>
14538
14539         * object.h (MonoThread): Added `gpointer stack_ptr'.
14540
14541         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14542
14543 2003-04-03  Martin Baulig  <martin@ximian.com>
14544
14545         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14546
14547 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14548
14549         * reflection.c (typebuilder_setup_fields): Initialize field.first and
14550         field.last.
14551
14552 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
14553
14554         * loader.c (mono_lookup_internal_call): Report the corlib that is
14555         out of sync.
14556
14557 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
14558
14559         * icall.c (ves_icall_type_GetTypeCode): fixed check for
14560         System.DBNull (it's class not valuetype).
14561
14562 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14563
14564         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
14565         if the array method was already assigned a token (fixes bug#40646).
14566
14567 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
14568
14569         * reflection.c (mono_reflection_get_type): Attempt type resolve even
14570         if no assembly is given.
14571
14572 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
14573
14574         * metadata.h: Added the new tables.
14575
14576         * row-indexes.h: Added definitions for new tables.
14577
14578         * metadata.c: Add schemas for new tables, and add support for
14579         computing the sizes of them.
14580
14581         * class.c: Update for handling the new type cases.
14582
14583 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
14584
14585         * metadata.h (MONO_TYPE_IS_VOID): new macro
14586
14587 2003-03-31  Martin Baulig  <martin@ximian.com>
14588
14589         * threads.h (MonoThreadCallbacks): Added `thread_created'.
14590
14591         * threads.c (mono_thread_new_init): Call `thread_created' in the
14592         mono_thread_callbacks.
14593
14594 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
14595
14596         * loader.h: added marshalbyrefobject_class to mono_defaults
14597         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
14598         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14599           generation of output parameters.
14600           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14601         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14602           contextbound and the target object belongs to the context of the caller.
14603         * object.h: added context and unwrapped_server variables in MonoRealProxy.
14604         * object.c: Implemented support for interfaces and abstract classes
14605           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14606           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14607
14608 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
14609
14610         * class.h class.c (mono_class_is_subclass_of): New function.
14611         
14612         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14613         routines for most common case (calls from ArrayList::ToArray).
14614
14615         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
14616         routine so programs which call Environment::Exit() can be profiled.
14617
14618         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
14619         Added MONO_ARCH_SAVE_REGS.
14620
14621         * icall.c (ves_icall_type_is_subtype_of): Use new function.
14622
14623 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
14624
14625         * blob.h: Add a couple of new MonoType types definitions.
14626
14627         * tabledefs.h: Add a couple of new call convs.
14628
14629 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
14630
14631         * reflection.h (MonoReflectionDynamicAssembly): track changes in
14632         the layout of the class.
14633
14634         * reflection.c (alloc_table): double the size on overflow to avoid
14635         unnecessary copying.
14636
14637         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14638         avoid filling out metadata tables and blobs. Also set mb->ilgen to
14639         null so it can be garbage collected.
14640         
14641 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
14642
14643         * reflection.c (mono_reflection_get_type): Return the resolved type
14644         only if it is in the assembly we searched.
14645
14646         * reflection.c (ensure_runtime_vtable): Initialize method slots.
14647
14648         * class.c (mono_class_setup_vtable): Set the slot of the overriding
14649         method.
14650
14651 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14652
14653         * appdomain.c:
14654         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14655         the right one is 'file:///blah', but MS allows it.
14656         * assembly.c:
14657         (mono_assembly_open): allow 'file://blah'
14658
14659         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14660
14661 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
14662
14663         * socket-io.c: fixes bug #40310.
14664
14665 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
14666
14667         * reflection.c (mono_reflection_parse_type): handle deeply nested
14668         types correctly.
14669
14670         * reflection.c (mono_image_create_token): Use unique token values
14671         since they will be put into a hash table.
14672
14673         * class.c (mono_class_setup_vtable): If a method occurs in more than
14674         one place in the vtable, and it gets overriden, then change the
14675         other occurances too.
14676
14677         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14678         object as return type.
14679
14680 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14681
14682         * icall.c: Deleted "ToString" implementation for double and float
14683         because they are full implemented in managed code.
14684
14685 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14686
14687         * reflection.c, reflection.h: implemented and exported functions
14688         to retrieve info about custom attributes.
14689
14690 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14691
14692         * appdomain.c: moved Uri handling to assembly.c
14693         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14694         work when using a file Uri in *nix and windows.
14695
14696         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14697         GetReferencedAssemblies.
14698
14699 2003-03-18  Dick Porter  <dick@ximian.com>
14700
14701         * icall.c: Rename a couple of internal calls
14702
14703         * threads.c: Set the thread state to Stopped when a thread exits.
14704         Fixes bug 39377.
14705
14706 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
14707
14708         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14709         New icall.
14710
14711         * object.c (mono_class_vtable): fix warning.
14712
14713 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
14714
14715         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14716
14717         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14718         memory.
14719         (method_encode_clauses): Create exception info structures in the right
14720         order.
14721         (mono_reflection_setup_internal_class): Initialize supertypes field.
14722
14723         * class.c object.c: Handle interfaces which implement other interfaces 
14724         correctly.
14725
14726         * class.h class.c: Move the supertypes array initialization code into 
14727         a separate function so it can be used for dynamic types too. Also call
14728         it earlier, in mono_class_init(), since it can be used before the
14729         type is initialized.
14730
14731 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14732
14733         * Makefile.am:
14734         * assembly.c:
14735         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14736
14737         * appdomain.c:
14738         * appdomain.h:
14739         * marshal.c:
14740         * object.c: remove warnings.
14741
14742 2003-03-13  Martin Baulig  <martin@ximian.com>
14743
14744         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14745         (MonoDebugLexicalBlockEntry): New types.
14746
14747         * debug-mono-symfile.c
14748         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14749
14750 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14751
14752         * process.c: ret can be any non-zero value accroding to MS doc.
14753
14754 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
14755
14756         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
14757         fixing a warning for a miss-used prototype, would have cause
14758         random memory corruption.
14759
14760 2003-03-07  Martin Baulig  <martin@ximian.com>
14761
14762         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14763         getting really annoying ....
14764
14765 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
14766
14767         * reflection.c (fixup_method): added support for array methods.
14768
14769 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14770
14771         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
14772         (pointed out by Michael Adams).
14773
14774 2003-03-04  Dick Porter  <dick@ximian.com>
14775
14776         * icall.c: Temporarily reverted the Double and Single ToString()
14777         change, because it broke nunit.
14778
14779 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14780
14781         * object.h, threads.h: make include files compatible with C++
14782         (patch by Jerome Laban <jlaban@wanadoo.fr>).
14783
14784 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
14785
14786         * icall.c: Erased ToString helper functions for Double and Single.
14787         Now, that implementations ar all in managed code (Double and Single
14788         Formatters).
14789
14790 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
14791
14792         * appdomain.c: Added method for initializing the default context of
14793         a domain. Added internal call for getting the default context.
14794         * appdomain.h: Added context variable in MonoDomain struct.
14795         * domain.c: mono_domain_set also sets the default context of the domain
14796         * icall.c: Mapped internal method InternalGetDefaultContext.
14797         * object.c: mono_object_get_virtual_method returns always a remoting
14798         wrapper if the object is a transparent proxy.
14799         mono_runtime_invoke_array: when creating an object by calling the
14800         constructor, if the created object is a proxy, then the constructor should
14801         be called using the a remoting wrapper.
14802
14803 2003-03-03  Dick Porter  <dick@ximian.com>
14804
14805         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14806         variable so it compiles on solaris.  Problem spotted by
14807         Christopher Taylor <ct@cs.clemson.edu>
14808
14809 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14810
14811         * appdomain.c:
14812         (get_info_from_assembly_name): don't leak value.
14813
14814         * icall.c:
14815         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14816         result.
14817
14818 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14819
14820         * assembly.c: export mono_image_load_references ().
14821         * class.c: handle function pointers. mono_class_from_name() now
14822         supports nested type names directly.
14823
14824 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
14825
14826         * reflection.h reflection.c: Encode already created dynamic methods 
14827         and fields correctly as a DEF instead of a REF.
14828
14829         * reflection.c: Get rid of the force_ref argument to 
14830         mono_image_typedef_or_ref since it was wrong in the first place.
14831
14832         * string-icalls.c: add error checking to string constructors according
14833         to the MSDN docs.
14834
14835         * reflection.c: Emit types in the order their TypeBuilders were 
14836         created. Previously, a new table index was assigned to each type before
14837         the tables were emitted. This was wrong because the signature blob
14838         might already refer to a type by its original table index.
14839
14840 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
14841
14842         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14843         change.
14844         
14845 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14846
14847         * Makefile.am: make assemblies dir have \ instead of / on windows.
14848
14849 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
14850
14851         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14852         iterate over the NESTEDCLASS table using a linear search since the
14853         table is not guaranteed to be sorted by the secondary key.
14854
14855         * class.c (mono_class_create_from_typedef): fixed up call to
14856         mono_metadata_nesting_typedef.
14857         
14858 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
14859
14860         * marshal.c (mono_string_to_byvalstr): clear the memory as
14861         suggested by Jerome Laban <jlaban@wanadoo.fr>
14862
14863 2003-02-26  Dick Porter  <dick@ximian.com>
14864
14865         * process.c: Cope with padding in .rsrc blocks
14866
14867 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14868
14869         * metadata.h: reverted the filter_len change, it breaks reflection
14870         
14871 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
14872
14873         * metadata.h: added a new field to store the filter_len
14874         
14875
14876 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14877
14878         * reflection.c: handle custom attributes for types and members
14879         created with Reflection.Emit (bug#38422).
14880
14881 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
14882
14883         * reflection.c: define RTSpecialName automatically for constructors for
14884         compatibility with MS.NET.
14885
14886         * reflection.c (mono_reflection_create_runtime_class): initialize
14887         nested_in field of dynamically created classes.
14888
14889 2003-02-22  Martin Baulig  <martin@ximian.com>
14890
14891         * debug-mono-symfile.h: Incremented version number.
14892
14893 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14894
14895         * object.h icall.c process.c: fix warnings.
14896
14897 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
14898
14899         * appdomain.h appdomain.c:
14900         (mono_domain_try_type_resolve): split the 
14901         name_or_tb argument into a name and a tb argument.
14902         (mono_domain_has_type_resolve): new function to check whenever the
14903         application has registered a TypeResolve event handler.
14904         
14905         * icall.c reflection.h reflection.c: move the type resolve logic into
14906         mono_reflection_get_type () so it will be invoked when 
14907         Assembly::GetType () is called.
14908
14909         * reflection.c:
14910         (mono_reflection_get_type): renamed to get_type_internal.
14911         (mono_reflection_get_type): fixed type name generation so it works 
14912         for nested types too.
14913         (mono_reflection_get_type): call has_type_resolve () to avoid the 
14914         costly type name generation if there is no resolve event handler.
14915
14916 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14917
14918         * class.c, image.c: load exported types from file references.
14919
14920 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
14921
14922         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14923           used to cache the managed methods used to create proxies and make 
14924           remote invocation of methods.
14925         * class.h: Added in MonoVTable a flag to indicate that a class needs 
14926           to be remotely created.
14927         * object.c: Modified the method mono_class_vtable(). It now initializes 
14928           the remote flag of the vtable. Modified mono_object_new_specific(), 
14929           so now it checks the remote flag.
14930         * icall.c: Added a couple of internal methods, one for enabling instance 
14931           creation interception for a type, and one for creating objects bypassing
14932           the remote check.
14933
14934 2003-02-18  Martin Baulig  <martin@ximian.com>
14935
14936         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14937         New interncall to get a method's metadata token.
14938
14939         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14940         New interncall for the debugger.
14941
14942 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
14943
14944         * class.c (mono_class_setup_vtable): allocate supertype array
14945
14946 2003-02-18  Martin Baulig  <martin@ximian.com>
14947
14948         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14949
14950 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14951
14952         * reflection.c:
14953         (assembly_name_to_aname): jump over unknown properties (i've found
14954         something like: 'type, assembly, version=xxx, custom=null, public...',
14955         so now will ignore custom=null and still get the rest of the values).
14956
14957 2003-02-17  Dick Porter  <dick@ximian.com>
14958
14959         * threads.c: Have Thread.Start() wait for a semaphore to signal
14960         that the thread has set up all its local data.  This fixes bug
14961         34323, where Abort() raced the new thread's TLS data.
14962
14963         Also removes the handle_store() call from start_wrapper, because
14964         threads are now always created suspended and there is no longer a
14965         race between the parent and child threads to store the info.
14966
14967 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14968
14969         * image.c: explain the #- heap issue in a message, hopefully
14970         avoiding FAQs on mono-list.
14971
14972 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14973
14974         * icall.c:
14975         (GetEntryAssembly): if the domain has not invoked
14976         AppDomain.ExecuteAssembly yet, return the assembly of the default
14977         AppDomain.
14978
14979 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
14980
14981         * class.c (mono_ldtoken): make it work in dynamic assemblies.
14982
14983 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14984
14985         * metadata.c, reflection.c: simple speedup to type hash
14986         and equals code.
14987
14988 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14989
14990         * image.c, image.h, class.c, assembly.c: move module loading
14991         to MonoImage. When loading metadata, consider alignemnet from
14992         the start of metadata, not from the metadata address in memory.
14993
14994 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
14995
14996         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
14997         AssemblyBuilder objects. Factored out custom attribute creation into
14998         a separate function.
14999         (create_custom_attr): new function to create custom attributes.
15000
15001 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
15002
15003         * Makefile.am: Got tired of typing the full pathname to pedump.
15004         Until there is another option, am installing this.
15005
15006 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
15007
15008         * class.c (class_compute_field_layout): always set field->parent 
15009         (mono_ldtoken): use mono_defaults.fieldhandle_class;
15010
15011 2003-02-11  Dick Porter  <dick@ximian.com>
15012
15013         * threads-types.h:
15014         * monitor.c: Rewrote Monitor, making lock much faster and
15015         Pulse/Wait work as specified.  Also uses much fewer handles, and only
15016         creates them as needed.
15017
15018         * exception.c: Added SynchronizationLockException
15019
15020         * threads.c: Deleted old Monitor implementation.  The new one is
15021         in a new file.
15022
15023 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15024
15025         * class.c: handled TypedReference type code. Set the correct size for
15026         class data. Setup interface_offsets for interface classes, too.
15027
15028 2003-02-09  Martin Baulig  <martin@ximian.com>
15029
15030         * debug-mono-symfile.h: Reflect latest symbol writer changes.
15031
15032 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
15033
15034         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
15035         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
15036         * object.c: fixed mono_object_get_virtual_method () for interfaces.
15037         * verify.c: check for code that runs after the end of the method.
15038
15039 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
15040
15041         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
15042         "System.Math::Round2".
15043         * sysmath.h: Added Floor, Round and Round2 definitions.
15044         * sysmath.c: Modified certain functions that were not 100% compliant
15045         with MS.NET (math precision) and added the implementation of Floor,
15046         Round and Round2.
15047
15048 2003-02-07  Martin Baulig  <martin@ximian.com>
15049
15050         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
15051
15052 2003-02-07  Martin Baulig  <martin@ximian.com>
15053
15054         * debug-mono-symfile.c: Reflected latest symwriter changes.
15055         (mono_debug_create_mono_symbol_file): Removed.
15056         (mono_debug_open_mono_symbol_file): Take an argument which
15057         specifies whether to create a dynamic symbol file.
15058
15059 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
15060
15061         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
15062
15063 2003-02-05  Martin Baulig  <martin@ximian.com>
15064
15065         * reflection.c (mono_image_build_metadata): Make this public,
15066         protect it against being called multiple times, don't create
15067         resources and don't build the compressed metadata here.
15068         (mono_image_create_pefile): Do this here.
15069
15070         * icall.c
15071         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
15072
15073 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15074
15075         * socket-io.c: fixed bug #36322.
15076
15077 2003-02-06  Piers Haken <piersh@friskit.com>
15078
15079         * appdomain.[ch]:
15080         * class.h:
15081         * debug-mono-symfile.c:
15082         * icall.c:
15083         * loader.c:
15084         * mono-config.c:
15085         * monosn.c:
15086         * reflection.c:
15087         * socket-io.c: warning cleanups
15088
15089 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
15090
15091         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
15092         function. works like remoting invoke, but does a check for the Proxy first.
15093
15094 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
15095
15096         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
15097
15098 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
15099
15100         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
15101         array of pointers.
15102         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
15103         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
15104
15105         * object.c (mono_store_remote_field_new): used by the new jit
15106         instead of mono_store_remote_field
15107         (mono_load_remote_field_new): used by the new jit
15108         instead of mono_load_remote_field
15109
15110 2003-02-05  Patrik Torstensson
15111
15112         * appdomain.c: changed unload to take the domain id instead
15113         of domain
15114         
15115         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
15116
15117
15118 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15119
15120         * appdomain.c: don't look for assemblies in ApplicationBase if
15121         PrivateBinPathProbe is set.
15122
15123 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15124
15125         * object.c: make the first argument in main_args contain the absolute
15126         path to the assembly. Fixes bug #37511.
15127
15128 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15129
15130         * icall.c: get correct UTC offset for countries not using daylight
15131         time saving. Fixes bug #30030.
15132
15133 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15134
15135         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15136         and 1 are the family).
15137
15138 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
15139
15140         * icall.c (ves_icall_InternalExecute): removed wrong assertion
15141
15142         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15143
15144 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
15145
15146         * reflection.c: added support for SignatureHelper tokens, which is
15147         needed by the Calli opcode.
15148
15149         * reflection.h: track changes to SignatureHelper class.
15150
15151         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15152
15153 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15154
15155         * appdomain.c: fixed loading assemblies from PrivateBinPath.
15156
15157 2003-02-03  Patrik Torstensson
15158         * appdomain.[c|h], domain.c : 
15159          - Added support for getting a domain via domain id
15160          - Support for setting and getting domain from System.AppDomain 
15161            (used in cross appdomain channel)
15162          - Added support for get/set for a MonoAppContext on a thread 
15163            (Context class in System.Runtime.Remoting.Contexts),
15164          - Removed hack in Get/SetData and ExecuteAssembly.
15165         
15166         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15167         the managed world to get control when a proxy is created.
15168
15169         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15170         
15171 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
15172
15173         * icall.c
15174         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15175         Populate the codebase field as well.
15176
15177 2003-02-02  Martin Baulig  <martin@ximian.com>
15178
15179         * debug-mono-symfile.c
15180         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15181         (mono_debug_symfile_add_method): Allow interncalls.
15182
15183 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15184
15185         * icall.c: throw parse exception if strtod fails or the string is empty.
15186
15187 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15188
15189         * marshal.c: handle object type separately from defined
15190         class types.
15191
15192 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15193
15194         * marshal.c: handle NATIVE_LPSTR for strings when it's
15195         explicitly specified.
15196
15197 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15198
15199         * reflection.c, reflection.h, icall.c: setup the reflection
15200         handle cache for ModuleBuilders and AssemblyBuilders.
15201
15202 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
15203
15204         * reflection.c (reflection_methodbuilder_to_mono_method): set
15205         pinvoke flag
15206
15207 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15208
15209         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15210
15211 2003-01-29  Dick Porter  <dick@ximian.com>
15212
15213         * threads.c: No need for the fake_thread kludge now that Thread
15214         doesn't run a class constructor
15215         
15216 2003-01-29  Dick Porter  <dick@ximian.com>
15217
15218         * threads.c: Use g_direct_hash instead of the rather bogus
15219         g_int_hash
15220
15221 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
15222
15223         * marshal.c (mono_marshal_get_native_wrapper): add check for null
15224         (fix pinvoke12.exe)
15225         (mono_marshal_get_struct_to_ptr): generate valid IL code
15226         (mono_marshal_get_ptr_to_struct): generate valid IL code
15227         (*): correctly set sig->pinvoke, we need to memdup the signature
15228         to do that
15229
15230 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15231
15232         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15233         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15234
15235 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15236
15237         * profiler.c: provide more callers information.
15238
15239 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
15240
15241         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15242
15243         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15244
15245         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15246
15247 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15248
15249         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15250         exception instead of going into an infinite loop on dates which it 
15251         can't yet handle.
15252
15253         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
15254         out-of-range exception if needed.
15255
15256         * class.c (mono_class_setup_vtable): allow a virtual method to provide
15257         an implementation for an interface method and to override an inherited
15258         method at the same time. 
15259         Imagine a scenario when a virtual method is used to override a
15260         virtual abstract method in a parent class, and this same method 
15261         provides an implementation for an method inherited from an interface. 
15262         In this case, the interface resolution code will set im->slot, which 
15263         means that the virtual method override pass will skip this method 
15264         which means a pointer to the abstract method inherited from the parent
15265         will remain in the vtable of this non-abstract class.
15266
15267         * class.c: (mono_class_setup_vtable): continue search for a real 
15268         method if only an abstract method is found.     
15269
15270 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15271
15272         * reflection.c: add size to encoding for ByValStr and ByValArray
15273         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15274
15275 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15276
15277         * class.c (mono_class_setup_vtable): pass the override info as an
15278         argument.
15279
15280         * class.c (mono_class_setup_vtable): set the slot of overriding methods
15281         correctly.
15282         
15283         * reflection.c (ensure_runtime_vtable); add support for method 
15284         overrides.
15285         
15286 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15287
15288         * reflection.c (resolution_scope_from_image): Hack to work to work with
15289         dynamic assemblies.
15290
15291         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
15292         added a 'force_ref' argument to force this function to allways return 
15293         a TypeRef. This is needed by mono_image_get_memberref_token ().
15294         
15295 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15296
15297         * reflection.c (mono_image_get_type_info): interfaces really don't have
15298         a parent.
15299
15300         * reflection.c (mono_image_basic_init): fill out missing fields of
15301         image structure.
15302
15303         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
15304         dynamic assemblies. This is required so dynamic assemblies show up in
15305         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15306         Type::GetType() etc. This is consistent with MS behaviour.
15307
15308         * image.c image.h reflection.c: add newly created classes to the name 
15309         cache so mono_class_get () will find them.      
15310
15311 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15312
15313         First part of changes to get IKVM.NET running under mono.
15314         
15315         * appdomain.h, appdomain.c: added new function 
15316         mono_domain_try_type_resolve() which will emit TypeResolve events. 
15317         This function will call AppDomain::DoTypeResolve to do the actual work.
15318
15319         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
15320         moved existing code dealing with dynamic tokens to a new function 
15321         called mono_reflection_lookup_dynamic_token (). This function will 
15322         raise TypeResolve events when appropriate. Since reflection.c is not 
15323         part of libmetadata, a new hook function called 
15324         mono_lookup_dynamic_token() is added to class.c which will call this.
15325
15326         * assembly.h assembly.c: make the invoke_load_hook function public,
15327         so it can be called for dynamic assemblies.
15328
15329         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15330
15331         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
15332         type isn't found.
15333
15334         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
15335         MonoGHashTable, since it contains pointers to objects which the GC 
15336         needs to track.
15337
15338         * assembly.c (search_loaded): remove unused variable.
15339         
15340 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15341
15342         * object.c: fixed issue exposed by gcc-generated IL programs
15343         that use RVA data for pointers.
15344
15345 2003-01-25  Martin Baulig  <martin@ximian.com>
15346
15347         * threads.c (start_wrapper): Moved the initialization of
15348         `start_func' above the mono_new_thread_init() call to which we
15349         pass it as argument.
15350
15351 2003-01-24  Martin Baulig  <martin@ximian.com>
15352
15353         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15354         the MonoThread pointer.
15355
15356 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
15357
15358         * icall.c: Rename `PowImpl' to Pow.
15359
15360 2003-01-23  Dick Porter  <dick@ximian.com>
15361
15362         * threads.c (start_wrapper): Create a Thread object if needed, so
15363         the Main() thread can do the class initialisation in a subthread
15364         that has been set up to allow managed code execution.
15365
15366         Pass the thread ID instead of the MonoThread pointer to the thread
15367         start and attach callbacks.  This change is required, because the
15368         jit thread start callback must be called _before_ the Thread
15369         object can be created.
15370         
15371         (mono_thread_init): Removed much object creation code that is no
15372         longer needed.  No managed code is called from here now.
15373
15374         * object.c (mono_runtime_exec_managed_code): Create a subthread
15375         for Main, and call back to the runtime to use it.
15376         Set the exit code when Main exits.
15377
15378         * gc.c: Make sure domain finalisation happens in a subthread.
15379         Re-enable threaded GC, fixing bug 31333 (again).
15380
15381         * environment.c: System.Environment internall calls (so far just
15382         ExitCode is here, the others are still in icall.c)
15383
15384         * appdomain.c (mono_runtime_cleanup): All threads running managed
15385         code should have finished before mono_runtime_cleanup() is
15386         reached, so no need to clean up threads.
15387
15388 2003-01-22  Martin Baulig  <martin@ximian.com>
15389
15390         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15391         `gpointer func' arguments.      
15392         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15393         but added `MonoThread *thread' argument.
15394         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15395
15396         * threads.c (mono_new_thread_init): Added `gpointer func' argument
15397         and pass it to the mono_thread_start_cb callback.
15398         (mono_install_thread_callbacks): New public function to install a
15399         set of callbacks which are set by the debugger.
15400         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15401
15402 2003-01-22  Martin Baulig  <martin@ximian.com>
15403
15404         * Makefile.am: Install debug-mono-symfile.h.
15405
15406 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
15407
15408         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15409
15410 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
15411
15412         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15413         * class.c (mono_ptr_class_get): correctly set access levels of pointers
15414         (mono_array_class_get): correctly set access levels of arrays
15415
15416 2003-01-20      Patrik Torstensson
15417         * image.h (MonoAssemblyName): changed major, minor, build, revision
15418         from signed to unsigned.
15419
15420 2003-01-20  sean kasun <skasun@azstarnet.com>
15421
15422         * reflection.c (load_cattr_value): Now this handles
15423         MONO_TYPE_SZARRAY.  Fixes bug #35629
15424
15425 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
15426
15427         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15428         integer value
15429
15430 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15431
15432         * decimal.c: fixed bug #26056.
15433
15434 2003-01-17  Martin Baulig  <martin@ximian.com>
15435
15436         * gc.c: Raise an ExecutionEngineException instead of using g_error().
15437
15438 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15439
15440         * exception.[ch]:
15441         (mono_get_exception_type_initialization): new function.
15442
15443         * object.c: throw a TypeInitializationException when an exception is
15444         thrown invoking the class constructor.
15445
15446 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15447
15448         * reflection.c: fixed attribute reading.
15449
15450 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15451
15452         * icall.c:
15453         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15454         provided, look for the type in the calling assembly and then in
15455         mscorlib; if the assembly name is provided, only try that one.
15456
15457 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15458
15459         * object.c: register the vtable before there is a chance it's
15460         queried again recursively.
15461
15462 2003-01-13  Duncan Mak  <duncan@ximian.com>
15463
15464         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15465         gc-internal.h. 
15466         
15467 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
15468
15469         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15470
15471 2003-01-11  Martin Baulig  <martin@ximian.com>
15472
15473         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15474         this to 20 for the release.
15475
15476 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
15477
15478         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15479
15480         * loader.c (mono_method_get_marshal_info): bug fix
15481
15482         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15483         structures with explicit layout
15484
15485 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15486
15487         * profiler.c: made the output more readable (and sorted). 
15488         Added caller information for the allocation profiler.
15489
15490 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
15491
15492         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15493
15494 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15495
15496         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15497         to get value types.
15498         
15499 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15500
15501         * object.c, profiler.h, profiler.c, profiler-private.h:
15502         Added object allocation profiler.
15503
15504 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15505
15506         * reflection.h, reflection.c: handle global methods.
15507         Compress blob entries.
15508
15509 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15510
15511         * marshal.c: fix compilation.
15512
15513 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
15514
15515         * loader.c (mono_method_get_marshal_info): impl.
15516
15517         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15518
15519 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15520
15521         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15522         for reference types.
15523
15524 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15525
15526         * loader.c: fixed off by one error in loaded parameter names.
15527
15528 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
15529
15530         * marshal.c (mono_marshal_get_icall_wrapper): like
15531         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15532         instead of a MonoMethod.
15533
15534 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15535
15536         * decimal.c: fixed bug #36537.
15537
15538 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15539
15540         * marshal.c: throw a missing method exception if a
15541         P/Invoke method is not found.
15542
15543 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15544
15545         * icall.c: allow a null this for constructors.
15546
15547 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15548
15549         * icall.c: raise the proper exceptions if the arguments to the
15550         internal Invoke are incorrect.
15551
15552 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
15553
15554         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15555
15556 2003-01-03  Martin Baulig  <martin@ximian.com>
15557
15558         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15559
15560 2002-12-31  Martin Baulig  <martin@ximian.com>
15561
15562         * debug-mono-symfile.c: Completely rewrote the type section.
15563         Instead of using individual malloc()ed fields, we use one big
15564         continuous memory area and offsets into this area.
15565         See the comments in the source code for details.
15566
15567 2002-12-30  Martin Baulig  <martin@ximian.com>
15568
15569         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15570
15571 2002-12-30  Martin Baulig  <martin@ximian.com>
15572
15573         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15574         line number table in this data blob instead of using an external
15575         pointer.
15576
15577 2002-12-28  Martin Baulig  <martin@ximian.com>
15578
15579         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15580
15581 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
15582
15583         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15584         as a boxed return type.
15585
15586 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
15587
15588         * appdomain.c
15589         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15590         g_build_filename to properly get separators on the filename created.
15591
15592         * object.h: Small change, introduce MonoMarshalByRefObject to
15593         track the layout of that structure in the C# universe as we make
15594         changes there.
15595
15596 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15597
15598         * object.c: removed assert to allow static fields on interfaces.
15599         * loader.c: a TypeSpec may be used for any type, not just arrays.
15600
15601 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15602
15603         * class.c, class.h: added mono_class_array_element_size ().
15604         Ignore static methods in interfaces.
15605
15606 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15607
15608         * threads.c: fixed the build under cygwin.
15609
15610 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15611
15612         * reflection.c: handle nullref constants. Allocate keys for
15613         reflection handles with the GC.
15614
15615 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15616
15617         * threads.c, threads.h: added mono_thread_get_abort_signal()
15618         to get a suitable signal for thread abort.
15619
15620 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15621
15622         * metadata.c: fix handling of ExportedType table.
15623
15624 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15625
15626         * icall.c: added WriteWindowsDebugString internal call.
15627
15628 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15629
15630         * reflection.h: added fields to match C# implementation.
15631
15632 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15633
15634         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15635
15636 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
15637
15638         * gc.h, gc-internal.h: Rename header for GC internal calls to
15639         gc-internal.h from gc.h as to not clash with Boehm GC having its
15640         header installed as <gc.h> in outside include paths.
15641         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15642         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15643
15644 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15645
15646         * icall.c: assign minor, build and revision in FillName.
15647
15648 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
15649
15650         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15651         Added support for running code generated by Reflection.Emit.
15652
15653 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15654
15655         * appdomain.c: check for NULL argument in LoadFrom.
15656
15657 2002-12-10  Dick Porter  <dick@ximian.com>
15658
15659         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15660
15661 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15662
15663         * appdomain.c: fix buglet when building exe file name.  Handle full
15664         assembly name (needed after latest changes to AssemblyName).
15665         * image.c:
15666         (mono_image_close): free some hashtables.
15667
15668 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
15669
15670         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
15671         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
15672         on some systems (redhat 7.3) 
15673
15674 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15675
15676         * threads.c: delete the critical section of a sync block,
15677         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15678
15679 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15680
15681         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15682
15683 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15684
15685         * appdomain.[ch]: handle the assembly preload event to try loading the
15686         assemblies using the paths we have in the current domain.
15687
15688         * assembly.[ch]: created an assembly preload hook that is called to try
15689         loading the assembly by other means that the ones provided here.
15690
15691         * domain.c: initialize the domain search path.
15692
15693         From now on, assemblies (TODO: except corlib and System) are loaded
15694         according to these rules when using mono_assembly_load ():
15695
15696                 1. It tries to load the assembly from the ApplicationBase
15697                 of the current domain appending .dll and .exe (TODO: have to
15698                 try loading from name/name.dll and name/name.exe).
15699
15700                 2. It tries the search path specified in PrivateBinPath for the
15701                 current domain (if any).
15702
15703                 3. Previous behavior.
15704
15705 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15706
15707         * icall.c: implemented GetInterfaceMap() related icall.
15708         * domain.c, loader.h: load MethodInfo in mono_defaults.
15709
15710 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15711
15712         * gc.c: disable the finalizer thread for now, untill all the issues
15713         with it are resolved.
15714
15715 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15716
15717         * string-icalls.c: handle embedded nulls in string ctor when the
15718         length is specified.
15719
15720 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15721
15722         * class.c: look for explicit interface implementation in parent
15723         classes, too.
15724
15725 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
15726
15727         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
15728
15729 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15730
15731         * gc.c: protect handles with a critical section.
15732
15733 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15734
15735         * icall.c:
15736         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15737         parameters. If no assembly specified, try getting the type from all
15738         the assemblies in the current domain, else, load the assembly and get
15739         the type from it.
15740
15741 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15742
15743         * marshal.c: applied patch from Aleksey Demakov that fixes
15744         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15745
15746 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15747
15748         * icall.c: fixed get_location.
15749
15750 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
15751
15752         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15753         declarations to make it work with older gcc. 
15754
15755         * loader.c (mono_get_method): set signature->pinvoke for native calls
15756
15757 2002-11-20  Dick Porter  <dick@ximian.com>
15758
15759         * threads.c (mono_thread_init): Set the main thread's handle
15760
15761 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15762
15763         * gc.c: allow compilation without GC support. Changed to match the
15764         mono coding style.
15765
15766 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15767
15768         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15769
15770 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15771
15772         * reflection.c: set a public key token on the core assemblies.
15773
15774 2002-11-18  Dick Porter  <dick@ximian.com>
15775
15776         * threads.c: Split out some thread initialisation so that other
15777         files can set the start callback function.
15778
15779         * gc.c: Run finalisers in a separate thread, to avoid stack
15780         overflow.  Fixes bug 31333.
15781
15782         * appdomain.c: Set up GC finalisation thread.
15783
15784         * reflection.c: 
15785         * object.c: 
15786         * domain.c: Use gc.h macros for GC_malloc
15787         
15788 2002-11-15  Dick Porter  <dick@ximian.com>
15789
15790         * threadpool.c: 
15791         * threads.c:
15792         * appdomain.c: Removed mono_runtime_init_with_attach(),
15793         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15794         merging the extra parameter with the existing function.  Removed
15795         unneeded code in mono_thread_attach().
15796
15797 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
15798
15799         * image.c (mono_image_loaded_by_guid): a method to get loaded
15800         images by guid. 
15801         (load_metadata_ptrs): we store the guid as string.
15802
15803 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
15804
15805         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15806
15807         * metadata.c (mono_guid_to_string): imported method form Zoltan
15808         Varga (slightly modified)
15809
15810         * assembly.c (mono_assembly_open): load precompiled code
15811
15812         * loader.h (MonoMethod): we store the method token for use in the
15813         aot compiler. 
15814
15815 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15816
15817         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15818         the hook function called when an assembly is loaded.
15819         
15820         * domain.c: Modified file.
15821         (mono_domain_assembly_load): removed hash table insertion of assemblies.
15822
15823         Fixes bug #33196.
15824
15825 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
15826
15827         * reflection.c: Map PEFileKind to the value expected by the WinNT
15828         image loader. 
15829
15830 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15831
15832         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15833         Read until the buffer is filled completely.
15834
15835 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15836
15837         * icall.c: implemented MonoType.InternalGetEvent ().
15838
15839 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15840
15841         * appdomain.c: implemented InitAppDomainSetup. Delayed
15842         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15843         the entry_assembly.
15844
15845         * assembly.c: base_dir is now an absolute path ending with
15846         G_DIR_SEPARATOR.
15847
15848         * icall.c: modified get_location according to the above changes.
15849
15850         * object.c: init AppDomain.SetupInformation for the default domain after
15851         we have the entry assembly.
15852
15853         * domain.c: when unloading a domain, setup = NULL.
15854
15855 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
15856
15857         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15858
15859 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15860
15861         * object.h, object.c: introduced mono_object_get_virtual_method ()
15862         to lookup the method invoked on an object when a callvirt is done on
15863         a method.
15864         * icall.c: make MethodInfo::Invoke() always do a virtual call.
15865
15866 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15867
15868         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15869         current domain when loaded an assembly and failed to load it.
15870
15871         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15872
15873 2002-10-31  Dick Porter  <dick@ximian.com>
15874
15875         * icall.c: 
15876         * file-io.h: 
15877         * file-io.c: Return the error status in a parameter, as the
15878         GetLastError() value has long since been blown away if we try and
15879         look it up in a subsequent internal call invocation.  Delete the
15880         GetLastError() internal call, because it's useless.
15881
15882 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
15883
15884         * class.[ch]: added cast_class to fix bug 29517
15885
15886 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15887
15888         * marshal.c: create valid IL code in the filter clause:
15889         the new JIT is less forgiving:-)
15890
15891 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15892
15893         * icall.c: removed get_property internal call.
15894
15895 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
15896
15897         * appdomain.h domain.c: Added an ID to appdomains.
15898         
15899         * threads.c threads.h icall.c: Implement icall
15900         Thread:GetDomainID(), and remove unused icall 
15901         CurrentThreadDomain_internal.
15902
15903 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15904
15905         * icall.c: Don't recurse through the base types in GetConstructor.
15906         Fixes bug #32063. 
15907
15908 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15909
15910         * mempool.h, mempool.c: added mono_mempool_empty() and
15911         mono_mempool_stats().
15912
15913 2002-10-23  Dick Porter  <dick@ximian.com>
15914
15915         * file-io.c: 
15916         * file-io.h: 
15917         * icall.c: Added MonoIO.GetFileType internal call
15918
15919 2002-10-17  Dick Porter  <dick@ximian.com>
15920
15921         * appdomain.c (mono_runtime_cleanup): Don't signal the async
15922         delegate semaphore before waiting for all threads to finish,
15923         because new threads can also call async delegates.  Fixes bug
15924         32004.
15925
15926         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15927         of 3 seconds, in case another async job is queued.  (This part is
15928         needed because the bug fix reintroduced the 3s exit lag.)  This
15929         makes the mono_runtime_shutdown flag superfluous.
15930
15931 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15932
15933         * reflection.c: include ehader size in method section headers.
15934         Really check for suplicated modules entries.
15935
15936 2002-10-17  Martin Baulig  <martin@gnome.org>
15937
15938         * debug-mono-symfile.c: Added back support for locals.
15939
15940 2002-10-14  Martin Baulig  <martin@gnome.org>
15941
15942         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15943         MONO_TYPE_VOID.
15944
15945 2002-10-14  Martin Baulig  <martin@gnome.org>
15946
15947         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15948         mono_class_get() instead of looking in the class cache. 
15949
15950 2002-10-13  Martin Baulig  <martin@gnome.org>
15951
15952         * debug-mono-symfile.c: Set version number to 28, include the
15953         signature in method names.
15954
15955 2002-10-13  Martin Baulig  <martin@gnome.org>
15956
15957         * debug-mono-symfile.h: Set version number to 27.
15958
15959 2002-10-11  Martin Baulig  <martin@gnome.org>
15960
15961         * gc.c: Don't register/unregister NULL pointers as disappearing links.
15962
15963 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15964
15965         * metadata.c, metadata.h: added helper function to allocate signatures.
15966
15967 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15968
15969         * icall.c: added internal call to get the location of machine.config.
15970
15971 2002-10-08  Martin Baulig  <martin@gnome.org>
15972
15973         * debug-mono-symfile.c: Ignore classes with a pending init for the
15974         moment.
15975
15976 2002-10-03  Dick Porter  <dick@ximian.com>
15977
15978         * threads.c: Freebsd pthread_t is a pointer
15979
15980 2002-10-03  Dick Porter  <dick@ximian.com>
15981
15982         * socket-io.c: Implemented GetHostName_internal
15983
15984 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15985
15986         * mono-config.c:
15987         (mono_config_parse_file): don't leak the text.
15988
15989 2002-10-02  Martin Baulig  <martin@gnome.org>
15990
15991         * debug-mono-symfile.c: Added support for methods.
15992
15993 2002-10-01  Martin Baulig  <martin@gnome.org>
15994
15995         * debug-mono-symfile.c: Don't emit methods and line numbers for
15996         the dynamic symbol file, just write the type table.  We can easily
15997         have an external helper program which creates a symbol file for an
15998         IL file.        
15999
16000 2002-10-01  Dick Porter  <dick@ximian.com>
16001
16002         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
16003         Only add the handle to the cleanup array when we're about to
16004         launch the thread.  Bug 31425 deadlocked when the test was run on
16005         mono under w32.
16006
16007 2002-10-01  Martin Baulig  <martin@gnome.org>
16008
16009         * debug-mono-symfile.c: Added support for properties.
16010
16011 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16012
16013         * reflection.c: unaligned store fix from Mark Crichton
16014         <crichton@gimp.org>.
16015
16016 2002-09-27  Martin Baulig  <martin@gnome.org>
16017
16018         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
16019         New interncall.
16020
16021 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16022
16023         * assembly.h, assembly.c: use a sane API to hook into the assembly
16024         loading process instead of a useless special-purpouse hack
16025         (ngen needs a hook, too, for example).
16026
16027 2002-09-27  Dick Porter  <dick@ximian.com>
16028
16029         * threads.c (mono_thread_init): Call GetCurrentProcess() so
16030         io-layer can set up some process handle info.  Not needed on w32,
16031         but doesn't hurt either.
16032
16033         * process.c: Pass the program name in the second parameter to
16034         CreateProcess, so the path is searched.  Include the working
16035         directory. Implemented process name, process enumeration, and some
16036         process detail internal calls.
16037         
16038         * icall.c: Added internal calls for process lookup, and some
16039         process details
16040
16041 2002-09-26  Martin Baulig  <martin@gnome.org>
16042
16043         * assembly.c (mono_install_open_assembly_hook): New global
16044         function to install a function to be invoked each time a new
16045         assembly is loaded.
16046         (mono_assembly_open): Run this callback function if set.
16047
16048         * debug-mono-symfile.c: Put back line numbers for the dynamic
16049         symbol file and also record the .il file as source file.  This
16050         allows us to install the temporary symbol file as `file.dbg' just
16051         like a compiler-generated one.
16052
16053 2002-09-26  Nick Zigarovich <nick@chemlab.org>
16054
16055         * Corrected typo in gc.c (BOHEM vs BOEHM).
16056
16057 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16058
16059         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
16060         GetProperties. Also avoid calling g_slist_length in GetProperties and
16061         GetMethods.
16062
16063 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16064
16065         * reflection.c: avoid unaligned stores (bug spotted by
16066         Mark Crichton  <crichton@gimp.org>).
16067
16068 2002-09-25  Martin Baulig  <martin@gnome.org>
16069
16070         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
16071         instead of guint64 for addresses and added prologue/epilogue info.
16072
16073 2002-09-25  Martin Baulig  <martin@gnome.org>
16074
16075         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
16076         store line number info.  For the dynamic symbol file, we only need
16077         to provide the JIT generated dynamic line number info for the dynamic
16078         symbol file.
16079
16080 2002-09-25  Martin Baulig  <martin@gnome.org>
16081
16082         * debug-mono-symfile.h: Incremented version number.
16083
16084 2002-09-24  Martin Baulig  <martin@gnome.org>
16085
16086         * class.c (mono_debugger_class_init_func): New global function
16087         pointer variable.
16088         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
16089         call it.
16090
16091         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
16092         function.  This is called via the mono_debugger_class_init_func
16093         hook to add all types to the dynamic type table.
16094         (ves_icall_MonoDebugger_GetType): New interncall to get a class
16095         from its metadata token.
16096
16097         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
16098         New interncall for the debugger.
16099
16100 2002-09-24  Nick Drochak <ndrochak@gol.com>
16101
16102         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
16103         before using it in case it is null.
16104         
16105 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16106
16107         * metadata.c: allow custom modifiers in local var signatures
16108         (bug spotted by Zoltan Varga).
16109
16110 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16111
16112         * class.c: deal with the <Module> class that may have a NULL vtable.
16113         Eliminate warnings.
16114
16115 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16116
16117         * image.c, image.h: more strong name helpers.
16118         * monosn.c: more work: convert pem keys to cryptoapi format.
16119
16120 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16121
16122         * string-icalls.c: speedup IndexOf.
16123
16124 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16125
16126         * icall.c: updates from Zoltan.2.Varga@nokia.com.
16127
16128 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16129
16130         * icall.c: cleanup: use mono_object_domain ().
16131
16132 2002-09-23  Martin Baulig  <martin@gnome.org>
16133
16134         * debug-mono-symfile.c: Improved type support.
16135
16136 2002-09-22  Martin Baulig  <martin@gnome.org>
16137
16138         * debug-mono-symfile.c: Added support for reference types and strings.
16139
16140 2002-09-22  Martin Baulig  <martin@gnome.org>
16141
16142         * debug-mono-symfile.c: Started to work on the type table.
16143
16144 2002-09-21  Martin Baulig  <martin@gnome.org>
16145
16146         * debug-mono-symfile.c: Largely reworked the symbol table format.
16147         The symbol table is now incrementally updated each time a new
16148         method is added.  We're now also using our own magic and version
16149         so that you don't need to recompile all your classes if the
16150         dynamic table changes.
16151         (mono_debug_update_mono_symbol_file): Removed.
16152         (mono_debug_symfile_add_method): New function to add a method.
16153
16154 2002-09-21  Martin Baulig  <martin@gnome.org>
16155
16156         * icall.c
16157         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16158         New interncall.
16159
16160         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16161         New interncall to get a method from its metadata token.
16162
16163 2002-09-21  Martin Baulig  <martin@gnome.org>
16164
16165         * debug-mono-symfile.c: Create type table.
16166
16167 2002-09-20  Martin Baulig  <martin@gnome.org>
16168
16169         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16170
16171 2002-09-20  Martin Baulig  <martin@gnome.org>
16172
16173         * debug-mono-symfile.c: Provide information about params and locals.
16174
16175 2002-09-20  Martin Baulig  <martin@gnome.org>
16176
16177         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16178         New interncall.
16179
16180         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16181         interncall to get a method from its metadata token.
16182
16183 2002-09-20  Martin Baulig  <martin@gnome.org>
16184
16185         * debug-mono-symfile.c: Added a few checks for method->header
16186         being non-NULL.  This should never happen, but for the moment
16187         let's use a g_warning() rather than a g_assert().
16188
16189 2002-09-19  Mark Crichton  <crichton@gimp.org>
16190
16191         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16192         even if support for it isn't present.  Added an #ifdef to fix this.
16193
16194         * socket-io.c: Added checks back for Solaris support.
16195
16196 2002-09-19  Martin Baulig  <martin@gnome.org>
16197
16198         * debug-mono-symfile.c (read_string, write_string): Reflect latest
16199         changes in the symbol file format.
16200
16201 2002-09-18  Martin Baulig  <martin@gnome.org>
16202
16203         * debug-mono-symfile.c: Set version number to 21.
16204
16205 2002-09-18  Dick Porter  <dick@ximian.com>
16206
16207         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16208         on netbsd.  Fixes bug 30051.
16209
16210 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16211
16212         * reflection.c:
16213         (set_version_from_string): little fix.
16214
16215 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16216
16217         * monosn.c, Makefile.am: added strong name utility.
16218         * reflection.h, reflection.c: implemented delayed signing,
16219         locale, version and hash id assembly attributes.
16220
16221 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16222
16223         * loader.c, metadata.c: load param attributes in signatures.
16224
16225 2002-09-16  Martin Baulig  <martin@gnome.org>
16226
16227         * debug-mono-symfile.c: Added string table with all method names.
16228
16229 2002-09-14  Martin Baulig  <martin@gnome.org>
16230
16231         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16232         fast method lookup.
16233
16234 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16235
16236         * reflection.c: record the public key token of referenced assemblies.
16237
16238 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16239
16240         * image.c, image.h: added functions to get the strong name and the
16241         public key of an assembly.
16242         * pedump.c: use them.
16243
16244 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
16245
16246         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16247
16248 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
16249
16250         * marshal.c (mono_marshal_get_managed_wrapper): Added
16251         MONO_TYPE_BOOLEAN 
16252
16253 2002-09-11  Martin Baulig  <martin@gnome.org>
16254
16255         * gc.c: Call GC_unregister_disappearing_link() on all links when
16256         finalizing them, this is necessary to aviod a crash in boehm's
16257         finalize handler.
16258
16259 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16260
16261         * gc.c: handle GetTarget for finalized objects spotted and fixed by
16262         nick@chemlab.org.
16263
16264 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16265
16266         * icall.c: implemented MonoType::Module.
16267         * reflection.c, reflection.h: mono_module_get_object () from
16268         Tomi Pakarinen <tomi.pakarinen@welho.com>.
16269
16270 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16271
16272         * icall.c: ignore overridden methods in GetMethods ().
16273         Fix for FieldInfo::SetValue().
16274         * object.c: handle float/double in runtime invoke.
16275
16276 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16277
16278         * object.c: allow a constructor to be called again on an object.
16279
16280 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16281
16282         * class.h, class.c: move field layout code to it's own function and
16283         export it. Get an interface id earlier. Move fields in MonoClass
16284         so they are more cache friendly and align the bitfields.
16285         * loader.c: temporary handle get_param_names() for a runtime method.
16286         * reflection.c, reflection.h: more code to handle runtime creation of
16287         types.
16288
16289 2002-09-09  Martin Baulig  <martin@gnome.org>
16290
16291         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16292         signature with the pinvoke field being set for the actual call.
16293
16294 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16295
16296         * icall.c: removed some unused icalls. Start of map of glib charsets
16297         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16298
16299 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16300
16301         * debug-helpers.c: break infinite loop (found and fixed by
16302         Holger Arnold <harnold@gmx.de>).
16303
16304 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16305
16306         * icall.c: target may be null in create_delegate.
16307
16308 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16309
16310         * marshal.c: handle a boolean return type.
16311
16312 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16313
16314         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16315
16316 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16317
16318         * gc.c: fix weakreferences.
16319
16320 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16321
16322         * icall.c: added icall to get default codepage.
16323
16324 2002-09-03  Dick Porter  <dick@ximian.com>
16325
16326         * threads.h: 
16327         * threads.c: Use MonoThread instead of MonoObject where
16328         apropriate.
16329
16330         Store running thread objects in a hash table, so that we have all
16331         the info to hand when waiting for them to finish
16332         (means we don't need OpenThread() any more, so mingw builds should
16333         be fully functional again.)
16334
16335         * verify.c:
16336         * object.h: Added thread ID to MonoThread
16337
16338 2002-09-03  Martin Baulig  <martin@gnome.org>
16339
16340         * icall.c (System.Reflection.Assembly::get_location): New interncall.
16341
16342 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16343
16344         * icall.c: fixed leak in get_temp_path. Thanks lupus.
16345
16346 2002-09-03  Martin Baulig  <martin@gnome.org>
16347
16348         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16349         argument to store the end address of the disassembled instruction.
16350
16351         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16352         here from debug-symfile.h.
16353         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16354         JIT into this struct.
16355         (MonoSymbolFile): Added `char *image_file' field.
16356         (MonoDebugGetMethodFunc): Removed.
16357         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16358         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16359         (mono_debug_find_method): New method.
16360
16361         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16362         create a full symbol file.
16363         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16364         and static symbol files.
16365         (mono_debug_find_method): The symbol file keeps an internal method hash,
16366         call this to get a MonoDebugMethodInfo from a MonoMethod.
16367
16368         * debug-symfile.[ch]: Removed.
16369
16370 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
16371
16372         * image.c (do_mono_image_open): Remove linker version check.
16373
16374 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
16375
16376         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16377         wrappers for instance methods.
16378         
16379 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16380
16381         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16382
16383 2002-08-28  Dick Porter  <dick@ximian.com>
16384
16385         * Makefile.am: Export HOST_CC for w32 builds
16386
16387 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16388
16389         * file-io.c process.c: MonoString are null terminated, no
16390         need for mono_string_to_utf16() anymore.
16391
16392 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16393
16394         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16395
16396 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16397
16398         * icall.c, reflection.h: speedup System.MonoType.
16399
16400 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16401
16402         * reflection.c: allow null as the value of a string argument in
16403         custom attributes constructors.
16404
16405 2002-08-27  Martin Baulig  <martin@gnome.org>
16406
16407         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16408         `trampoline_address' field.
16409
16410 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
16411
16412         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16413         check (fixes bug #29486) 
16414
16415 2002-08-27  Martin Baulig  <martin@gnome.org>
16416
16417         * debug-mono-symfile.c: Changed the file format in a way that allows us
16418         open it read-only and to use a specially malloced area for all the
16419         dynamic data.  We can now also generate a symbol file on-the-fly if we're
16420         debugging IL code and there is no MCS generated symbol file for it.
16421
16422 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16423
16424         * object.c: added a define for a good string and array
16425         creation speedup (not enabled by default because we need to deal with
16426         the synch stuff).
16427
16428 2002-08-26  Martin Baulig  <martin@gnome.org>
16429
16430         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16431         function to create a dynamic symbol file.  This is used by the
16432         debugger to create a symbol file for IL code on-the-fly.
16433
16434 2002-08-26  Martin Baulig  <martin@gnome.org>
16435
16436         * loader.c (mono_lookup_pinvoke_call): Include the error message
16437         from g_module_error() in the error message.
16438
16439 2002-08-24  Martin Baulig  <martin@gnome.org>
16440
16441         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16442         function to update the symbol file.  The symbol file is mmap()ed
16443         writable, but private.  This allows us to install the symbol file
16444         together with the assembly.
16445
16446 2002-08-24  Martin Baulig  <martin@gnome.org>
16447
16448         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
16449         but they can read the new symbol file format which mcs is now creating.
16450
16451         * debug-symfile.c (mono_debug_find_source_location): Moved to
16452         debug-mono-symfile.c; this is now operating on the new symbol file.
16453
16454 2002-08-23  Martin Baulig  <martin@gnome.org>
16455
16456         * debug-helpers.c (mono_method_desc_from_method): New function to get
16457         a MonoMethodDesc from a MonoMethod.
16458
16459 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16460
16461         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16462         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16463
16464 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16465
16466         * string-icalls.[ch]: make helper methods static.
16467
16468 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16469
16470         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16471         types to it and to SetValueInternal.
16472
16473         * object.c: Moved handle_enum label to its proper place. This was the
16474         f... bug! ;-)
16475
16476         This time i compiled mcs and gtk-sharp and they both work.
16477
16478 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16479
16480         * icall.c: reverted partially my previous patch until 
16481         object.c:set_value handles enums correcly.
16482
16483 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16484
16485         * icall.c:
16486         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16487         (ves_icall_System_Environment_get_MachineName): removed warning when
16488         compiling under cygwin.
16489
16490 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16491
16492         * object.c: fixed field_get_value() for reference types.
16493
16494 2002-08-22  Dick Porter  <dick@ximian.com>
16495
16496         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16497         Don't free a buffer while it's still needed.  Patch from Jonathan
16498         Liger <Jonathan.liger@wanadoo.fr>
16499
16500 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
16501
16502         * icall.c (ves_icall_System_Environment_get_Platform): Add new
16503         internal call.
16504
16505 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
16506
16507         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16508         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16509
16510         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16511         we call unmanaged code which throws exceptions.
16512
16513 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16514
16515         * appdomain.h: added per-domain entry_assembly.
16516         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16517         arguments.
16518         * icall.c: Assembly::GetEntryAssembly icall.
16519         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16520         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16521
16522 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16523
16524         * appdomain.h, gc.c: added mono_domain_finalize ().
16525
16526 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16527
16528         * object.c:
16529         (mono_print_unhandled_exception): changed g_warning by g_printerr
16530         because g_log has a 1024 characters limit (yeah, i got a big stack
16531         trace). Don't print exception name, that should be in ToString 
16532         returned string.
16533
16534 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16535
16536         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16537         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16538
16539 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16540
16541         * object.c:
16542         (mono_print_unhandled_exception): after previous commit, i realized
16543         that MS calls ToString on the exception. I changed this function to
16544         do that. This way we get stack_trace for free.
16545
16546 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16547
16548         * object.c:
16549         (mono_print_unhandled_exception): invoke Message property instead of
16550         getting 'message' field from Exception. Don't allocate memory for
16551         'trace' and 'message' if not needed.
16552
16553 2002-08-18  Dick Porter  <dick@ximian.com>
16554
16555         * unicode.c: Fix asserts to match Encoder.cs checks
16556
16557 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16558
16559         * marshal.c: fix unaligned store issue and a few wrong
16560         opcode argument types.
16561
16562 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16563
16564         * icall.c: added GetUninitializedObjectInternal internal call.
16565
16566 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
16567
16568         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16569         to the right domain.
16570
16571 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
16572
16573         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16574
16575         * class.c (class_compute_field_layout): set blittable to false for Strings
16576
16577         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16578
16579 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16580
16581         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16582         first chunk of code to create types at runtime. Code to
16583         handle ReflectedType/DeclaringType. Make reflection handles
16584         domain specific.
16585
16586 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16587
16588         * class.c: set correct name in arrays.
16589
16590 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
16591
16592         * appdomain.c (mono_domain_transfer_object): make it work with
16593         valuetypes. bug fixes.
16594
16595 2002-08-12  Dick Porter  <dick@ximian.com>
16596
16597         * object.h: Rename some parameters to avoid c++ keywords (Patch
16598         from Joseph Wenninger <kde@jowenn.at>)
16599
16600 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16601
16602         * icall.c: added icall to implement Assembly.GetFile*.
16603
16604 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16605
16606         * reflection.h, reflection.c: code to embed managed resources.
16607
16608 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16609
16610         * class.c: move all the type size stuff into
16611         class_compute_field_layout().
16612
16613 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16614
16615         * class.c: ensure enums have always the correct instance size.
16616         * unicode.c: remove wrong assert.
16617
16618 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16619
16620         * assembly.c: fix mem corruption issue.
16621         * image.h, image.c: added mono_image_get_resource () to access
16622         managed resources.
16623         * icall.c: implemented Assembly.EntryPoint property and some
16624         Managed Resources related internalcalls.
16625
16626
16627 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16628
16629         * image.c, image.h: impemented mono_image_get_entry_point ().
16630         * appdomain.c: use mono_image_get_entry_point.
16631
16632 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16633
16634         * reflection.c: support the object type argument when loading
16635         custom attributes.
16636
16637 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
16638
16639         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16640         String as return type.
16641
16642 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16643
16644         * reflection.c: fix encoding of named args for custom attrs to match
16645         the ms implementation. Read them back when instantiating custom
16646         attributes.
16647
16648 2002-08-02  Radek Doulik  <rodo@ximian.com>
16649
16650         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16651         by Dietmar as quick fix
16652         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16653         16 as stack size, used on more places as quick fix before Dietmar
16654         will fix it properly
16655
16656 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16657
16658         * object.h, object.c: added accessors for fields and properties.
16659
16660 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16661
16662         * class.c, class.h: made mono_class_get_field_from_name ()
16663         loop on parent types.
16664         Added mono_class_get_property_from_name ().
16665
16666 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16667
16668         * class.c, class.h: move the code to setup the type vtable in its own
16669         function so that it can be reused also for types created at runtime.
16670         Eliminate the "class" identifier from the header file.
16671         * reflection.c: setup the vtable for enums so that we can create
16672         objects for use in SetConstant ().
16673
16674 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
16675
16676         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16677         instead of the delegate itself as this pointer (bug #28383)
16678
16679 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
16680
16681         * marshal.c (mono_marshal_get_managed_wrapper): added return type
16682         conversions.
16683
16684 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16685
16686         * loader.c: don't set the pinvoke bit on icalls.
16687
16688 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
16689
16690         * debug-helpers.c (mono_method_full_name): only print a number to
16691         indicate wrapper type (so that the output is more readable in traces).
16692
16693 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
16694
16695         * class.c (mono_class_init): include method override patch from Paolo
16696
16697 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16698
16699         * icall.c: fixed GetTypeCode().
16700
16701 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
16702
16703         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16704         use real delegate invoke function to make it work with multicast
16705         delegates (fix bug# 28291).
16706
16707 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16708
16709         * object.c: load constant strings.
16710
16711 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16712
16713         * reflection.c: no magic numbers.
16714         * tabledefs.h: security action enum.
16715
16716 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16717
16718         * assembly.c: fix possible memory corruption.
16719
16720 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16721
16722         * reflection.h, reflection.c: added support for linking resources.
16723         * verify.c: check we have an updated corlib.
16724
16725 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
16726
16727         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16728         string arrays.
16729         (mono_marshal_string_array): null terminate unmanaged string arrays.
16730         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16731
16732 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16733
16734         * icall.c: Type.GetType () can now return also types from the
16735         calling assembly.
16736
16737 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16738
16739         * loader.h, loader.c: stack walking support.
16740         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16741         GetCallingAssembly.
16742
16743 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
16744
16745         * marshal.c: added optimisations for blittable types 
16746
16747         * class.c (mono_array_class_get): do not set blittable attribute on arrays
16748         (mono_class_setup_mono_type): set blittable attribute for single
16749         and double.
16750
16751         * marshal.c (mono_string_utf8_to_builder): impl.
16752         (mono_string_builder_to_utf8): impl.
16753         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16754
16755 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
16756
16757         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16758         (mono_marshal_get_managed_wrapper): impl. byref types
16759
16760 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16761
16762         * icall.c:
16763         (search_method): don't display debug message. 
16764
16765 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16766
16767         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16768
16769 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16770
16771         * appdomain.c: set the missing filename when throwing exception.
16772
16773 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
16774
16775         * metadata.c (mono_type_size): code cleanup
16776         (mono_type_stack_size): removed some test code
16777
16778 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
16779
16780         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16781         mono_get_exception_file_not_found now.
16782
16783         * exception.c (mono_exception_from_name_two_strings): New version
16784         that will call a constructor with two string arguments. 
16785         (mono_get_exception_file_not_found): New helper routine, used to
16786         report file-not-found errors.
16787
16788 2002-07-20  Dick Porter  <dick@ximian.com>
16789
16790         * process.h:
16791         * process.c: Pass file handles to CreateProcess
16792         
16793         * icall.c:
16794         * file-io.h:
16795         * file-io.c: Implemented CreatePipe
16796
16797 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16798
16799         * metadata.c (mono_get_param_info): set alignment for value types
16800
16801 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16802
16803         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16804         Constify mono_domain_assembly_open().
16805         * loader.c: handle null namespace in icalls.
16806
16807 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
16808
16809         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16810         (emit_str_to_ptr_conv): marshal object as structs
16811
16812         * metadata.c (mono_type_to_unmanaged): marshal object as structs
16813
16814         * marshal.c (mono_marshal_get_runtime_invoke): support value types
16815
16816 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
16817
16818         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16819         (mono_marshal_get_native_wrapper): we an now return value types
16820
16821 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16822
16823         * verify.c: more checks implemented.
16824
16825 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
16826
16827         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16828         (fix bug #27695)
16829         (mono_marshal_get_native_wrapper): allow byref arguments
16830         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16831         impl. PtrToStringXXX methods
16832         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16833         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16834         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16835         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16836         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16837
16838 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16839
16840         * reflection.c: fix buglet in parsing an assembly name.
16841
16842 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16843
16844         * marshal.c (emit_ptr_to_str_conv): first impl.
16845
16846 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16847
16848         * object.c, class.h: cache the vtable in the class as suggested by
16849         vargaz@freemail.hu (Zoltan Varga).
16850
16851 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16852
16853         * class.h, loader.c: added mono_field_from_token().
16854         * verify.c: first cut of type checking code.
16855
16856 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
16857
16858         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16859
16860 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
16861
16862         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16863         (fix bug #27782)
16864         (mono_marshal_get_remoting_invoke): impl.
16865         (mono_delegate_begin_invoke): impl.
16866         (mono_mb_emit_save_args): impl.
16867         (mono_delegate_end_invoke): impl.
16868         (mono_marshal_get_delegate_begin_invoke):
16869         (mono_marshal_get_delegate_end_invoke):
16870         (mono_marshal_get_delegate_invoke): generate a special name for
16871         those methods (including the signature) and associate them whith
16872         the delegate class. 
16873
16874 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16875
16876         * reflection.[ch]: 
16877         (mono_reflection_type_from_name): now it has a MonoImage parameter
16878         which is used as the default image to search the type in. If the image
16879         is NULL or getting the type from it fails, it defaults to corlib.
16880
16881         * icall.c: changed 1 call to mono_reflection_type_from_name to match
16882         new parameter.
16883
16884 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16885
16886         * reflection.c: update the parameter table index.
16887
16888 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16889
16890         * domain.c: don't include the mark byte in the string hash.
16891
16892 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16893
16894         * icall.cs: icall for Type.GetTypeCode ().
16895         * verify: a couple of fixes and disabled local initialization checks.
16896
16897 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
16898
16899         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16900
16901         * debug-helpers.c (mono_method_full_name): print the type of the
16902         runtime wrapper
16903
16904         * metadata.c (mono_signature_hash): a hash function for signatures
16905         (mono_signature_hash): better hash algorithm
16906
16907         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16908
16909         * debug-helpers.c (mono_method_full_name): this can now generate
16910         method names with signatures
16911
16912         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16913         method dont have this pointers.
16914
16915 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16916
16917         * reflection.c: fixup typebuilder tokens.
16918         * image.c: fix buglet.
16919         * marshal.h: remove whitespace.
16920         * metadata.h, metadata.c: reinstate code that was removed.
16921         * verify.c: handle catch directives and fix another couple of bugs.
16922
16923 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
16924
16925         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16926         (mono_marshal_get_native_wrapper): make it comp. with the old code
16927         (mono_marshal_get_native_wrapper): support boolean
16928         (mono_marshal_get_managed_wrapper): support more types
16929
16930 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
16931
16932         * class.c (class_compute_field_layout): compute class->blittable attribute.
16933
16934 2002-07-09  Dick Porter  <dick@ximian.com>
16935
16936         * threads.c: Make the thread cleaning up cope with threads that
16937         call ExitThread()
16938
16939 2002-07-08  Radek Doulik  <rodo@ximian.com>
16940
16941         * reflection.c (method_encode_code): use non-translated values to
16942         compute finally_start, this fixes exception handling on ppc, yay!
16943
16944         * decimal.h (struct signscale): fix endianess
16945
16946 2002-07-07  Radek Doulik  <rodo@ximian.com>
16947
16948         * reflection.c: swap box_val and not val
16949
16950 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16951
16952         * reflection.c, reflection.h: handle full assembly info in type name.
16953         Handle Type arguments when loading custom attributes.
16954         * icall.c: updated to use new mono_reflection_type_from_name () method.
16955
16956 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16957
16958         * loader.c:
16959         (method_from_memberref): also print assembly name when method not found.
16960
16961 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16962
16963         * icall.c:
16964         (ves_icall_TypeGetProperties): fixed bug #27473. 
16965
16966 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16967
16968         * reflection.c: display image name and token when cannot find the
16969         .ctor for an attribute.
16970
16971 2002-07-05  Martin Baulig  <martin@gnome.org>
16972
16973         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16974
16975 2002-07-04  Dick Porter  <dick@ximian.com>
16976
16977         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16978         compile on mingw.  This will cause mingw builds to not wait for
16979         subthreads to terminate after the main thread does.  I've lodged a
16980         bug with the mingw developers for them to wrap OpenThread().
16981
16982 2002-07-03  Dick Porter  <dick@ximian.com>
16983
16984         * threads.c: Store thread IDs instead of handles, because
16985         GetCurrentThread() returns a pseudohandle and therefore stores
16986         useless values.  mono_thread_cleanup() continues checking the
16987         array of threads until it is empty, to cope with subthreads
16988         spawning new threads after the main thread has finished.
16989
16990         * profiler.h:
16991         * profiler.c:
16992         * profiler-private.h: Pass the thread ID to thread profiler
16993         functions, instead of a handle
16994
16995 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16996
16997         * verify.c: fixes to make it more usable.
16998         * pedump.c: added --verify code to verify IL code in an assembly.
16999
17000 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17001
17002         * reflection.c: turn errors into warnings to allow compiling corlib.
17003
17004 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17005
17006         * reflection.c: add special cases to compile corlib.
17007
17008 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17009
17010         * reflection.c: handle properties with only a set method.
17011
17012 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17013
17014         * opcodes.h: add enum with opcodes in opval order.
17015
17016 2002-07-01  Dick Porter  <dick@ximian.com>
17017         
17018         * object.h:
17019         * object.c (mono_runtime_run_main): Removed unneeded argument
17020
17021 2002-06-28  Martin Baulig  <martin@gnome.org>
17022
17023         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17024
17025 2002-06-27  Dick Porter  <dick@ximian.com>
17026
17027         * threads.c: Store the handle in both the parent thread and in the
17028         subthread, to minimise the time between starting a new thread and
17029         storing its ID.
17030
17031 2002-06-26  Dick Porter  <dick@ximian.com>
17032
17033         * appdomain.c (mono_runtime_cleanup): Close the socket library
17034         after all the threads have finished, not before
17035
17036 2002-06-26  Martin Baulig  <martin@gnome.org>
17037
17038         * debug-symfile.c (mono_debug_find_source_location): Added
17039         `guint32 *line_number' argument.  If it's not NULL, store the line number
17040         there and return the file name without the line number.
17041
17042 2002-06-25  Dick Porter  <dick@ximian.com>
17043
17044         * icall.c:
17045         * process.h:
17046         * process.c: Process forking and other support functions
17047
17048 2002-06-25  Dick Porter  <dick@ximian.com>
17049
17050         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
17051         things dont happen when the image is closed.
17052         (mono_image_lookup_resource): Walk the resource section looking
17053         for a particular entry
17054
17055         * cil-coff.h: PE resource section decoding
17056
17057 2002-06-25  Dick Porter  <dick@ximian.com>
17058         
17059         * assembly.h:
17060         * assembly.c: 
17061         (mono_assembly_foreach): Accessor functions to walk the list of
17062         loaded assemblies
17063         (mono_assembly_set_main):
17064         (mono_assembly_get_main): Process methods need to know which
17065         assembly is the "main" one
17066
17067         * object.c (mono_runtime_run_main): Record the main assembly
17068
17069         * debug-helpers.c: Fix typo
17070
17071 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
17072
17073         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
17074         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
17075
17076 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17077
17078         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
17079
17080 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
17081
17082         * image.c (do_mono_image_open): Initialize reference count,
17083         otherwise we leak the MonoImage.
17084
17085 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17086
17087         * reflection.c: small tweak to handle self-hosting.
17088
17089 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17090
17091         * reflection.c: fix type name parse code.
17092
17093 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17094
17095         * reflection.c: break out of the loop.
17096         * image.c: special case corlib.
17097
17098 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17099
17100         * reflection.c: add all the custom attrs at the end to ensure the
17101         ctors have been properly initialized when the attributes are defined
17102         in the current assembly.
17103
17104 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17105
17106         * reflection.c: handle correctly multiple-nested types.
17107
17108 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17109
17110         * row-indexes.h: fix typos.
17111         * reflection.c: adjust for typos and fix method_def_or_ref
17112         encoding in MethodImpl table.
17113
17114 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17115
17116         * reflection.c: fix entry point patching (thanks Serge!).
17117
17118 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
17119
17120         * verify.c: add check for System.Exception
17121
17122 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17123
17124         * image.c, class.c: minifix for code just c&p'ed.
17125         * reflection.c: warning fix.
17126         * object.h, loader.h, domain.c: load also StringBuilder.
17127
17128 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17129
17130         * marshal.h, marshal.c: some support code to handle complex marshaling.
17131
17132 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17133
17134         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
17135         Better signatures with vtable error dump.
17136
17137 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17138
17139         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17140
17141 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
17142
17143         * icall.c (ves_icall_Type_GetField): impl.
17144
17145 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17146
17147         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17148         to retrieve a marshal description blob for a field or param.
17149
17150 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17151
17152         * reflection.h, reflection.c: change order of nested type emission
17153         to avoid table corruption. The NestedTypes table is sorted.
17154         * icall.c: change order of GetConstructor results to workaround mcs bug.
17155
17156 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17157
17158         * reflection.h, reflection.c: handle field and param marshal
17159         information.
17160
17161 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17162
17163         * icall.c, marshal.c marshal.h: more Marshal class implementation.
17164
17165 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17166
17167         * reflection.c: fix call convention.
17168
17169 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17170
17171         * reflection.h, reflection.c: mono_image_get_memberref_token()
17172         takes a type instead of a class, now. Added
17173         mono_image_get_array_token() to create tokens for the special
17174         multi-dim array methods.
17175
17176 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17177
17178         * assembly.c: handle modules (no assembly table). Split
17179         loading references in its own function.
17180         * class.c: handle moduleref resolution scope.
17181         * image.c, image.h: cache module name in image.
17182
17183 2002-06-07  Martin Baulig  <martin@gnome.org>
17184
17185         * reflection.c (mono_image_get_type_info): Only add a class layout entry
17186         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17187
17188 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17189
17190         * icall.c: more signature fixes that used uint instead of int.
17191
17192 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17193
17194         * reflection.c: fixed signature of field refs.
17195
17196 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17197
17198         * class.c, reflection.c: handle typerefs of nested types
17199         (both on read and when writing files).
17200
17201 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17202
17203         * icall.c: fix method signatures that tried to workaround the previous
17204         typo, d'oh!
17205
17206 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17207
17208         * debug-helpers.c: fix typo.
17209
17210 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17211
17212         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17213         rewrote the PE/COFF writing code (our programs are understood by the
17214         ms runtime, now).
17215
17216 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17217
17218         * gc.c, gc.h, icall.c: weakreference support.
17219
17220 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17221
17222         * Makefile.am, mono-config.c: use $(sysconfdir).
17223
17224 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17225
17226         * icall.c: changed default precision of Double.ToString() to 15.
17227         Fixed memory leak. Unified with Single.ToString.
17228
17229 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17230
17231         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17232
17233 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17234
17235         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17236         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17237         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17238         and myself.
17239
17240 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17241
17242         * debug-symfile.c, sysmath.c: yet more compilation fixes.
17243
17244 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17245
17246         * reflection.c, socket-io.c: more compilation fixes.
17247
17248 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17249
17250         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17251         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17252         unicode.c: warning and compiler compatibility fixes.
17253
17254 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17255
17256         * class.h, metadata.c: fixed warnings/compilation errors.
17257
17258 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17259
17260         * Makefile.am, mono-config.c, mono-config.h: configuration file
17261         support routines.
17262         * loader.c, loader.h: make Dll mapping configurable at runtime in the
17263         config file. Export methods to insert and lookup mappings.
17264
17265 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17266
17267         * reflection.c: handle types and boxed objects in custom attr
17268         constructors.
17269
17270 2002-05-30  Martin Baulig  <martin@gnome.org>
17271
17272         * debug-symfile.c
17273         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17274
17275 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17276
17277         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17278         to lookup the implmap row for a P/Invoke method.
17279         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17280         P/Invoke method from the runtime on an as needed basis.
17281
17282 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
17283
17284         * metadata.c (mono_metadata_parse_signature): impl.
17285
17286 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17287
17288         * class.c: handle .pack directive.
17289
17290 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17291
17292         * object.c: initialize static fields with RVA data.
17293
17294 2002-05-25  Martin Baulig  <martin@gnome.org>
17295
17296         * debug-symfile.c
17297         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17298
17299 2002-05-24  Martin Baulig  <martin@gnome.org>
17300
17301         * debug-symfile.c
17302         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17303         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17304         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17305
17306 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17307
17308         * object.c: special case string ctros in invoke.
17309         * gc.c: silly whitespace changes.
17310
17311 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
17312
17313         * threadpool.[ch]: impl. a threadpool that can
17314         be used by mint and mono.
17315
17316 2002-05-22  Martin Baulig  <martin@gnome.org>
17317
17318         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17319         The first argument is now a `MonoReflectionModuleBuilder *', the return
17320         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
17321         `methods' field to get the method builder.  The `token' argument is the
17322         unfixed token.
17323
17324         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17325         invalid characters instead of g_assert_not_reached()ing.  This seems
17326         to be the behaviour of mscorlib.
17327
17328 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
17329
17330         * object.c (mono_runtime_invoke_array): applied patch from Rachel
17331         Hestilow to fix bug #25104
17332
17333 2002-05-21  Martin Baulig  <martin@gnome.org>
17334
17335         * debug-symfile.c (mono_debug_find_source_location): New function.
17336         Looks up an IL offset in the line number table and returns the source
17337         location as a string.
17338
17339 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17340
17341         * icall.c:
17342         (mono_double_ToStringImpl): changed %f by %g until we have something
17343         better.
17344
17345 2002-05-21  Nick Drochak  <ndrochak@gol.com>
17346
17347         * icall.c : Use different name for Math.Pow's icall.  Needed to check
17348         parameters first in C#.
17349
17350 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17351
17352         * icall.c, reflection.h: added icall to get info about an event.
17353
17354 2002-05-20  Radek Doulik  <rodo@ximian.com>
17355
17356         * object.c (mono_value_box): don't use memcpy for boxing on BIG
17357         endian
17358         (mono_value_box): don't use memcpy for small sizes on
17359         architectures with unaligned access
17360
17361 2002-05-20  Martin Baulig  <martin@gnome.org>
17362
17363         * reflection.c (mono_reflection_setup_internal_class): Don't crash
17364         if `tb->parent == NULL'.
17365         (mono_reflection_create_internal_class): New function.  This is
17366         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17367         for enum types.
17368
17369         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17370         New interncall.
17371
17372 2002-05-19  Martin Baulig  <martin@gnome.org>
17373
17374         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17375         argument to get the length, don't default to the array length.
17376
17377 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
17378
17379         * assembly.c (mono_assembly_setrootdir): New function used to
17380         override the MONO_ASSEMBLIES directory.
17381
17382 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17383
17384         * icall.c: ValueType_GetHashCode() initialize local var.
17385
17386 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17387
17388         * reflection.c: sort custom attributes table.
17389
17390 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17391
17392         * reflection.c: support named args in custom attributes (write support).
17393
17394 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17395
17396         * reflection.c: fix finally position calculation.
17397
17398 2002-05-15  Radek Doulik  <rodo@ximian.com>
17399
17400         * reflection.c: fixed endianess at many places
17401
17402         * icall.c (ves_icall_InitializeArray): comment out debug msg
17403
17404 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
17405
17406         * object.c (mono_unhandled_exception): new function to handle
17407         unhandled exceptions.
17408         (mono_unhandled_exception): call the UnhandledException event.
17409         (mono_runtime_delegate_invoke): impl.
17410
17411 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17412
17413         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17414         returns the RVA, not the direct pointer to the data. Handle the case
17415         when the class size is fixed.
17416
17417 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17418
17419         * reflection.c: fix some endianess issues.
17420
17421 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
17422
17423         * object.c (mono_runtime_invoke): is now able to catch exceptions.
17424
17425         * threads.c (mono_thread_init): added a callback which is invoked
17426         at thread start.
17427
17428 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17429         
17430         * icall.c: make GetHashCode return non-negative values.
17431
17432 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17433
17434         * object.c, icall.c, gc.c: revert to address-based hashcode.
17435
17436 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
17437
17438         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17439
17440 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17441
17442         * icall.c, class.c: special case <Module>.
17443
17444 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
17445
17446         * icall.c: fix bug in GetNow().
17447
17448 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
17449
17450         * object.c (mono_runtime_class_init): make sure that we call all
17451         static class constructors.
17452
17453 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17454
17455         * reflection.c: sort methodsemantics table.
17456
17457 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17458
17459         * reflection.h, reflection.c: honour init locals setting.
17460
17461 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17462
17463         * icall.c: copied Double ToStringImpl for Single ToStringImpl
17464
17465 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17466
17467         * reflection.c: support ContructorBuilders in attribute blob creation.
17468
17469 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17470
17471         * reflection.c: some changes to build a binary that can be run
17472         directly in windows.
17473
17474 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17475
17476         * loader.c: print a big message when an icall can't be found.
17477
17478 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17479
17480         * string-icalls.c: fix bug 24248.
17481
17482 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17483
17484         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17485         icall.c, reflection.h: separate assembly loading by pathname and by
17486         assembly name. Use the MONO_PATH env var to search for assemblies.
17487
17488 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17489
17490         * assembly.c, image.h: add some support for assemblies
17491         with multiple modules.
17492         * class.c, class.h: export mono_class_from_typeref().
17493         * loader.c: remove duplicated code and use mono_class_from_typeref(),
17494         instead.
17495
17496 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17497
17498         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17499         documentation says (the ECMA one is correct).
17500
17501 2002-05-02  Dick Porter  <dick@ximian.com>
17502
17503         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17504         Don't name the synchronisation mutex.
17505
17506 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
17507
17508         * rand.c
17509         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17510         Make the prototypes match.
17511         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17512         Same.
17513
17514         * icall.c
17515         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17516         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17517         all systems have tm.tm_zone, so use strftime() with %Z to print
17518         the timezone abreviation into a temp string.
17519
17520         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17521         rather than mono_array_addr() on a MonoString on Big Endian
17522         machines.
17523
17524 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
17525
17526         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17527         fix bug 24041
17528
17529 2002-04-30  Dick Porter  <dick@ximian.com>
17530
17531         * socket-io.c: Cope with SOCKET being an integer rather than a
17532         pointer now.
17533
17534         * threads.c: Added Thread_free_internal, to deal with thread
17535         handle cleanup.  Moved calls to handle_store() and handle_remove()
17536         to start_wrapper(), so each can only be called once.  Allocate
17537         synchronisation blocks with GC_malloc(), and use GC finalisation
17538         to close the handles.
17539
17540         * icall.c: added System.Threading.Thread::Thread_free_internal
17541
17542 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17543
17544         * icall.c: support Environment.Exit, CommandLineArgs().
17545
17546 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17547
17548         * object.c, object.h: added mono_runtime_run_main () and
17549         mono_runtime_get_main_args () for use in System.Environment.
17550
17551 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17552
17553         * gc.c: fix thinko, enable actual finalization since the jit is now
17554         fixed.
17555
17556 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17557
17558         * gc.c, object.c: take into account that an object may be offset wrt the address
17559         returned by GC_malloc().
17560
17561 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17562
17563         * image.c: handle files without entries in the assembly table (modules).
17564
17565 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17566
17567         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
17568         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17569         allowed to be null when it's System.Object class setup.
17570
17571 2002-04-27  Martin Baulig  <martin@gnome.org>
17572
17573         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17574         if `tb->parent == NULL' rather than crashing.
17575
17576 2002-04-28  Nick Drochak  <ndrochak@gol.com>
17577
17578         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
17579         calling acos() where asin() should have been called.
17580
17581 2002-04-26  Martin Baulig  <martin@gnome.org>
17582
17583         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17584         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17585         there's a subdirectory called `System', but we don't want to read that
17586         subdirectory as an assembly.
17587
17588 2002-04-25  Martin Baulig  <martin@gnome.org>
17589
17590         * debug-symfile.c: Reflect latest MonoString changes.
17591
17592 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17593
17594         * rand.c, rand.h: instance method icalls need to have an explicit
17595         this pointer as first argument in the C implementation.
17596
17597 2002-04-25  Nick Drochak <ndrochak@gol.com>
17598
17599         * icall.c: Fix typo in map for GetNonZeroBytes
17600
17601 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17602
17603         * string-icalls.c : String does now passes unit tests without any 
17604         errors, the following changes has been made:
17605         
17606         Implemented replace methods.
17607         Renaming of methods to (try) follow the standard.
17608         Fixed compare ordinal
17609         Made all memory allocated directly to function instead of via icall function.
17610         Small performance fix in is_in_array function
17611                         
17612  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17613
17614         c (mono_string_Internal_ctor_charp_int_int):
17615         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
17616         sindex < 0, throw ArgumentOutOfRangeException instead of
17617         ArgumentNullException.
17618
17619         Added new check for length == 0, however
17620         I need to make it return String.Empty from the C code.
17621         
17622         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17623         that calculate the length for us here.
17624         
17625         (mono_string_Internal_ctor_sbytep_int_int): Replaced
17626         mono_string_new_utf16 with mono_string_new, since value is utf8.
17627
17628 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17629
17630         * object.c: register the object for finalization if needed.
17631         Allocate one more char in the string for the terminating 0 char.
17632
17633 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17634
17635         * class.c, class.h, image.c: check if a type implemenst a destructor.
17636         Use the proper key for array class lookups.
17637         * icall.c: register the icalls in the System.GC class.
17638         * gc.c, gc.h: GC-related functions and icalls.
17639
17640 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17641
17642         * icall.c:
17643         * socket-io.c:
17644         * unicode.c: free some strings gotten from mono_string_to_utf8 and
17645         changed a couple of free () by g_free ().
17646
17647         * decimal.c: one-liner in the comments for decimal2string ().
17648
17649 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17650
17651         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17652
17653 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17654
17655         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17656         * object.c (mono_runtime_invoke_array) : handle null in params
17657
17658 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17659
17660         * string-icalls.c: fixed bug in split (one off bug)
17661
17662 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17663
17664         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17665         * icalls.c: added String::Equals as internal method
17666
17667 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17668
17669         * threads.c: fixed bug in the double interlocked functions
17670
17671 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
17672
17673         * threads.c: implemented all of the new interlocked icalls.
17674         * string-icalls.c: fix a bug in insert.
17675         * icalls.c: added the icalls for interlocked, removed old string functions.
17676         
17677 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17678
17679         * loader.c: fix off-by-one error when reading argument names.
17680
17681 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17682
17683         * profiler.c: win32 counter implementation (untested).
17684         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17685         (the latter needs testing and more complete impl. from win32 folks).
17686
17687 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
17688
17689         * object.c: mono_array_new_full workaround mono_array_class_get
17690         problem.
17691
17692 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17693
17694         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17695         * object.h (mono_string_chars): Changed casting type.
17696
17697 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17698
17699         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17700                            method signatures to use gunichar2 instead of gint16.
17701
17702 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
17703
17704         * object.h, object.c: domain-specific versions of mono_object_new and
17705         mono_array_new.
17706
17707 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
17708
17709         * object.c: changed String layout
17710
17711         * string-icalls.c (mono_string_Internal_ctor_chara): added
17712         internal string constructors.
17713
17714 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17715
17716         * threads.c: pass 'this' to the thread start routine.
17717
17718 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17719
17720         * string-icalls.c: fix IndexOf and LastIndexOf. Now
17721         InternalCompareStr don't call twice mono_string_cmp_char for the last
17722         character. Improved performance in mono_string_cmp_char.
17723
17724 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17725
17726         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17727         code into its own library: libmonoruntime.
17728
17729 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
17730
17731         * object.h, object.c: changed array format so that szarrays do not
17732         require a bounds structure.
17733         * icall.c, appdomain.c: support for new szarray format.
17734
17735 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17736
17737         * metadata.c: compare also the retuns type when comparing signatures:
17738         we didn't do this as an optimization since really overloaded methods
17739         must differ also in the arguments, but this doesn't work with
17740         low-level IL code (or when using explicit conversion operators: see
17741         bug#23498 for an example).
17742
17743 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17744
17745         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17746
17747 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17748
17749         * icall.c: make MonoType::GetElementType its own icall.
17750
17751 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17752
17753         * icall.c: remove MonoMethod_get_Name().
17754         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17755         object.
17756
17757 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17758
17759         * string-icalls.c: optimized a few methods.
17760
17761 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
17762
17763         * icall.c: added all new string internal calls
17764         * string-icalls.c: added, new string internal call implementation.
17765         * object.c: added mono_string_new_size for allocating a string a size
17766
17767 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
17768
17769         * object.c (mono_object_isinst): use the same code as in the
17770         optimized x86 version.
17771
17772 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17773
17774         * profiler.c: TSC-based timer code (faster and more accurate).
17775         Not hooked up in configure, yet (set USE_X86TSC to 1).
17776
17777 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17778
17779         * profiler.c, profiler.h: track time spent compiling methods.
17780         * threads.c: track thread creation/destruction.
17781
17782 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17783
17784         * profiler.c, profiler.h, profiler-private.h: profiling interface
17785         and sample implementation. Moved here so that it can be used also by
17786         the jit.
17787
17788 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17789
17790         * reflection.c, reflection.h: keep types and other handles separate in
17791         the hash tables for referred tokens. Add guid for modules.
17792
17793 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17794
17795         * assembly.c: fix bugs found with valgrind.
17796         * metadata.h, metadata.c: added mono_metadata_guid_heap().
17797
17798 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
17799
17800         * threads: added icall support for getting current domain for
17801                    the thread.
17802  
17803 2002-04-13  Martin Baulig  <martin@gnome.org>
17804
17805         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17806         (MonoDebugVarInfo): Added `index' field for register based addresses.
17807         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17808         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17809         `MonoDebugVarInfo *params' and `guint32 this_offset' with
17810         `MonoDebugVarInfo *this_var'.
17811
17812         * debug-symfile.c (relocate_variable): New static function to write
17813         a location description for a local variable or method parameter.
17814
17815 2002-04-12  Martin Baulig  <martin@gnome.org>
17816
17817         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17818         stack offset and begin/end scope address of a local variable.
17819         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17820         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17821         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17822
17823         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17824         Added new relocation types for start/end scope of a local variable.
17825
17826 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17827
17828         * object.h: add mono_object_domain() macro.
17829         * reflection.c: handle typespecs.
17830         * icall.c: MonoMethod::get_Name() implementation.
17831
17832 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17833
17834         * icall.c: String::GetHashCode() icall implementation.
17835
17836 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17837
17838         * icall.c: String::IndexOfAny icall.
17839         * object.c, object.h: make array->max_length more useful.
17840         Intrduced mono_object_class() and mono_string_length() macros.
17841
17842 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17843
17844         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17845         instead of g_unichar_isdigit.
17846
17847 2002-04-11  Nick Drochak  <ndrochak@gol.com>
17848
17849         * icall.c: Implement a simple Double.ToString().
17850
17851 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17852
17853         * appdomain.h: only io-layer.h is supposed to be included.
17854         * icall.c: explicitly import environ. Fix warning.
17855
17856 2002-04-10  Nick Drochak  <ndrochak@gol.com>
17857
17858         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17859                 return true even if it's not Daylight Savings time.
17860                 Only return false for the case where the function isn't
17861                 implemented for a plaform (read Windows).
17862
17863 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17864
17865         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17866         data with a mutex.
17867
17868 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
17869
17870         * mempool.c (mono_mempool_alloc): only use g_malloc when
17871         absolutely necessary.
17872
17873 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17874
17875         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17876
17877         * class.c (mono_class_vtable): use domain mempool to allocate vtable
17878         (mono_class_proxy_vtable): use domain mempool
17879
17880 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17881
17882         * appdomain.h, appdomain.c: split initialization that requires the
17883         execution engine support into mono_runtime_init().
17884
17885 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
17886
17887         * class.c (mono_class_init): don't include vtable inside MonoClass
17888         to save some memory, gather some statistics.
17889         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17890
17891 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17892
17893         * icall.c: internalcall implementation for ValueType.Equals().
17894
17895 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
17896
17897         * object.c (mono_message_init): moved 
17898         (mono_runtime_exec_main): new arch. independent impl.
17899         (mono_runtime_invoke_array): new method - like
17900         mono_runtime_invoke, but you can pass an array of objects.
17901         (mono_remoting_invoke): new arch. independent impl.
17902         (mono_message_invoke): new arch. independent impl.
17903         (mono_runtime_class_init): new arch. independent impl.
17904         (mono_runtime_object_init): new arch. independent impl.
17905
17906 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17907
17908         * metadata.c, object.c, reflection.c: documented the exported
17909         functions.
17910
17911 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17912
17913         * icall.c: simpler code to pass the assembly builder data to corlib.
17914         Implement GetNestedTypes() internalcall.
17915
17916 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17917
17918         * class.c: warn if a type can't be loaded.
17919
17920 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
17921
17922         * image.h: typedef MonoImageOpenStatus
17923         * types.h: removed unused file
17924         
17925 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
17926
17927         * icall.c: Enum_ToObject accepts enum value arguments.
17928
17929 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17930
17931         * class.c: move initialization of properties, events and nested
17932         classes, so that they happen for interfaces, too.
17933
17934 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17935
17936         * icall.c: cleanup some ugly casts in Array_SetValue*.
17937
17938 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17939
17940         * icall.c: the values array fro enums is of the correct type, now.
17941         Implement (correctly) getFullName instead of assQualifiedName for
17942         MonoType.
17943         * reflection.h, reflection.c: added mono_type_get_name ().
17944
17945 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17946
17947         * assembly.c, image.h: for each MonoImage, record from wich assembly
17948         it was loaded.
17949         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17950         Make Type.Assembly work.
17951
17952 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
17953
17954         * debug-symfile.h: use char* instead of gpointer to avoid
17955         unnecessary casts.
17956
17957         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17958
17959         * icall.c (ves_icall_InternalExecute): impl. FielSetter
17960         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17961
17962 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
17963
17964         * icall.c (mono_message_init): impl. (code cleanup)
17965         (ves_icall_InternalExecute): impl. FieldGetter
17966
17967         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17968         defined we call all (non-static)methods through the vtable. 
17969
17970 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17971
17972         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17973         finalizer even though the memory is still referenced (and the chunk of
17974         memory is not freed).
17975
17976 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17977
17978         * assembly.c: fix brokeness.
17979
17980 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17981
17982         * class.c: kill some warnings. Check explicit interface method
17983         implementation also without considering the namespace.
17984         Load also literal strings in static class data.
17985
17986 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
17987
17988         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
17989         (default_assembly_name_resolver): Make the resolver take the
17990         "base" directory where the assembly was originally defined, so we
17991         can load DLLs that are in the same directory as the assembly that
17992         is being referenced.
17993
17994 2002-03-28  Dick Porter  <dick@ximian.com>
17995
17996         * file-io.h: 
17997         * file-io.c:
17998         * socket-io.c: 
17999         * unicode.h: 
18000         * unicode.c: Warning cleanups
18001
18002 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
18003
18004         * object.h, reflection.h: use the correct type instead of MonoObject.
18005
18006 2002-03-28  Martin Baulig  <martin@gnome.org>
18007
18008         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
18009         (mono_debug_update_symbol_file): Initialize classes if necessary.
18010
18011 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18012
18013         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
18014         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
18015
18016 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
18017
18018         * assembly.h: fix function prototype.
18019         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
18020         * mono-endian.h: use const cast.
18021
18022 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
18023
18024         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
18025
18026 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18027
18028         * loader.c: don't assert when a typeref can't be loaded, give
18029         a chance to the runtime to trow an exception instead.
18030         * loader.h: fix warning.
18031
18032 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
18033
18034         * class.c (mono_class_proxy_vtable): added proxy support
18035
18036 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
18037
18038         * icall.c: removed last of PAL calls, added System.Environment
18039         * file-io.h, file-io.c: MonoIO implementation
18040         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
18041
18042 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18043
18044         * appdomain.c: do not use the byte marker in ldstr table lookup.
18045         * debug-helpers.c: allow two ':' to separate class and method name.
18046         * object.c: allocate arrays bounds with the GC, too.
18047         * verify: add a few more checks.
18048
18049 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
18050
18051         * reflection.c: output also literal strings. Allocate parameter data
18052         with GC_malloc() (thanks, Martin, for catching this!).
18053
18054 2002-03-26  Martin Baulig  <martin@gnome.org>
18055
18056         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
18057         include the `this' offset in the `param_offsets'.
18058
18059 2002-03-25  Martin Baulig  <martin@gnome.org>
18060
18061         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
18062         mono_debug_get_class() function to get the classes. Added new
18063         relocation types for arrays and strings.
18064         (mono_debug_get_class): New static function to search in all
18065         referenced assemblies for a metadata token.
18066
18067         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
18068
18069 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18070
18071         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
18072         hold gc-allocated objects. Make the string heap a stream like the
18073         others. Removed duplicated code when writing stream info.
18074         Added asserts to catch possible buffer overflows. Set the sorted map
18075         for tables that need sorting. Added some documentation.
18076
18077 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
18078
18079         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
18080         for interned strings and vtables.
18081
18082 2002-03-24  Martin Baulig  <martin@gnome.org>
18083
18084         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
18085         it in the array since it was created with g_slist_prepend().
18086
18087 2002-03-24  Martin Baulig  <martin@gnome.org>
18088
18089         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
18090         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
18091         (mono_debug_method_from_token): Renamed to
18092         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
18093         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
18094
18095         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
18096         relocation types.
18097
18098         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
18099
18100 2002-03-24  Martin Baulig  <martin@gnome.org>
18101
18102         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
18103         (mono_debug_method_from_token): New func.
18104
18105         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
18106         New interncall, calls mono_debug_local_type_from_signature().
18107         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
18108         calls mono_debug_method_from_token().
18109
18110 2002-03-23  Martin Baulig  <martin@gnome.org>
18111
18112         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
18113         specifies the number of bytes to be converted, not the array size.
18114         Return the number of chars, not the number of bytes.
18115         (ves_icall_iconv_get_chars): The `byteCount' argument
18116         specifies the number of bytes to be converted, not the array size.
18117
18118 2002-03-23  Martin Baulig  <martin@gnome.org>
18119
18120         * reflection.h (MonoReflectionSigHelper): New type.
18121
18122         * reflection.c (mono_reflection_sighelper_get_signature_local),
18123         (mono_reflection_sighelper_get_signature_local): New functions.
18124
18125         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
18126         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
18127         interncalls.
18128
18129 2002-03-23  Martin Baulig  <martin@gnome.org>
18130
18131         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
18132         is_writeable is set.
18133         (mono_raw_buffer_update): New function to write the modified map
18134         back to disk.
18135
18136         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18137
18138         * debug-symfile.c (mono_debug_update_symbol_file): Call
18139         mono_raw_buffer_update() when done writing.
18140
18141 2002-03-23  Martin Baulig  <martin@gnome.org>
18142
18143         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18144
18145         * debug-symfile.c: Added support for arguments and local variables.
18146
18147 2002-03-23  Dick Porter  <dick@ximian.com>
18148
18149         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18150         protected by ifdefs, hence breaking the w32 build.
18151
18152 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18153
18154         * object.c: implement is_interned() the right way.
18155
18156 2002-03-21  Martin Baulig  <martin@gnome.org>
18157
18158         * debug-symfile.[ch]: New files to handle debugging information
18159         files. There's also support to dynamically update these symbol
18160         files to include machine dependent information.
18161
18162 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
18163
18164         * threads.c (mono_thread_create): new function to create thread
18165         from C
18166
18167 2002-03-20  Martin Baulig  <martin@gnome.org>
18168
18169         * icall.c (ves_icall_InternalInvoke): Create a new object if the
18170         method is a constructor.
18171         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18172         points to ves_icall_InternalInvoke().
18173
18174 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
18175
18176         * file-io.c: Flush shouldn't throw exceptions.
18177
18178 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
18179
18180         * file-io.c: FileStream flush support; FileSetLength now
18181         restores file pointer.
18182
18183 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18184
18185         * class.c: set image for pointer classes.
18186
18187 2002/03/19  Nick Drochak <ndrochak@gol.com>
18188
18189         * sysmath.c: Forgot one.
18190
18191 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
18192
18193         * sysmath.c: Avoid redefining existing names.
18194
18195 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
18196
18197         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18198         handled by runtime as icall rather than dllimport from libm.so
18199         * file-io.c, file-io.h: fixed handle argument type.
18200
18201 2002-03-18  Dick Porter  <dick@ximian.com>
18202
18203         * reflection.c (mono_image_get_type_info): rename interface to
18204         iface, because of "#define interface struct" on windows.
18205
18206 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18207
18208         * class.c, class.h: rename and export mono_ptr_class_get().
18209         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18210         * reflection.c, reflection.h, icall.c: better/saner type name
18211         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18212         method signatures.
18213
18214 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
18215
18216         * class.c (mono_class_init): removed hardcoded GHC_SLOT
18217
18218         * icall.c (ves_icall_InternalInvoke): impl.
18219
18220 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18221
18222         * reflection.c: output the interface map table, too.
18223
18224 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18225
18226         * class.c (class_compute_field_layout): separate computation of 
18227         static field layout
18228
18229 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
18230
18231         * icall.c: added System.Buffer support.
18232         * file-io.c: moved file icalls from PAL to FileStream.
18233
18234 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18235
18236         * icall.c (ves_icall_System_Object_GetHashCode): impl.
18237
18238 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
18239
18240         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18241
18242 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18243
18244         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18245
18246 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18247
18248         * debug-helpers.{c,h}: moved here from monograph some useful functions
18249         to locate a method by name/signature in a class or image. Included
18250         also a small and flexible IL disassembler.
18251
18252 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18253
18254         * reflection.c: fixup tokens in methods with small header size, too.
18255
18256 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
18257
18258         * object.c (mono_string_to_utf8): remove assert(!error), instead
18259         print a warning. 
18260
18261 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18262
18263         * icall.c: update to the new mono_Array_class_get interface.
18264
18265 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18266
18267         * appdomain.c, object.c: Boehm-GC enable.
18268         * icall.c: make get_data_chunk() support split data requests.
18269         Ensure a class is initialized in more cases. Return only the first
18270         property found in GetProperties() or the compiler gets confused. 
18271         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18272         * reflection.h, reflection.c: add fixup mechanism for field and method
18273         tokens. Initialize assembly->typeref in a single place. Output
18274         properties after events. Support custom attributes for events, too.
18275         Typo fix for paramter custom attrs.
18276
18277 2002-03-07  Martin Baulig  <martin@gnome.org>
18278
18279         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18280
18281 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
18282
18283         * class.c (mono_array_class_get): fix. for multi. dim. arrays
18284
18285 2002-03-06  Martin Baulig  <martin@gnome.org>
18286
18287         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18288         non-zero lower bounds. See testcases #F10-#F13.
18289
18290 2002-03-05  Martin Baulig  <martin@gnome.org>
18291
18292         * exception.c (mono_get_exception_argument_out_of_range): New exception.
18293
18294         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18295         ves_icall_System_Array_GetValue(), only calculate the absolute array position
18296         here.
18297         (ves_icall_System_Array_SetValue): Likewise.
18298         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18299         as argument and does the actual work. This function is used when copying a
18300         multi-dimensional array.
18301         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18302         now do all the widening conversions of value types.
18303         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18304
18305 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18306
18307         * class.c: remove some magic numbers and use the smbolic names,
18308         instead. Added init_events() to load event info at class init time.
18309         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18310         and mono_metadata_methods_from_event().
18311         * reflection.h, reflection.c: added support for writing out the evnets
18312         related information.
18313
18314 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18315
18316         * reflection.h, icall.c: use a different method (GetInterfaces)
18317         to gather interface info and add isbyref, isprimitive and
18318         ispointer to the ves_icall_get_type_info() return value.
18319
18320 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18321
18322         * class.h: stared adding support for events.
18323         * icall.c: split find_members implementation. Added debug icall to get
18324         the address of an object.
18325         * reflection.c: handle TypeBuilders in mono_type_get_object().
18326
18327 2002-03-01  Martin Baulig  <martin@gnome.org>
18328
18329         * icall.c (ves_icall_System_Array_GetLength): This must throw an
18330         ArgumentOutOfRangeException(), not an ArgumentException().
18331         (ves_icall_System_Array_GetLowerBound): Likewise.
18332         (ves_icall_System_Array_GetValue): Improved argument checking.
18333         (ves_icall_System_Array_SetValue): Improved argument checking.
18334
18335 2002-03-01  Martin Baulig  <martin@gnome.org>
18336
18337         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18338         called with invalid arguments rather than just dying with g_assert().
18339         (ves_icall_System_Array_SetValue): Likewise.
18340         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18341         raise a NotImplementedException instead.
18342         (ves_icall_System_Array_GetLength): Added argument checking.
18343         (ves_icall_System_Array_GetLowerBound): Added argument checking.
18344
18345 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
18346
18347         * object.h (mono_assert): new macros mono_assert and
18348         mono_assert_not_reached
18349
18350 2002-02-28  Martin Baulig  <martin@gnome.org>
18351
18352         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18353         and "System::String::IsInterned" to "System::String::_IsInterned".
18354
18355 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18356
18357         * icall.c: remove hacks for typebuilder. Added icall to create a
18358         modified type from a tybebuilder.
18359         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18360         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18361         to create a backing MonoClass for a TypeBuilder.
18362
18363 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18364
18365         * class.c, class.h: more refactoring of class init.
18366         Export mono_class_setup_mono_type() and mono_class_setup_parent().
18367
18368 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18369
18370         * marshal.c, marshal.h: start of marshaling interface.
18371
18372 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18373
18374         * icall.c: fix order in assembly qualified name icall.
18375
18376 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18377
18378         * class.c: do not free str, since we store it in the hash table.
18379         * reflection.h: add label field to MonoILExceptionInfo.
18380         * reflection.c: handle references to more than one assembly. Handle
18381         case when there isn't a module created in the assembly.
18382
18383 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18384
18385         * class.c: Fix typo. Start refactoring of class init code.
18386
18387 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18388
18389         * appdomain.c: exit with 1 on error.
18390         * class.c: we already have the name in MonoClassField.
18391         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18392         MonoStreamHeader instead of an offset of image->raw_metadata.
18393
18394 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
18395
18396         * appdomain.c (mono_init): Be even more descriptive about the error.
18397
18398 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18399
18400         * appdomain.c: give the user an informative message when corlib can't
18401         be loaded.
18402
18403 2002-02-26  Martin Baulig  <martin@gnome.org>
18404
18405         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18406         New icall to get the time zone data.
18407
18408 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18409
18410         * reflection.c: set virtual and raw size of section correctly.
18411         * threads.c: transfer domain information to newly created threads.
18412
18413 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18414
18415         * class.c: when instancing a class in a domain, load the default
18416         vaules for static fields from the constant table. Fix System.Enum to
18417         not be an enum.
18418         * icall.c: implement Object::GetType() internalcall. Implemented
18419         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18420         Fixed checking of binding flags in find_members().
18421         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18422         * reflection.c: handle enumerations when writing to the constant
18423         table. Use a different object cache for types.
18424
18425
18426 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
18427
18428         * object.c (mono_object_isinst): fix for arrays
18429
18430         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18431
18432 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18433
18434         * object.c: don't use mprotect ()  and fix intern pool hash table
18435         lookup for big endian systems.
18436
18437 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18438
18439         * icall.c: change type_is_subtype_of () signature.
18440
18441 2002-02-21  Mark Crichton  <crichton@gimp.org>
18442
18443         * rand.c, rand.h: Added random number generator for
18444         System.Security.Cryptography classes.
18445
18446         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18447
18448         * icall.c: Added System.Security.Cryptography calls.
18449
18450 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18451
18452         * class.c, icall.c, metadata.c: better support for pointer types.
18453         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18454         * reflection.c: Add support for getting custom attrs for properties
18455         and simplify some code.
18456
18457 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18458
18459         * icall.c: change getToken () and add custom attribute GetBlob()helper
18460         method.
18461         * reflection.h: add custom attrs array to the reflection builder structures.
18462         * reflection.c: encode and emit custom attributes for all the relevant
18463         reflection objects. Cache fieldref and methodref tokens. Change
18464         mono_image_create_token() interface to take a MonoDynamicAssembly.
18465         More complete custom attributes decoder. Load custom attributes for
18466         Assembly, Field, Method and Constructor objects, too. Make the
18467         returned array an Attribute[] one, not object[]. Added
18468         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18469         custom attribute constructor.
18470
18471 2002-02-20  Dick Porter  <dick@ximian.com>
18472
18473         * icall.c:
18474         * rawbuffer.c:
18475         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18476         problem code out for now).
18477
18478 2002-02-19  Radek Doulik  <rodo@ximian.com>
18479
18480         * object.c (mono_ldstr): use hash table to avoid multiple swapping
18481
18482 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18483
18484         * icall.c: register the GetCustomAttributes method.
18485         * object.c, object.h: add mono_string_new_len ().
18486         * reflection.h, reflection.c: added mono_runtime_invoke(),
18487         mono_install_runtime_invoke(). Added
18488         mono_reflection_get_custom_attrs () to load custom attributes and
18489         create the attribute objects.
18490
18491 2002-02-19  Dick Porter  <dick@ximian.com>
18492         * threads-dummy-types.c:
18493         * threads-dummy-types.h:
18494         * threads-dummy.c:
18495         * threads-dummy.h:
18496         * threads-pthread-types.c:
18497         * threads-pthread-types.h:
18498         * threads-pthread.c:
18499         * threads-pthread.h:  Deleted obsolete files
18500
18501 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
18502
18503         * class.c (mono_class_vtable): runtime init the class when we
18504         allocate static class data.
18505
18506         * icall.c (ves_icall_System_Array_SetValue): check for null values.
18507
18508         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18509         and String - but we will need generic marshalling support in the
18510         future. 
18511         (mono_init): set the domain name in a ms compatible way
18512
18513         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18514         String[].
18515
18516 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
18517
18518         * object.c (mono_array_clone): use alloca() instead of g_malloc  
18519         for sizes
18520
18521         * appdomain.c (mono_domain_unload): impl.
18522
18523 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18524
18525         * appdomain.c, object.c: fix intern pool implementation.
18526         * class.c: fix alignment code.
18527
18528 2002-02-16  Radek Doulik  <rodo@ximian.com>
18529
18530         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18531         and s2 > s1, just copy lower bytes to be compatible with little
18532         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18533         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18534
18535         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18536         force big_endian to be 1 for big endian machines 
18537         (ves_icall_iconv_new_decoder): ditto
18538
18539 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
18540
18541         * socket-io.c (convert_sockopt_level_and_name): If the system
18542         doesn't define SOL_IP or SOL_TCP, get them by hand using
18543         getprotobyname() and caching the values (because this could be a
18544         slow operation).
18545         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18546         Use the appropriate struct when the system does support it. Ie,
18547         not all systems have struct ip_mreqn so use struct ip_mreq when
18548         appropriate.
18549
18550 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18551
18552         * reflection.c: handle finally clauses.
18553
18554 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18555
18556         * socket-io.c: use g_snprintf() instead of snprintf.
18557
18558 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18559
18560         * reflection.c (mono_param_get_objects): Cast second argument to
18561         mono_method_get_param_names to a const char** to silence the
18562         compiler warning.
18563
18564         * appdomain.c (mono_domain_assembly_open): Put parens around the
18565         truth statement in the for-loop.
18566
18567         * unicode.c (iconv_convert): Got rid of a compiler warning about
18568         int i being unused when the system has a new iconv.
18569         (iconv_get_length): Same.
18570
18571         * image.c (load_class_names): Cast the second argument to
18572         g_hash_table_insert() to char* to hush compiler warnings about the
18573         arg being a const.
18574         (mono_image_open): Same here.
18575
18576         * socket-io.c: Don't conditionally include sys/filio.h or
18577         sys/sockio.h here anymore since we now get them from
18578         io-layer/io-layer.h
18579         (inet_pton): If the system doesn't support inet_aton, implement
18580         using inet_addr and also #define INADDR_NONE if it isn't defined
18581         by the system.
18582
18583 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18584
18585         * metadata.c, metadata.h: added function to get packing and size info
18586         of a typedef.
18587         * reflection.h, reflection.c: handle field RVA data. Save info about
18588         the table layout if needed. Assign typedef indexes to all the types
18589         before dumping the info about them to avoid forward reference problems.
18590
18591 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
18592
18593         * socket-io.c (convert_sockopt_level_and_name): ifdef
18594         SO_ACCEPTCONN because it is not defined on my system (old debian)
18595
18596 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18597
18598         * opcode.c: use stddef.h to get NULL.
18599
18600 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18601
18602         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18603         for FIONBIO, FIONREAD and SIOCATMARK.
18604         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18605         define INADDR_NONE and besides, inet_addr() is deprecated and
18606         should not be used. Use inet_pton() instead - it also has the
18607         added bonus that it can easily handle IPv6 addresses as well.
18608         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18609
18610 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18611
18612         * decimal.c: remove _MSC_VER conditional.
18613
18614 2002-02-13  Dick Porter  <dick@ximian.com>
18615
18616         * socket-io.c: 
18617         * icall.c: Internal calls for Blocking, Select, Shutdown,
18618         GetSocketOption and SetSocketOption
18619
18620 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18621
18622         * assembly.cs: better resolver: use it instead of some kludgy
18623         code.
18624
18625 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18626
18627         * reflection.c: the best way to speed-up the compiler is to avoid
18628         infinite loops.
18629
18630 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
18631
18632         * class.c (mono_class_vtable): changed the object layout
18633         (obj->vtable->class). 
18634         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18635
18636 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18637
18638         * assembly.c: look for assemblies in the assembly dir, too.
18639
18640 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18641
18642         * class.c: fix thinko in mono_class_from_type().
18643
18644 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18645
18646         * exception.h, exception.c: added TypeLoadException.
18647         * object.h, object.c: added mono_array_clone ().
18648         * icall.c: handle throwOnError in AssemblyGetType().
18649         Added Array.Clone().
18650         * opcode.h, opcode.c: use a single value for the opcode val.
18651         Compile fix for non-gcc compilers.
18652
18653 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18654
18655         * opcodes.c, opcodes.h: export interesting info about opcodes.
18656
18657 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
18658
18659         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18660         icalls. 
18661
18662         * class.c (class_compute_field_layout): set element_class for enums
18663         (mono_class_create_from_typedef): set element_class for normal classes
18664
18665         * icall.c (ves_icall_System_Enum_get_value): impl.
18666
18667         * class.c (mono_class_create_from_typedef): do not set valuetype
18668         flag for System.ValueType and System.Enum
18669
18670 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
18671
18672         * unicode.c (iconv_convert): fix big endian problem.
18673
18674 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18675
18676         * class.c: add asserts if we are ever going to scribble over memory.
18677         * socket-io.c: not all systems have AF_IRDA defined.
18678
18679 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
18680
18681         * class.c (class_compute_field_layout): do not consider static
18682         fields to compute alignment
18683
18684 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
18685
18686         * appdomain.c (mono_appdomain_get): impl.
18687         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18688
18689 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18690
18691         * icall.c: ignore "file://" prefix when loading an assembly.
18692
18693 2002-01-23  Dick Porter  <dick@ximian.com>
18694
18695         * socket-io.c:
18696         * icall.c:
18697         * Makefile.am: Added socket support
18698
18699 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18700
18701         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18702         code back.  This should return the assemblies that are loaded by
18703         the runtime on behalf of an application domain. 
18704
18705         The current implementation is still broken, it just returns every
18706         assembly loaded, but until we get real applications domain this
18707         will do.
18708
18709 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
18710
18711         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18712         AppDomain object.
18713
18714 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
18715
18716         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18717         the mono_class_from_name lookup.
18718         (ves_icall_get_parameter_info): ditto.
18719         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18720         method.
18721         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18722
18723 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18724
18725         * class.c: load also nested classes on class init.
18726         System.ValueType instance methods gets passed boxed
18727         values, unless methods in derived classed that get a pointer to the
18728         data.
18729         * icall.c: use better name parsing code in GetType().
18730         * image.c, image.h: add mono_image_loaded ().
18731         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18732         * reflection.c, reflection.h: added mono_reflection_parse_type().
18733
18734 2002-01-22  Veronica De Santis <veron78@interfree.it>
18735
18736         * icall.c : Added mapping of internal calls for Manual and Auto reset events
18737         * threads.c : Added the implementation of internal calls for events
18738         * threads.h : Added prototypes of internal calls for events
18739         
18740 2002-01-21  Radek Doulik  <rodo@ximian.com>
18741
18742         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18743
18744 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
18745
18746         * class.c (mono_class_init): set min_align to 1 (instead of 0)
18747         (mono_class_value_size): use min_align
18748
18749 2002-01-20  Dick Porter  <dick@ximian.com>
18750
18751         * threads.h:
18752         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18753         so it compiles on w32.
18754
18755 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
18756
18757         * metadata.c (mono_type_stack_size): impl.
18758
18759         * class.c (mono_class_get_field): impl. memberref token
18760
18761 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18762
18763         * icall.h : Added the internal calls mapping for CreateMutex_internal
18764                     and ReleaseMutex_internal.
18765         * threads.h : Added the prototype of mutexes internal calls.
18766         * threads.c : Added the implementations of mutexes internal calls.
18767
18768 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18769
18770         * metaparse.h: removed unused file.
18771         * reflection.c, reflection.h: added stream_data_align () function 
18772         to align data in streams and keep stream aligned. Add support for
18773         exception support in method headers.
18774
18775 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18776
18777         * unicode.c: make iconv_convert () return the number of bytess written
18778         in the output buffer.
18779
18780 2002-01-15  Dick Porter  <dick@ximian.com>
18781         * threads.c: Make the runtime's idea of infinite timeouts coincide
18782         with the class library's
18783
18784         Fix a particularly egregious bug in mono_thread_cleanup(). That
18785         code was so utterly bogus it must have been written on a Monday.
18786
18787 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18788
18789         * reflection.h: add subtypes field to TypeBuilder.
18790         * reflection.c: encode constants for literal fields.
18791         Handle subtypes. Fix user string token (and add a zero byte)
18792         at the end.
18793         
18794 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
18795
18796         * class.c (mono_class_init): bug fix: assign slot numbers for
18797         abstract methods.
18798
18799 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18800
18801         * reflection.c: don't try to output a code RVA for abstract methods.
18802         Small fixes for method header format. Output parameter info to the
18803         ParamDef table. Save method overriding info to MethodImpl table.
18804         Fix property support. Allow typedef.extends to be a type in the
18805         building assembly.
18806         * verify.c: fix off-by-one error.
18807
18808 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18809
18810         * class.c: fix mono_class_from_mono_type () for szarray types.
18811         Remove unused cache check in mono_class_from_type_spec().
18812         * icall.c: *type_from_name () functions handle simple arrays and byref.
18813         * reflection.c: handle byref and szarray types. Handle methods without
18814         body (gets P/Invoke compilation working). Handle types and fields in
18815         get_token ().
18816         * reflection.h: add rank to MonoTypeInfo.
18817
18818 2002-01-10  Dick Porter  <dick@ximian.com>
18819
18820         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18821         internal calls
18822
18823 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18824
18825         * icall.c: initialize class in type_from_handle ().
18826         Loop also in parent classes for get_method ().
18827         * reflection.c: properly encode class and valuetype types.
18828         Start on encoding TypeBuilder types. Handle fieldrefs.
18829         Use correct length when registering a user string.
18830         Handle ConstructorBuilder and MonoMethod in get_token ().
18831         Make mono_type_get_object () aware of cached types.
18832         * object.c: back out change to mono_string_new ().
18833
18834 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18835         * object.c: mono_string_new should return a NULL when the string 
18836         passed in is NULL -- not try to deference it.
18837         
18838 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18839
18840         * icall.c: hack to make IsSubType work for TypeBuilders.
18841         * reflection.c: emit constructors before methods.
18842         Retrieve param names in mono_param_get_objects().
18843
18844 2002/01/05  Nick Drochak  <ndrochak@gol.com>
18845
18846         * Makefile.am: fix list of headers and sources so automake 1.5
18847         doesn't complain. Removed \# at end of list.
18848
18849 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18850
18851         * reflection.c: get token for a method ref. Set return type of
18852         constructor to void.
18853         * loader.c: debug message.
18854         * class.c: typo fix.
18855
18856 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18857
18858         * icall.c: fix array init with rank > 1. FindMembers
18859         loops in parent class as well.
18860         * image.c: do not insert nested types in name cache.
18861         * reflection.c: warning fix.
18862         * reflection.h: add override method (for interface impl).
18863
18864 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18865
18866         * metadata.c: fix customattr decoding.
18867
18868 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
18869
18870         * rawbuffer.cs: Added native Win32 implementation, avoids using
18871         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18872
18873 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18874
18875         * class.c: make the low-level routines handle the cache.
18876
18877 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18878
18879         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18880
18881 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18882
18883         * class.c: fix mono_array_element_size() for objects.
18884         * class.h, class.c: add properties to MonoClass and load them
18885         at init time.
18886         * icall.c: check with isinst() when assigning a value to an array
18887         instead of requiring the classes to match exactly.
18888         Implemented icall for System.Type::GetType().
18889         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18890         enums. Handle bindingflags when looking for methods and fields.
18891         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18892         and mono_metadata_methods_from_property().
18893         * reflection.h, reflection.c: added structures for propreties,
18894         parameters and enums. Implemented mono_property_get_object() and
18895         mono_param_get_objects().
18896
18897 2001-12-18  Dick Porter  <dick@ximian.com>
18898
18899         * file-io.c: Use mono_string_to_utf16() instead of
18900         mono_string_chars()
18901
18902         * object.c: Added mono_string_to_utf16(), which copies the non
18903         NULL-terminated MonoString into a new double-null-terminated
18904         buffer.
18905
18906 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
18907
18908         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18909
18910 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
18911
18912         * file-io.c: raise exceptions if handle is invalid.
18913
18914 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18915
18916         * assembly.c: yet another check for mscorlib.
18917         * class.c, class.h: load nesting info for classes.
18918         * icall.c: many new functions to support the Reflection classes.
18919         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18920         * reflection.h, reflection.c: mono_image_create_token(),
18921         mono_assembly_get_object(), mono_type_get_object(),
18922         mono_method_get_object(), mono_field_get_object(): methods to return
18923         objects that parallel the C representation of assemblies, types,
18924         methods, fields.
18925
18926 2001-12-11  Dick Porter  <dick@ximian.com>
18927
18928         * icall.c:
18929         * file-io.c: Internal calls for file IO.
18930
18931 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18932
18933         * tabledefs.h: missing FileAttributes.
18934         * verify.h, verify.c: use is_valid_string () to simplify and check for
18935         valid strings more correctly. Fix warnings and speeling.
18936         Check more tables: Filed, File, ModuleRef, StandAloneSig.
18937         Check code: branches, maxstack, method calls.
18938
18939 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
18940
18941         * object.c (mono_object_allocate): removed static, so that the jit
18942         can allocate value types.
18943
18944         * icall.c (ves_icall_System_DateTime_GetNow): impl.
18945
18946 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18947
18948         * class.c: init enum types right away and register the
18949         token->MonoClass map in mono_class_create_from_typedef ().
18950         * verify.h, verify.c: first cut of the verifier.
18951         * pedump.c: add --verify switch to verify metadata tables.
18952         * tabledefs.h: add some missing enums.
18953
18954 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
18955
18956         * class.c (mono_install_runtime_class_init): impl.
18957         (mono_class_init): renamed mono_class_metadata_init to
18958         mono_class_init, also removed the metadata_inited flag
18959
18960         * object.c (mono_object_isinst): use faster algorithm
18961
18962 2001-11-30  Radek Doulik  <rodo@ximian.com>
18963
18964         * mono-endian.h: reverted last change
18965         added function prototypes
18966
18967         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18968         add mono-endian.c back
18969
18970         * mono-endian.c: returned back, as Paolo pointed out, it's needed
18971         for unaligned access, I've mistaked it with endianess. I am
18972         sorry.
18973         (mono_read16): fix reverted endianess
18974         (mono_read64): ditto
18975         (mono_read32): ditto
18976
18977 2001-11-30  Dick Porter  <dick@ximian.com>
18978
18979         * exception.c: Implement mono_exception_from_name()
18980
18981 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18982
18983         * metadata.h, metadata.c: remove params_size and locals_size and their
18984         calculation from the metadata code: they are only usefult to the
18985         interp.
18986
18987 2001-11-29  Radek Doulik  <rodo@ximian.com>
18988
18989         * object.c (mono_ldstr): swap bytes here, it's probably not the
18990         best place, but works for me now, I'll redo it once I know mono
18991         better, also note that I add PROT_WRITE and don't reset back, also
18992         note that it's only affects big endians, so x86 should be OK
18993
18994         * mono-endian.h (read16): use just glib macros for both endians
18995
18996         * mono-endian.c: removed as glib macros are used in in
18997         mono-endian.h so we don't need to care about endianess for read
18998         macros as glib does that for us already
18999
19000 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
19001
19002         * class.h, class.h: take minimum alignment into consideration so
19003         that the fields of a class remain aligned also when in an array.
19004
19005 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19006
19007         * loader.h, loader.c: add mono_method_get_param_names().
19008         * class.c: 0-init class fields.
19009
19010 2001-11-26  Dick Porter  <dick@ximian.com>
19011
19012         * icall.c:
19013         * threads-types.h:
19014         * threads.c: New file that handles System.Threading on all platforms
19015
19016         * object.c: 
19017         * object.h: Remove the synchronisation struct from MonoObject,
19018         replace it with a pointer that gets initialised on demand
19019
19020         * Makefile.am: Replace all the system-specific threading code with
19021         a single file that uses the new wrapper library
19022
19023 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
19024
19025         * class.c, class.h: add mono_install_trampoline() so that the runtime
19026         can register a function to create a trampoline: removes the ugly
19027         requirement that a runtime needed to export arch_create_jit_trampoline.
19028         * object.h, object.c: added mono_install_handler() so that the runtime
19029         can install an handler for exceptions generated in C code (with
19030         mono_raise_exception()). Added C struct for System.Delegate.
19031         * pedump.c: removed arch_create_jit_trampoline.
19032         * reflection.c: some cleanups to allow registering user strings and
19033         later getting a token for methodrefs and fieldrefs before the assembly
19034         is built.
19035         * row-indexes.h: updates and fixes from the new ECMA specs.
19036
19037 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
19038
19039         * class.h, class.c: add enum_basetype field to MonoClass.
19040         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
19041         to get index in the constant table reated to a field, param or
19042         property.
19043         * reflection.h, reflection.c: handle constructors. Set public-key and
19044         version number of the built assembly to 0.
19045         * row-indexes.h: update from new ECMA spec.
19046
19047 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19048
19049         * class.h, class.c: add a max_interface_id to MonoClass.
19050         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
19051         since it's used to do that. Added mono_type_type_from_obj().
19052         Make GetType() return NULL instead of segfaulting if the type was not
19053         found. Handle simple arrays in assQualifiedName.
19054         * object.h: add a struct to represent an Exception.
19055         * reflection.c: output call convention in method signature.
19056         Add code to support P/Invoke methods and fixed offsets for fields.
19057
19058 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
19059
19060         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
19061         the value.
19062         * icall.c: use mono_array_addr instead of array->vector: fixes the
19063         reflection image writing.
19064         * reflection.c: init call convention byte to 0 in method signature.
19065         Encode the property signature. Don't output property-related methods
19066         twice. Really process the properties for a type (don't cast a field to
19067         a property, my mom always told me that).
19068         Fix 64 bit issues in pointer alignment in a different and more
19069         readable way.
19070
19071 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
19072
19073         * loader.h: Removed type class from MonoDefaults, added monotype
19074
19075         * loader.c: Loaded MonoType, removed loading of Type
19076
19077         * icall.c (my_mono_new_object): Now returns a System.MonoType,
19078         and fills in System.Type._impl with a RuntimeTypeHandle rather
19079         than the actual MonoClass *
19080
19081         (ves_icall_type_from_handle): change from type_class to
19082         monotype_class
19083
19084         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
19085         implemented
19086
19087         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
19088         implemented
19089
19090         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
19091
19092         (ves_icall_System_Reflection_Assembly_GetType): implemented
19093
19094         (ves_icall_System_MonoType_assQualifiedName): implemented
19095
19096         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
19097
19098 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
19099
19100         * assembly.c (mono_assembly_open): Implement a cache for the
19101         assemblies. 
19102
19103         (mono_assembly_close): only destroy the assembly when the last
19104         reference is gone.
19105         
19106 2001-11-09  Dick Porter  <dick@ximian.com>
19107
19108         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
19109
19110 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
19111
19112         * class.c (mono_class_metadata_init): bug fix: compute the right slot
19113
19114 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19115
19116         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
19117         from Martin Weindel.
19118         * object.h: add mono_string_chars ().
19119
19120 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
19121
19122         * reflection.c (build_compressed_metadata): Eliminates warnings
19123         and uses 64-bit clean code.
19124
19125         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
19126         (mono_type_equal): Change signature to eliminate warnings.
19127
19128 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19129
19130         * icall.c, loader.c: remove the internalcall array constructors.
19131         Changes to match the new MonoArray structure.
19132         * object.h, object.c: an array object doesn't allocate an extra
19133         vector. Add mono_array_new_full () to create jagged arrays easily.
19134
19135 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19136
19137         * metadata.h, metadata.c: add mono_metadata_field_info () to
19138         retreive all the info about a field from vairous tables.
19139         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19140         * class.h, class.c: augment MonoClassField with more info.
19141         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19142         policy and load a field's RVA if needed.
19143
19144 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
19145
19146         * class.c (mono_class_metadata_init): create a trampoline for all
19147         virtual functions instead of actually compiling them.
19148
19149 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19150
19151         * class.h, class.c: include name in MonoClassField.
19152         * class.c: fix fundamental type of System.Object and System.String.
19153         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19154         tokens in ldtoken.
19155         * icall.c: remove internalcalls for the Reflection stuff that is now
19156         done in C# code.
19157         * loader.c: mono_field_from_memberref () implementation.
19158         * mono-endian.c: thinko (s/struct/union/g).
19159         * object.c, object.h: make the mono_string_* prototypes actually use
19160         MonoString instead of MonoObject.
19161         * reflection.c, reflection.h: updates for changes in the reflection
19162         code in corlib: we use C structures that map to the actual C# classes.
19163         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19164         fat method header if needed and use the info from the ILGenerator for
19165         methods. Handle fields in types. Misc fixes.
19166
19167 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
19168
19169         * class.c (mono_class_metadata_init): bug fix: always allocate
19170         space for static class data
19171
19172 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
19173
19174         * class.c (mono_compute_relative_numbering): use relative
19175         numbering to support fast runtime type checks.
19176
19177 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
19178
19179         * class.c (mono_class_create_from_typeref): added debugging output
19180         to print class name when MonoDummy is returned instead of real class
19181
19182 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
19183
19184         * class.c (mono_class_metadata_init): interface offset table now
19185         contains pointers into the vtable - this is more efficient for the jit
19186
19187 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
19188
19189         * class.c (mono_class_metadata_init): use a temporary vtable (the
19190         old algorithm only worked for the interpreter, but not for the jit)
19191
19192 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
19193
19194         * loader.c (method_from_memberref): use mono_class_get to get the
19195         class of an array instead of using System.Array directly.
19196         (mono_get_method): also add MEMBERREF methods to the method cache
19197         which usefull for arrays.
19198
19199 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
19200
19201         * pedump.c (arch_compile_method): added to compute vtable entry
19202
19203         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19204         number of interfaces.
19205         
19206         * class.h: merged MonoArrayClass into MonoClass
19207
19208         * class.c (mono_class_create_from_typedef): compute the vtable size and
19209         allocate space to include the vtable inside MonoClass
19210         (mono_class_metadata_init): initialize the vtable
19211
19212 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19213
19214         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19215         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19216         * image.c: endian fixes by Laurent Rioux.
19217         * object.h, object.c: rename MonoStringObject to MonoString and
19218         MonoArrayObject to MonoArray. Change some function names to conform to
19219         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19220         guint16* as first argument, so don't use char*.
19221         Provide macros to do the interesting things on arrays in a portable way.
19222         * threads-pthread.c: updates for the API changes and #include <sched.h>
19223         (required for sched_yield()).
19224         * icall.c: updates for the API changes above.
19225         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19226         platforms that need them.
19227
19228 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19229
19230         * class.c: set the correct type for all the fundamental
19231         type when loading the class.
19232
19233 2001-10-05  Dick Porter  <dick@ximian.com>
19234
19235         * threads-pthread.c (pthread_mutex_timedlock): Simple
19236         compatibility version for C libraries that lack this call.
19237
19238 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19239
19240         * class.c: MonoTypes stored in MonoClass are stored as
19241         fundamental MonoTypes when the class represents a
19242         fundamental type (System.Int32, ...).
19243         The TypeHandle return by ldtoken is a MonoType*.
19244         * icall.c: ves_icall_get_data_chunk () write out all the
19245         PE/COFF stuff. Implement ves_icall_define_method (),
19246         ves_icall_set_method_body (), ves_icall_type_from_handle ().
19247         * image.c: properly skip unknown streams.
19248         * loader.h, loader.c: add type_class to mono_defaults.
19249         * metadata.c, metadata.h: export compute_size () as
19250         mono_metadata_compute_size () with a better interface.
19251         Typo and C&P fixes.
19252         * pedump.c: don't try to print the entry point RVA if there is no entry point.
19253         * reflection.c, reflection.h: many cleanups, fixes, output method
19254         signatures and headers, typedef and typeref info, compress the metadata
19255         tables, output all the heap streams, cli header etc.
19256         * row-indexes.h: typo fixes.
19257
19258 2001-10-04  Dick Porter  <dick@ximian.com>
19259
19260         * object.h: Add a synchronisation mutex struct to MonoObject
19261
19262         * object.c (mono_new_object): Initialise the object
19263         synchronisation mutexes
19264
19265         * icall.c: System.Threading.Monitor internal calls
19266         
19267         * threads-pthread.h:
19268         * threads-pthread.c: System.Threading.Monitor internal calls
19269
19270         * threads-types.h: New file, includes the system-specific thread
19271         structures
19272         
19273         * threads-pthread-types.h:
19274         * threads-pthread-types.c: New files, handle pthread-specific
19275         synchronisation types
19276
19277         * threads-dummy-types.h: 
19278         * threads-dummy-types.c: New files of dummy support for
19279         thread-specific types
19280
19281         * metadata.c:
19282         * image.c:
19283         * pedump.c: include mono-endian.h not endian.h
19284         
19285         * Makefile.am: More threads files.
19286         Name mono-endian.h not endian.h
19287
19288 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19289
19290         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
19291         stuff and implement a few more bits.
19292         * icall.c: a field needs to be dereferenced twice. Do not use the same
19293         name for two variables in the same scope.
19294         * image.c, image.h: cleanups.
19295
19296 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
19297
19298         * class.c (mono_class_metadata_init): bug fix: compute the right size
19299
19300 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19301
19302         * icall.c: implemented some of the Reflection internalcalls.
19303         * image.c, image.h: start writing out the PE/COFF image.
19304         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19305         that does the reverse than decode_blob_size ().
19306         * object.c: use mono_metadata_encode_value (). Move here
19307         temporary implementation of mono_string_to_utf8 ().
19308         * rawbuffer.c: make malloc_map static.
19309
19310 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19311
19312         * metadata.c: fix type comparison for arrays.
19313         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19314         Added a couple of new classes to monodefaults.
19315         * icall.c: added a couple of Reflection-related internalcalls.
19316         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19317         Added a byval_arg MonoType to MonoClass.
19318
19319 2001-09-28  Dick Porter  <dick@ximian.com>
19320
19321         * icall.c:
19322         * threads-pthread.h: 
19323         * threads-pthread.c: Implemented internal calls for
19324         LocalDataStoreSlot operations.  Applied mutexes around all shared
19325         data.  Reworked the thread creation and Start() operations to
19326         avoid a race condition.
19327         
19328         * threads-dummy.h:
19329         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19330
19331 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19332
19333         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19334
19335 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19336
19337         * class.c, loader.c: warn and return NULL instead of erroring out.
19338         * icall.c: added System.AppDomain::getCurDomain().
19339         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19340
19341 2001-09-25  Dick Porter  <dick@ximian.com>
19342
19343         * threads-pthread.h:
19344         * threads-pthread.c: Implemented timed thread joining and added
19345         System.Threading.Thread::Join_internal internal call
19346
19347         * icall.c: Added System.Threading.Thread::Join_internal internal call
19348
19349         * threads-dummy.h:
19350         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19351
19352 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19353
19354         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19355         mono_string_intern () to implement the semantics of the ldstr opcode
19356         and the interning of System.Strings.
19357         * icall.c: provide hooks to make String::IsIntern and String::Intern
19358         internalcalls.
19359
19360 2001-09-23  Dick Porter  <dick@ximian.com>
19361
19362         * threads-dummy.c: 
19363         * threads-dummy.h: New files of dummy threading routines
19364
19365         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19366         support code based on system specifics
19367
19368         Rename PTHREAD_LIBS to THREAD_LIBS
19369         
19370 2001-09-23  Dick Porter  <dick@ximian.com>
19371
19372         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19373         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19374         internal calls.
19375         (mono_thread_init): Set up a Thread object instance to return when
19376         the main thread calls Thread.CurrentThread
19377         (mono_thread_cleanup): Wait for all subthreads to exit
19378
19379         * icall.c: New internal calls for System.Threading.Thread::Sleep
19380         (including Schedule) and CurrentThread
19381
19382         * threads.h: New file, to insulate thread-specific stuff from the
19383         rest of the code
19384
19385 2001-09-21  Dick Porter  <dick@ximian.com>
19386
19387         * threads-pthread.h: 
19388         * threads-pthread.c: New file, for handling pthreads-style
19389         threading support.  Start() now starts a new thread and executes
19390         the ThreadStart delegate instance.
19391
19392         * icall.c: Added the internalcall for
19393         System.Threading.Thread::Start_internal
19394
19395         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19396
19397 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19398
19399         * loader.c: work around the different signatures for delegates
19400         constructors csc generates in compiled code vs the ones compiled in mscorlib.
19401
19402 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19403
19404         * class.h, class.c: add mono_class_get_field_from_name ().
19405         * *: Fix C comments and other ANSI C issues.
19406
19407 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19408
19409         * endian.h, assembly.c: fix some endianness issues.
19410
19411 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19412
19413         * loader.h, load.c: add delegate_class to mono_defaults.
19414         Handle runtime provided methods in mono_get_method ().
19415
19416 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
19417
19418         * loader.c (mono_get_method): use pinvoke for internal call
19419
19420         * icall.c: use pinvoke for internal call
19421
19422         * loader.c (method_from_memberref): set the method name
19423
19424 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19425
19426         * metadata.c: help the compiler generate better code for
19427         mono_class_from_mono_type ().
19428
19429 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
19430
19431         * class.c (mono_class_metadata_init): delayed computing of the
19432         class size to mono_class_metadata_init ()
19433
19434 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19435
19436         * class.c, class.h: add an interfaces member to MonoClass.
19437         * image.c, image.h: add assembly_name field to MonoImage
19438         from the assembly table.
19439         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19440
19441 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19442
19443         * class.c: Handle Array in mono_class_from_mono_type ().
19444         * metadata.c, pedump.c: some endian fixes.
19445
19446 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19447
19448         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19449         * metadata.c: fix small problem introduced with the latest commit.
19450
19451 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19452
19453         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19454         We don't need a MonoMetadata pointer anymore to compare signatures in
19455         mono_metadata_signature_equal (), update callers.
19456         Reduced memory usage an number of allocations for MonoMethodHeader and
19457         MonoMethodSignature.
19458
19459 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19460
19461         * metadata.c: added compare for szarray.
19462
19463 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19464
19465         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19466         and add a couple more types to it and mono_defaults. Give an hint on
19467         classes that need implementing in our corlib and are referenced
19468         in mscorlib.
19469
19470 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19471
19472         * class.h, class.c: keep track if a class is also an Enum.
19473         * loader.c: Implement a couple more types for use in libffi
19474         marshalling. Gives better diagnostics when failing to dlopen
19475         a library. Set method->klass for P/Invoke methods, too.
19476
19477 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19478
19479         * class.c, class.h: add a MonoType this_arg to MonoClass that
19480         represents a pointer to an object of the class' type that
19481         can be used by the interpreter and later the type cache.
19482         Add best guess alignment info for valuetype objects.
19483
19484 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19485
19486         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19487         into MonoType: one less level of indirection and allocation and
19488         simplifies quite a bit of code. Added cache for MonoTypes that are
19489         used frequently, so that we don't need to allocate them all the time.
19490
19491 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
19492
19493         * class.c (mono_class_create_from_typedef): System.Enum is also a
19494         value type, although it does not derive from System.ValueType
19495         (maybe a bug in the ms compiler?)
19496
19497         * metadata.c (mono_type_size): return the right size for value types
19498
19499         * loader.c (mono_get_method): only initialize method header if not abstract
19500
19501         * class.c (mono_class_from_mono_type): use mono_default values. 
19502
19503 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
19504
19505         * *: use MonoClass pointers instead of <type_tokens>
19506         
19507         * class.h: new flag: metadata_inited.
19508
19509         * class.c (mono_class_metadata_init): impl.
19510         (mono_class_instance_size): impl.
19511         (mono_class_data_size): impl.
19512
19513 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19514
19515         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19516         MonoClass now has the name and name_space fields. 
19517         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19518         mono_get_method () takes and optional MonoClass as argument.
19519         Removed mono_typedef_from_name() and added mono_class_token_from_name()
19520         instead that takes advantage of a map from class names to typedef
19521         tokens in MonoImage.
19522
19523 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19524
19525         * metadata.c: zero is not a valid alignment boundary.
19526         Merge MONO_TYPE_VOID in default decoding code.
19527
19528 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
19529
19530         * image.h: merged MonoMetadata into MonoImage
19531
19532         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19533         identify the type of elements.
19534
19535 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19536
19537         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19538         * cil-coff.h: split MonoMSDOSHeader and add size info.
19539         * image.c: add some consistency checks.
19540         * metadata.c: fix row size computation: one programmer
19541         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19542         add explanation for the locator routine.
19543         Fix decoding of size in method header.
19544         
19545 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
19546
19547         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
19548         (g_concat_dir_and_file): Bring g_concat_dir_and_file
19549         function from gnome-libs.  This uses the right path separator
19550         based on the OS, and also works around a bug in some systems where
19551         a double slash is not allowed. 
19552         (default_assembly_name_resolver): Use g_concat_dir_and_file
19553         (mono_assembly_open): ditto.
19554
19555 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
19556
19557         * metadata.c (mono_metadata_signature_equal): impl.
19558
19559         * *: void is now a realy MonoType (instead of using NULL)
19560         
19561         * metadata.c (do_mono_metadata_parse_type): use
19562         mono_metadata_parse_type to parse void value.
19563
19564 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19565
19566         * metadata.c, metadata.h: in the signature and method header store
19567         only the space required for holding the loca vars and incoming arguments.
19568
19569 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
19570
19571         * metadata.c (do_mono_metadata_parse_type): treat void like any
19572         other type (instead of assigning NULL);
19573
19574 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
19575
19576         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19577
19578 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
19579
19580         * image.c (do_mono_image_open): added a cache for arrays.
19581
19582 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19583
19584         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19585         decode a single column from a row in a metadata table and changes
19586         to take advantage of it in the typedef locator (gives a nice speed up).
19587         Store offset info for function params.
19588
19589 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
19590
19591         * image.h (MONO_IMAGE_IS_CORLIB): removed 
19592
19593 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19594
19595         * assembly.c: how could mono_assembly_close () had ever worked?
19596         * metadata.c, metadata.h: provide offset info for local vars.
19597         Implement mono_type_size () to take care of alignment as well
19598         as size (it was mono_field_type_size in cli/class.c before).
19599
19600 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
19601
19602         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19603
19604         * assembly.h (CORLIB_NAME): set to corlib.dll
19605
19606         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19607
19608 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19609
19610         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19611         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19612         tokentype.h: massive namespace cleanup.
19613
19614 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19615
19616         * metadata.h, metadata.c: decode exception clauses when parsing method header.
19617
19618 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
19619
19620         * metadata.c (mono_metadata_free_type): added check for type !=
19621         NULL (void) before calling mono_metadata_free_type()
19622
19623 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19624
19625         * metadata.h, row_indexes.h: added header with enumerations to use
19626         to index in the columns from tables in metadata and to decode coded
19627         tokens: we should start using this instead of embedding magic numbers
19628         all over the code.
19629
19630 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19631
19632         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19633         Move metadata_t info from cli_image_info_t to MonoImage, where
19634         it's easily accessible. Changed all the uses accordingly.
19635         Added the method and class caches to MonoImage.
19636         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19637         and mono_metadata_decode_value () signature to be more consistent
19638         with the other parse functions (and simplify code). Taken advantage
19639         of zero-length array allocation with GCC. Removed reduntant (and
19640         wrong) MonoFieldType struct and use MonoParam instead. Changed
19641         mono_metadata_parse_field_type () to use common code for parsing.
19642         Added mono_metadata_typedef_from_field () and
19643         mono_metadata_typedef_from_method () to lookup a typedef index from a
19644         field or method token.
19645         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19646
19647 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
19648
19649         * metadata.c (mono_metadata_parse_field_type): Implement. 
19650         (do_mono_metadata_parse_type): Split engine from
19651         mono_metadata_parse_type, so that we can create smaller structures
19652         for things that just have one pointer to the MonoType (look at
19653         the MonoFieldType)
19654
19655 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
19656
19657         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19658         as Jan Gray found out, it is incorrect. 
19659
19660 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
19661
19662         * assembly.c: Implement asssembly loading.  This loads an image
19663         and loads all the referenced assemblies.  Come to think of it, we
19664         could always do lazy loading of the assemblies. 
19665
19666         * image.c (mono_image_open): Keep loaded images in a hashtable.
19667
19668         * image.h (MonoImage): Add reference count.
19669
19670 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
19671
19672         * assembly.c (mono_assembly_open): Keep track of the file name in
19673         case the assembly has no ASSEMBLY table.
19674
19675         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
19676         from get.c here.
19677
19678 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19679
19680         * metadata.c, metadata.h: decode local vars in method header
19681         parse function. Change callers accordingly.
19682
19683 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19684
19685         * metadata.h, cil-coff.h: protect against multiple inclusion.
19686         Added some new structures to hold information decoded from metadata:
19687         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19688         and relevant decoding/free functions.
19689         * metadata.c: implement decoding functions. Add warning for out of bounds
19690         index in mono_metadata_locate(). Implement mono_get_method () to retreive
19691         all the info about a method signature and invocation. Remove check on
19692         uninitialized local var in parse_mh() and fix memory leak.
19693
19694 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
19695
19696         * metadata.h: More macros.
19697
19698         * tokentype.h: New file.
19699
19700 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19701
19702         * assembly.c: added a consistency check and initialize
19703         some structures with g_new0().
19704         * metadata.c: fixed a couple more bugs in table size computation
19705         and add other checks for out-of bound access to metadata.
19706
19707 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19708
19709         * metatada.c: fix bugs computing table sizes. Spew a
19710         warning when index in string heap is out of bounds.
19711
19712 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
19713
19714         * metadata.h: Add a couple of macros to manipulate tokens. 
19715
19716 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19717
19718         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19719         cli_section_tables).
19720
19721 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
19722
19723         * metadata.c (mono_metadata_user_string): New function, provides
19724         access to the UserString heap. 
19725
19726 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
19727
19728         * metadata.c: Add inline documentation.
19729
19730 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
19731
19732         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19733         files. 
19734
19735 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
19736
19737         * typeattr.h: New file, TypeAttribute flags. 
19738
19739 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
19740
19741         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19742         mono_assembly_ensure_section): Section loading code.
19743         (load_section_tables): Load the sections.
19744
19745         * mono/metadata/metadata.c (mono_metadata_locate_token,
19746         mono_metadata_locate): Functions to locate the information
19747         definition given a token or a table and an index.
19748         (mono_metadata_compute_table_bases): New.
19749         (compute_size): New function to compute the sizes of the various
19750         tables.
19751
19752         * mono/metadata/metadata.h: Finish listing the different index
19753         types. 
19754
19755         * mono/metadata/pedump.c: Improve to dump new information.
19756
19757 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
19758
19759         * mono/metadata/metadata.c: Entered all the tables matching
19760         Beta2. 
19761
19762         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
19763
19764
19765