2006-11-27 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mono / metadata / ChangeLog
1 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
2   
3         * marshal.c: 
4                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
5                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
6                 can be generated without a delegate class.
7                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
8         
9         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
10
11 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12
13         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
14         #80069.
15
16 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
17
18         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
19         icall-def.h: added icalls needed by System.GC.
20
21 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
22
23         * loader.c: ensure the class in catch clauses is handled
24         correctly for generics methods (fixes bug#79980).
25
26 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
27
28         * monitor.h, monitor.c: added mono_locks_dump () function
29         to help debug deadlocks involving managed locks.
30
31 2006-11-13  Dick Porter  <dick@ximian.com>
32
33         * file-io.c (get_file_attributes): If the file is a symlink try
34         and get the stat data for the target, but also add the
35         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
36         the specs for the windows symlink support, but will probably have
37         to be reworked when I have test data from a vista machine.  Fixes
38         bug 79887.
39
40 2006-11-13  Dick Porter  <dick@ximian.com>
41
42         * gc.c (mono_domain_finalize): 
43         * marshal.c (mono_delegate_begin_invoke): 
44         * threadpool.c (socket_io_init, mono_thread_pool_init)
45         (mono_thread_pool_finish): 
46         * monitor.c (mono_monitor_try_enter_internal): 
47         * threads.c (mono_thread_resume, mono_thread_init)
48         (mono_thread_suspend_all_other_threads)
49         (mono_thread_execute_interruption): 
50         * appdomain.c (mono_domain_unload): Check for NULL error returns
51         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
52         75733.
53
54 2006-11-11  Miguel de Icaza  <miguel@novell.com>
55
56         * process.c
57         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
58         Only close the handle if the value of the handle is not
59         INVALID_HANDLE_VALUE.  This just makes the process a bit more
60         robust.
61
62         Improvement for #75733, so that we do not run into this problem. 
63
64         
65         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
66         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
67         internal variables.  Fixes #79462 
68         
69
70 2006-11-09  Dick Porter  <dick@ximian.com>
71
72         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
73         Use poll() not select().  Fixes bug 79397.
74
75 2006-11-09  Raja R Harinath  <rharinath@novell.com>
76
77         Fix #79872
78         * assembly.c (mono_assembly_load_from_full): Check that the given
79         image has an assembly manifest.
80
81 2006-11-09  Ankit Jain  <jankit@novell.com>
82
83         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
84         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
85         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
86
87 2006-11-07  Dick Porter  <dick@ximian.com>
88
89         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
90         Put the old resolver behaviour back for pre-2.0 profiles.
91
92 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
93
94         * threadpool.c: precise GC and locking fixes.
95
96 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
97
98         * class.c: don't load types that have an explicit unaligned
99         managed reference. Provide better info in the TypeLoad exception.
100         Part of the fix for bug #79744.
101         * object.c: use the correct check for class type load issues.
102
103 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
104
105         * class.c: enforce alignment of fields with managed references
106         even when Pack=1 is forced by the user (bug #77788).
107
108 2006-11-03  Dick Porter  <dick@ximian.com>
109
110         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
111         If the address reverse lookup fails, return it as the hostname
112         anyway.  Fixes bug 79721.
113
114 2006-11-03  Dick Porter  <dick@ximian.com>
115
116         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
117         Fix build on Windows.
118
119 2006-11-02  Dick Porter  <dick@ximian.com>
120
121         * icall-def.h: 
122         * object-internals.h: 
123         * exception.c (mono_get_exception_thread_interrupted): 
124         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
125         Fixes bug 74525.
126
127         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
128         Check for pending Thread.Interrupt.
129
130 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
131         * loader.c: Fixed bug 79684.
132
133 2006-10-27  Dick Porter  <dick@ximian.com>
134
135         * file-io.c (get_file_attributes): Force symlinks to directories
136         to be returned as a regular file.  Fixes bug 79733.
137 2006-10-26  Dick Porter  <dick@ximian.com>
138
139         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
140         CreateFile to open a directory then we need to set the
141         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
142
143 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
144
145         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
146         friends.
147
148 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
149
150         * sgengc.c: small cleanup of timer code.
151
152 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
153
154         * sgen-gc.c: fix some warnings and start adding support for
155         complete object removal on domain unload.
156
157 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
158
159         * assembly.c: build_assembly_name should not consider a version
160         number without build or revision number invalid. Fixes bug #79715.
161
162 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
163
164         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
165         call kernel32 function OutputDebugString directly.
166         
167         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
168         
169 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
170
171         * reflection.c: small cleanup, using a function to insert a MonoString
172         in the string heap.
173
174 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
175
176         * reflection.c: moving GC fixes.
177
178 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
179
180         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
181         all the objects with finalizers belonging to an unloading appdomain.
182
183 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
184
185         * sgen-gc.c: added ability to allocate even when the nursery is fully
186         pinned and fixed a couple of bugs.
187
188 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
189
190         * threads.h: Revert the last change for now.
191
192         * threads.h (mono_thread_get_pending_exception): Rename this to
193         mono_thread_get_undeniable_exception ().
194
195 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
196
197         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
198         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
199         when fname does not refer to valid assembly. This result in a more
200         meaningful error message.
201         * exception.c: added mono_get_exception_bad_image_format2 which 
202         constructs a BadImageFormatException using the ctor taking a custom
203         message and the file name. Passing in a NULL msg results in a default
204         message.
205         * exception.h: define mono_get_exception_bad_image_format2 function.
206         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
207         when file name pointed to an invalid IL image. Use 
208         mono_get_exception_file_not_found2 to construct FileNotFoundException,
209         as this results in a more meaningful error message.
210
211 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
212
213         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
214         #79465.
215
216 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
217
218         * metadata.c (mono_type_size): Change the align parameter to guint32 for
219         consistency with the other _size functions.
220         (mono_type_stack_size): Ditto.
221
222         * class.c object.c icall.c: Fix warnings caused by the above change.
223
224         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
225
226         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
227
228         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
229
230 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
231
232         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
233         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
234         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
235         threadpool.h, threads-types.h: mark more internal functions.
236
237 2006-10-11  Dick Porter  <dick@ximian.com>
238
239         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
240         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
241         reproduce the bug even before applying the fix.)
242
243 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
244
245         * reflection.c: allow retrieving attributes for arguments in generic
246         methods (bug #79241).
247
248 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
249
250         * debug-mono-symfile.c: properly check fopen () result (found by
251         coverity).
252
253 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
254
255         * reflection.c: make error message clearer and fixed two
256         issuelets found by Coverity.
257
258 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
259
260         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
261
262 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
263
264         * object-internals.h, gc-internal.h, profiler-private.h:
265         mark internal functions.
266
267 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
268
269         * reflection.c: put data in the text section.
270         * icall.c: recognize more types in type_from_typename ().
271         * process.c, marshal.c: added some GC FIXMEs.
272
273 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
274
275         * loader.c: check for NULL before initializing.
276
277 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
278
279         * gc.c (finalizer_thread): Use a non-alertable wait here.
280
281         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
282         until the correct solution is found.
283
284 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
285
286         * reflection.c (mono_module_get_object): Avoid an assert when operating on
287         modules with no metadata. Fixes #79596.
288
289         * image.c (load_metadata_ptrs): Put back the error message when
290         the #- heap is encountered since the support is not complete yet.
291
292 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
293
294         * gc.c: do not allow the user to SuppressFinalize () a
295         delegate because it would leak the trampoline if present.
296
297 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
298
299         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
300         PropertyPtr table.
301
302 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
303
304         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
305
306         * metadata.c (mono_metadata_get_param_attrs): Ditto.
307
308         * row-indexes.h: Add definitions for *Ptr tables.
309
310         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
311
312         * metadata.c (mono_metadata_translate_token_index): New helper function to
313         translate table indexes used in uncompressed metadata.
314         (mono_metadata_decode_table_row): Ditto.
315         (mono_metadata_decode_table_row_col): Ditto.
316
317         * metadata.c: Add table schema for *Ptr tables.
318
319         * class.c loader.c: Use the new helper function to access the affected metadata
320         tables.
321         
322         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
323         #38532.
324         
325 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
326
327         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
328         sequences which can be unbounded in size. Fixes #79583.
329
330 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
331
332         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
333         static initialization.
334
335         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
336
337         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
338
339         * domain.c (mono_domain_free): Free up type_init_exception_hash.
340
341         * object.c (mono_runtime_class_init): Implement correct semantics when a static
342         ctor fails, i.e. throw the same exception on subsequent accesses.
343         
344 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
345
346         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
347         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
348         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
349         Handle marshalling of interfaces and VARIANTs contained in structs.
350         
351         Code is contributed under MIT/X11 license.
352         
353 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
354
355         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
356         
357         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
358         mempool.
359
360 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
361
362         * console-io.c: ignore previous SIGINT handler.
363
364 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
365
366         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
367         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
368         #79460, #79461, #79485.
369
370         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
371
372         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
373         #79217.
374
375 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
376
377         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
378         could be generated from it.
379
380 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
381
382         * rand.c: fix read loop to correctly handle EINTR.
383
384 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
385
386         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
387         internal calls are defined to keep methods closer to the declaring
388         type and allow a significant reduction in runtime relocations and
389         memory usage.
390
391 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
392
393         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
394         exception message to have FileNotFoundException use the default
395         assembly load error message. Fixes bug #79426.
396         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
397
398 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
399
400         * threadpool.c: (start_thread_or_queue) use the root domain when
401         creating the thread instead of the async object one.
402
403 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
404
405         * class.c, object.c, class-internals.h, reflection.c:
406         for arrays, store element_size inside MonoClass (speedup
407         for array object creation).
408
409 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
410
411         * icall.c: fixed CodeBase to use the file name and not the module
412         name (bug #79365).
413
414 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
415
416         * mono-debug.c, mono-debug.h: export find_method as
417         mono_debug_find_method ().
418
419 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
420
421         * debug-helpers.c, class-internals.h: added a few functions useful
422         when debugging under gdb.
423
424 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
425
426         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
427         characters that need special handling.
428
429 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
430
431         * mono-config.c: make the os/cpu specification more flexible,
432         allowing lists and negation.
433
434 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
435
436         * marshal.c: COM Interop fixes. Handle case where method->klass.
437         is interface. Handle BSTR/MonoString when null. Use CDECL as 
438         calling convention on non-windows platforms. This is for
439         compatibility with XPCOM and MainWin COM.
440         
441         Code is contributed under MIT/X11 license.
442         
443
444 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
445
446         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
447         correctly. Fixes #79217.
448
449         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
450
451 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
452
453         * mono-config.c: allow both an os and cpu attribute for dllmap
454         and dllentry elemnets to enable a single config file to be used
455         for multiple architectures.
456
457 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
458
459         * loader.c: MonoLoaderError was cleared too soon on load failure.
460         Fixes bug #79424.
461
462 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
463
464         * icall.c: use the defining class vtable when accessing a
465         static field, not a pobblibly derived class.
466
467 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
468
469         * icall.c string-icalls.c: Remove references to unicode.h.
470
471         * unicode.h unicode.c Makefile.am: Remove these unused source files.
472
473         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
474
475         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
476         indicating the image where custom marshaller types should be looked up.
477         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
478         custom marshallers, instead of corlib. Fixes #79425.
479
480 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
481
482         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
483
484 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
485
486         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
487         Implement Environment.ProcessorCount.
488         
489         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
490         Implement Environment.ProcessorCount.
491         
492         * icall.c: 
493         Add Environment.ProcessorCount icall.
494         
495         Patch by Jason McFall.
496
497 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
498
499         * assembly.c: don't append .exe/.dll when the filename already contains
500         one of those extensions.
501
502 2006-09-12  Martin Baulig  <martin@ximian.com>
503
504         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
505         to array interfaces.
506
507 2006-09-11  Martin Baulig  <martin@ximian.com>
508
509         * reflection.c (mono_image_build_metadata): Create the
510         MethodImpl's after emitting all types and methods, so we don't
511         need another fixup pass for them.
512
513 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
514
515         * class.c (mono_class_from_name_case): Fix regression introduced by the last
516         change.
517
518 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
519
520         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
521         unload.
522
523 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
524
525         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
526         args is not set. Fixes #78926.
527
528 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
529
530         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
531
532         * image.c (load_class_names): Move this to class.c, and rename it to 
533         'mono_image_init_name_cache'.
534         (load_modules): Fix a warning.
535
536         * class.c icall.c image.c: Initialize image->name_cache lazily.
537
538         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
539         on its name using information in the AOT file.
540
541         * class.c (mono_class_from_name): Use the new hook function.
542
543 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
544
545         * reflection.c (mono_param_get_objects): Handle enum default parameter values
546         correctly.
547
548         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
549         Fixes #79289.
550         
551 2006-09-06  Martin Baulig  <martin@ximian.com>
552
553         * icall.c (mono_lookup_internal_call): Small fix.
554
555 2006-09-05  Raja R Harinath  <rharinath@novell.com>
556
557         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
558         double g_free.
559
560 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
561
562         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
563         when --debug is specified.
564
565 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
566
567         * class.c (setup_generic_array_ifaces): Fix a warning.
568
569 2006-09-04  Miguel de Icaza  <miguel@novell.com>
570
571         * Temporarily remove the patch to assemly.c that checks the
572         assembly versions as it breaks our gacutil.
573
574 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
575
576         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
577
578         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
579         a net 1.0 runtime.
580
581         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
582         created using the default ctor. Fixes #79152.
583         (mono_string_builder_to_utf16): Ditto.
584
585 2006-09-01  Martin Baulig  <martin@ximian.com>
586
587         Fix handling of the generic array interfaces.
588
589         * class-internals.h
590         (MonoDefaults): Removed `generic_array_class' and added
591         `generic_ilist' class.
592
593         * class.c
594         (mono_bounded_array_class_get): Add the new generic array interfaces.
595         (setup_generic_array_ifaces): New static method; create vtable
596         entries for each method in the generic array interfaces.
597
598         * metadata.c
599         (select_container): Allow "parent-less" generic methods.
600
601         * marshal.c
602         (mono_marshal_get_generic_array_helper): New public method.
603
604         * icall.c
605         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
606         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
607         moved the interncall into System.Array.
608
609 2006-09-01  Raja R Harinath  <rharinath@novell.com>
610
611         A few more cases of avoiding work on types with ->byref set.
612         Has the real fix for #79238
613         * icall.c (is_generic_parameter): New helper.
614         (ves_icall_Type_GetGenericParameterPosition): Use it.
615         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
616         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
617         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
618         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
619         reference types.
620         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
621         reference types.
622         (ves_icall_Type_get_IsGenericInstance): Likewise.
623         (ves_icall_Type_get_IsGenericType): Likewise.
624
625 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
626
627         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
628         class if possible.
629
630         * mempool.h (mono_mempool_get_allocated): New helper function.
631
632         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
633         change.
634
635         * mempool.c: Fix warnings and the calculation of stats.
636
637         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
638
639         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
640
641         * loader.c (mono_get_method_from_token): Update method_count stat.
642
643         * class-internals.h (MonoStats): Add some stats.
644
645 2006-08-31 Robert Jordan  <robertj@gmx.net>
646
647         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
648         with managed variants.
649         All code is contributed under the MIT/X11 license.
650         
651 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
652
653         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
654         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
655
656         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
657
658         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
659         with cycles in classes.
660
661         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
662
663         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
664         missing a [MarshalAs] directive. Fixes #79203.
665
666         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
667         klass->marshal_info. Fixes #79217.
668
669 2006-08-30  Martin Baulig  <martin@ximian.com>
670
671         Committing a patch from Joachim Ante <joe@otee.dk>:
672         Add support for binary data symbol stores.
673
674         * debug-mono-symfile.c
675         (mono_debug_open_mono_symbol_file): Renamed into
676         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
677         arguments.
678
679         * mono-debug.c
680         (mono_debug_open_image): Added `raw_contents' and `size' args.
681         (mono_debug_init_2_memory): New public function.
682
683 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
684
685         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
686
687 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
688
689         * appdomain.c: implement support for ShadowCopyFiles.
690
691 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
692
693         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
694         when value is NULL (and should remove CID #51).
695
696 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
697
698         * image.c: moved 2 functions to ../utils.
699
700 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
701
702         * gc.c: cope with the target object of a GC handle being NULL
703         (bug #78877).
704
705 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
706
707         * class.c: recursively check parent's explicit implementations
708         of interface methods (fixes bug #79125).
709
710 2006-08-19  Miguel de Icaza  <miguel@novell.com>
711
712         * filewatcher.c: Avoid warnings when building, do not redefine
713         constants that are defined.
714
715         Remove warnings.
716
717 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
718
719         * image.c: don't fail when the link points to an absolute path.
720
721 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
722
723         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
724         Fix CID #3.
725
726 2006-08-17  Miguel de Icaza  <miguel@novell.com>
727
728         * image.c (full_path): A new method used to obtain the actual path
729         of an assembly even in the presence of symbolic links.  
730
731         This is necessary for the case where we are running a binary that
732         has been GACed, but we are using the "published" path name
733         ($prefix/mono/1.0/blah.exe) which happens to point to the real
734         file in the GAC.
735
736         This was the source of the failure for the `xsp' command with the
737         recent AppDomain changes, as far as the runtime was concerned,
738         there were two different assemblies: $prefix/mono/1.0/blah.exe and
739         $prefix/mono/gac/blah/version/blah.exe.
740
741         (do_mono_image_open): use full path
742
743 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
744
745         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
746
747 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
748
749         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
750         domain_id is supplied. Fix CID #241 and corlib's unit tests.
751
752 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
753
754         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
755         small structures. Fixes #78990.
756
757 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
758
759         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
760
761         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
762
763 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
764
765         * appdomain.c:
766         * marshal.c: don't load all the assemblies from a domain into newly
767         created ones. The new domains might have different rules and load
768         assemblies from different locations. Fixes bug #76757.
769
770         Patch by Lluis. Conflicts resolved by Brian Crowell.
771
772 2006-08-16  Alp Toker  <alp@atoker.com>
773
774         * socket-io.c: First half of the fix for #79084.
775         Set sa_size to the length of the content, not that of the struct.
776         Don't add NULL suffix to the content, this should be done in
777         managed code if needed.
778
779 2006-08-14  Raja R Harinath  <rharinath@novell.com>
780
781         Fix part of #79012
782         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
783         mono_metadata_parse_type returns NULL.
784
785 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
786
787         * normalization-tables.h : new file for string normalization data.
788         * locales.c, locales.h, icall.c :
789           added load_normalization_resource() for string normalization,
790           and icall as well.
791         * Makefile.am : added normalization-tables.h to the sources.
792
793 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
794
795         * marshal.c: Add more helper functions to reduce code duplication and use them
796         everywhere.
797
798 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
799
800         * marshal.c: Fix non-x86 stdcall warnings.
801         
802         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
803         them everywhere.
804
805 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
806
807         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
808         type check on multi-dimensional arrays. Fixes #79000.
809
810 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
811
812         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
813         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
814         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
815         * class-internals.h: add is_com_object to class structure.
816         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
817         null checks to COM object marshalling. Fix .ctor call on RCW.
818         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
819         
820         All code is contributed under the MIT/X11 license.
821
822 2006-08-09  Dick Porter  <dick@ximian.com>
823
824         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
825         racing mono_monitor_allocator_lock() somewhere, so don't delete
826         the critical section for now.  Found by running and exiting
827         monodevelop.
828
829 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
830
831         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
832         (ves_icall_System_ComObject_FindInterface): Ditto.
833         (ves_icall_System_ComObject_CacheInterface): Ditto.
834
835         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
836         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
837
838 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
839
840         * threadpool.c: treat pipes from process asynchronous reads as sockets
841         when reading from them, so we get select/poll or epoll to wait for
842         data.
843
844 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
845
846         * loader.c: Fix a typo (CID #233) in the null check.
847
848 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
849
850         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
851         Hopefully fixes #78949.
852         
853         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
854         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
855         bytes. Fixes #78972.
856
857 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
858
859         * filewatcher.c: we need to set errno here.
860
861 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
862
863         * filewatcher.c: let Win32Exception get the error value.
864
865 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
866
867         * filewatcher.c: translate errno into win32 errors for Win32Exception
868         to know what happened.
869
870 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
871
872         * threadpool.c: Fix more warnings.
873
874         * assembly.c (search_loaded): Fix warnings.
875
876         * threadpool.c (mono_thread_pool_finish): Fix warnings.
877         (mono_async_invoke): Ditto.
878
879 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
880
881         * object.c (mono_remote_class_vtable): Need to create proxy vtable
882         entries for __ComObject type in addition to ComImport types.
883         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
884         about hash table.
885         
886         All code is contributed under the MIT/X11 license.
887
888 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
889
890         * image.c: avoid tentative loading of modulerefs that contain
891         no metadata (P/Invoke library names).
892
893 2006-07-28  Dick Porter  <dick@ximian.com>
894
895         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
896         mono_loader_lock() somewhere, so don't delete the critical section
897         for now.  Found by running and exiting monodevelop.
898
899 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
900
901         * filewatcher.c: define the inotify syscalls when we're building on
902         linux and have sys/syscall.h. The build system might not have support
903         for inotify but the target system might have it.
904
905 2006-07-26  Miguel de Icaza  <miguel@novell.com>
906
907         * domain.c: Documentation updates.
908
909         * loader.c (mono_free_method): Do not release the method
910         information if we are being profiled, as profilers will use this
911         information at shut down to present some data to the user.
912
913         This is needed so that the profiler does not crash, as the
914         profiler tends to keep MonoMethods around, and they might become
915         invalid if we free these.
916
917         (mono_get_method_constrained): Return the original CIL stream
918         method as well, so verification can be performed against it.
919
920 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
921
922         * filewatcher.[ch]: support for inotify file system watcher.
923         * icall.c: add new internal calls for the inotify file system watcher.
924
925 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
926
927         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
928         #78888.
929
930 2006-07-20  Dick Porter  <dick@ximian.com>
931
932         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
933         warning.
934
935 2006-07-20  Dick Porter  <dick@ximian.com>
936
937         * threads.c (start_wrapper): Do the thread cleanup while we still
938         hold a reference to its object.  Fixes bug 78123.
939
940 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
941
942         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
943         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
944           "managed-to-managed".
945         * icall.c: Redirect string constructors that take sbyte* to
946           ves_icall_System_String_ctor_RedirectToCreateString.
947         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
948           to CreateString () methods with matching signature.
949         * reflection.c: Use original security informations for
950           MONO_WRAPPER_MANAGED_TO_MANAGED.
951         * security-manager.c: Use original security informations for
952           MONO_WRAPPER_MANAGED_TO_MANAGED.
953         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
954           that is a placeholder and only its address should be used.
955         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
956           that is a placeholder and only its address should be used.
957
958 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
959
960         Begin implementing COM Interop.
961         * appdomain.c: Increment corlib version.
962         * class.c: Set ComImport classes' parent to __ComObject.
963         * loader.c: Mark cominterop methods as such.
964         * domain.c: Add __ComObject class to MonoDefaults structure.
965         * image.c: Add 2 hashtables to the image for COM Interop related methods
966         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
967         using the mempool allocator
968         
969         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
970         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
971         declaration for mono_metadata_type_dup_mp.
972         
973         * debug-helpers.c: Added strings for two additional wrapper types
974         * object.c: Create proxy objects for ComImport classes
975         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
976         and added __ComObject class to MonoDefaults structure.
977         
978         * object-internals.h: Finish MonoRealProxy definition, and add definition of
979         MonoComInteropProxy and MonoComObject.
980         
981         * marshal.c: Added support for COM Interop
982         (signature_cominterop): Converts managed signature to corresponding
983         unmanaged COM signature.
984         (cominterop_get_function_pointer): gets unmanaged function pointer via
985         COM object vtable
986         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
987         (cominterop_get_method_interface): returns interface type that method is defined on
988         (mono_mb_emit_cominterop_call): emits native call to function pointer
989         gotten from vtable
990         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
991         that matches signature of unmanaged function.
992         (cominterop_get_native_wrapper): wrapper around adjusted method call.
993         (cominterop_get_invoke): forwards call from proxy to __ComObject
994         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
995         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
996         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
997         
998         * marshal.h: Added Marshal icall declarations.
999         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
1000         so we can access them in finalizer
1001         
1002 2006-07-14  Dick Porter  <dick@ximian.com>
1003
1004         * object.c (mono_type_initialization_cleanup): Fix a race
1005         condition by temporarily commenting out the critical section
1006         deletion.
1007
1008 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
1009
1010         * reflection.c (create_custom_attr): Fix some warnings.
1011         (create_custom_attr_data): Ditto.
1012         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
1013         types. Fixes #78855.
1014
1015 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
1016
1017         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
1018
1019         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
1020
1021 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
1022
1023         * reflection.c (resolve_object): Add support for DynamicMethod.
1024
1025         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
1026         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
1027
1028 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
1029
1030         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
1031         don't leak GPtrArray's pdata has we have no use (nor free) for it.
1032
1033 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
1034
1035         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
1036         Fixes #77888.
1037
1038 2006-06-30  Raja R Harinath  <rharinath@novell.com>
1039
1040         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
1041         slightly: remove a shadow local variable.
1042
1043 2006-06-29  Raja R Harinath  <rharinath@novell.com>
1044
1045         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
1046         definition that introduces the virtual function slot.
1047         Also fix Coverity #105.
1048
1049 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
1050
1051         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
1052         for dynamic assemblies. Fixes #78724.
1053
1054 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
1055
1056         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
1057         Fixes #78722.
1058
1059 2006-06-21  Martin Baulig  <martin@ximian.com>
1060
1061         * reflection.c
1062         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
1063         fixes #76484.
1064
1065 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
1066
1067         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
1068
1069 2006-06-20  Raja R Harinath  <rharinath@novell.com>
1070
1071         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
1072         nor TYPEREFs.
1073         * class.c (mono_class_create_from_typespec): Add 'context' argument.
1074         Inflate result if necessary.
1075         (mono_class_get_full): Remove old version.  Rename from
1076         'mono_class_get' and add 'context' argument.  Pass it to
1077         ..._create_from_typespec.
1078         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
1079         (mono_ldtoken): Revert change below.
1080
1081 2006-06-20  Martin Baulig  <martin@ximian.com>
1082
1083         * class.c (mono_ldtoken): Don't pass the generic context to
1084         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
1085
1086 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
1087
1088         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
1089         and later freeing it. Fixes #78638.
1090
1091 2006-06-15  Miguel de Icaza  <miguel@novell.com>
1092
1093         * icall.c (mono_class_get_throw): Revert over-zealous error
1094         throwing, the caller for mono_class_get_throw will cope with
1095         errors when classes are not properly initialized already.
1096
1097         The code still copes with loader exceptions though.
1098
1099         Fixes the regression in reftype1 and reftype3 from the CAS tests.
1100         
1101 2006-06-14  Miguel de Icaza  <miguel@novell.com>
1102
1103         Fixes the `make run1' version of RuntimeAbort (to be commited,
1104         source is in Bugzilla).
1105         
1106         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
1107         FALSE on class loading failure instead of returning true.
1108
1109         * class.c (mono_class_create_from_typedef): It is possible for
1110         mono_metadata_interfaces_from_typedef_full to fail if a class is
1111         not found, cope with this.
1112         
1113
1114 2006-06-14  Dick Porter  <dick@ximian.com>
1115
1116         * socket-io.c: 
1117         * process.c: Fix a bunch of signed/unsigned warnings from gcc
1118         4.1.1
1119
1120 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
1121
1122         * culture-info-table.h : oops, forgot to make it nsync with r61548.
1123
1124 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
1125
1126         * icall.c: Another fix for building mono in Visual Studio.
1127
1128 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
1129
1130         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
1131         
1132 2006-06-09  Martin Baulig  <martin@ximian.com>
1133
1134         * debug-mono-symfile.c: Put this back and really fix it this
1135         time. Sorry for all the trouble.
1136
1137 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
1138
1139         * icall.c (mono_class_get_throw): Fix a warning.
1140         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
1141         ReflectionTypeLoadException if needed. Fixes #78606.
1142
1143         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
1144         (mono_class_init): Ditto.
1145
1146         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
1147         ref_only exceptions.
1148         (mono_loader_clear_error): Make this work even if there is no error.
1149
1150 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
1151
1152         * object-internals.h marshal.c marshal.h icall.c: Implement method 
1153         Marshal.GetComSlotForMethodInfo using internal call.
1154
1155 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
1156
1157         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
1158         a function for signalling it.
1159
1160         * class.c (mono_class_from_typeref): Use the new kind of loader error when
1161         a referenced assembly is not found.
1162
1163         * loader.c (mono_loader_error_prepare_exception): Add support for 
1164         LOADER_ERROR_ASSEMBLY. Fix formatting.
1165
1166 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
1167
1168         * domain.c appdomain.c class-internals.h marshal.c: Add support 
1169         for VARIANT marshalling on windows and increment corlib version
1170         since Variant struct was added.
1171
1172 2006-06-03  Miguel de Icaza  <miguel@novell.com>
1173
1174         * debug-mono-symfile.c: Revert Martin's previous patch which broke
1175         stack trace line information:
1176
1177         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
1178         (Martin) when looking up B which is between A and C, return A not C.
1179
1180         Bug is #78573.
1181
1182         Thanks to Alexander Olk for tracking this down.
1183
1184 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
1185
1186         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
1187         
1188         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
1189         avoid clobbering its value.
1190         (mono_string_to_lpstr): Fix a warning on windows.
1191
1192 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
1193
1194         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
1195
1196         * reflection.c loader.c: Removed references to 'dummy' flag.
1197
1198         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
1199
1200         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
1201         it gets GC tracking.
1202
1203         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
1204         GC tracking.
1205         
1206         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
1207
1208         * marshal.c threadpool.c: Update callers of mono_async_result_new.
1209
1210         * appdomain.c: Bump corlib version.
1211
1212 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
1213
1214         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1215         CEE_STIND_REF when working with object references.
1216
1217 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
1218
1219         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
1220         Fixes #78539.
1221
1222 2006-05-30  Miguel de Icaza  <miguel@novell.com>
1223
1224         * loader.c (method_from_memberref): Fix argument value for
1225         mono_loader_set_error_method_load (I was passing the MonoClass
1226         instead of the class name char *).
1227
1228 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
1229
1230         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1231         CEE_STIND_REF when working with object references.
1232
1233 2006-05-30  Martin Baulig  <martin@ximian.com>
1234
1235         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
1236         mono_method_full_name() change and replace the ':' with a '.'
1237         here.
1238
1239 2006-05-30  Martin Baulig  <martin@ximian.com>
1240
1241         * debug-mono-symfile.c
1242         (mono_debug_symfile_lookup_location): Fix the algorithm:
1243         when looking up B which is between A and C, return A not C.
1244
1245 2006-05-29  Martin Baulig  <martin@ximian.com>
1246
1247         * mono-debug.h
1248         (MonoDebugMethodInfo): Make the typedef public.
1249         (MonoDebugSourceLocation): New public struct.
1250
1251         * mono-debug.c
1252         (mono_debug_source_location_from_address): Removed.
1253         (mono_debug_source_location_from_il_offset): Removed.
1254         (mono_debug_il_offset_from_address): Removed.
1255         (mono_debug_address_from_il_offset): Removed.
1256         (mono_debug_lookup_method): New public function.
1257         (mono_debug_lookup_source_location): New public function; replaces
1258         the old mono_debug_source_location_from_*() functions; see the
1259         inline documentation.
1260         (mono_debug_free_source_location): New public function.
1261         (mono_debug_print_stack_frame): New public function; see the
1262         inline documentation.
1263
1264         * debug-mono-symfile.c
1265         (mono_debug_find_source_location): Renamed into
1266         mono_debug_symfile_lookup_location(); only take a
1267         `MonoDebugMethodInfo *' and an `offset' argument; added inline
1268         documentation.
1269         (mono_debug_find_method): Renamed into
1270         mono_debug_symfile_lookup_method().
1271
1272 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
1273
1274         * assembly.c (mono_assembly_open_full): Dont overwrite the status
1275         returned by mono_image_open_full ().
1276
1277         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
1278         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
1279         #78517.
1280
1281         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
1282         #78518.
1283
1284 2006-05-27  Miguel de Icaza  <miguel@novell.com>
1285
1286         * class.c (mono_class_from_typeref): handle missing images
1287         earlier, deals with bug #78418.   Refactor code; 
1288
1289         Fix a warning introduced in my previous commit (some stale code
1290         from before I revisited my patch).
1291
1292         * class.c (mono_class_create_from_typedef): On failure, remove the
1293         class from the MonoImage->class_cache as the class is not
1294         initialized;   Fixes the leak pointed out by Paolo.
1295
1296 2006-05-25  Dick Porter  <dick@ximian.com>
1297
1298         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
1299         DeleteCriticalSections until I figure out which one may still be
1300         sometimes locked when mono_thread_cleanup is called.
1301
1302 2006-05-24  Dick Porter  <dick@ximian.com>
1303
1304         * threads.c (mono_thread_cleanup): Move the threading cleanup out
1305         of mono_thread_manage and back into its own function, so it can be
1306         called after the finalizer thread has finished.
1307
1308         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
1309
1310 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
1311
1312         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
1313         Fixes #78495.
1314
1315         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
1316         with non-blittable elements.
1317         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
1318
1319 2006-05-24  Martin Baulig  <martin@ximian.com>
1320
1321         * mono-debug-debugger.h (MonoDebuggerEvent): Added
1322         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
1323
1324         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
1325         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
1326         `mono_debugger_event_handler' to NULL.
1327
1328 2006-05-24  Martin Baulig  <martin@ximian.com>
1329
1330         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
1331
1332 2006-05-24  Martin Baulig  <martin@ximian.com>
1333
1334         * mono-debug-debugger.h
1335         (mono_debugger_create_notification_function): Added
1336         `MonoCodeManager *' argument.
1337
1338 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
1339
1340         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
1341
1342 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
1343
1344         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
1345         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
1346         implementation.
1347
1348 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
1349
1350         * icall.c: precise GC support: objects can't be stored in unmanaged
1351         memory anymore, even if they are kept alive by other references: since
1352         they can move the GC needs to be able to always find them.
1353
1354 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1355
1356         * object.c: precise GC support for static fields. Support
1357         for moving GCs: write barriers and pinned allocation for interned
1358         strings.
1359
1360 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1361
1362         * domain.c, domain-internals.h: precise GC support for the MonoDomain
1363         structure.
1364
1365 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1366
1367         * class.c, gc.c: sgen and precise GC updates.
1368
1369 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
1370
1371         * marshal.h, marshal.c: added write barrier wrapper and precise type
1372         fixes.
1373
1374 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
1375
1376         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
1377         support.
1378
1379 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
1380
1381         * reflection.c: precise and sgen GC updates.
1382
1383 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
1384
1385         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
1386
1387 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
1388
1389         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
1390
1391 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
1392
1393         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
1394         MONO_TYPE_OBJECT. Fixes #78462.
1395
1396 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
1397
1398         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
1399         and blittable types.
1400
1401 2006-05-17  Miguel de Icaza  <miguel@novell.com>
1402
1403         * class.c (mono_class_get_exception_for_failure): Implement parts
1404         of a TODO: if the loader error is set (instead of the class
1405         error), we return a Loader exception that can be properly thrown
1406         elsewhere.
1407
1408         This was exposed by some Winforms 2.0 code that I tried to run
1409         (Atsushi pointed me to it).
1410
1411 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
1412
1413         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
1414         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
1415         
1416         * marshal.c (emit_marshal_vtype): Add limited support for 
1417         UnmanagedType.LPStruct. Fixes #78427.
1418
1419         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
1420         Applied a patch from kangaroo to fix #77523.
1421
1422 2006-05-17  Martin Baulig  <martin@ximian.com>
1423
1424         * threads.c
1425         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
1426         (debugger_thread_created): Removed.
1427         (debugger_thread_exited): Removed.
1428
1429 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
1430
1431         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1432
1433         * object-internals.h (MonoReflectionResource): Sync with managed version.
1434
1435 2006-05-12  Wade Berrier <wberrier@novell.com>
1436
1437         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
1438
1439 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
1440
1441         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
1442         functions try to allocate from the image mempool.
1443
1444 2006-05-12  Dick Porter  <dick@ximian.com>
1445
1446         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
1447
1448 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
1449
1450         * object.c: The FieldGetter and FieldSetter methods require the full
1451         name of the class, not only the name. Fixes bug #78277.
1452
1453 2006-05-11  Miguel de Icaza  <miguel@novell.com>
1454
1455         * loader.c (method_from_memberref): Do not pass the NULL klass to
1456         mono_loader_set_error_() methods.  Pass the non-NULL value
1457         (class). 
1458
1459 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
1460
1461         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1462         (mono_assembly_close): Null out assembly->image->references after freeing it.
1463
1464         * image.c (mono_image_close): Free image->references.
1465         
1466         * reflection.c (mono_image_basic_init): Fix a small memory leak.
1467
1468 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1469
1470         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
1471         before checking if it's NULL (g_assert).
1472
1473 2006-05-10  Martin Baulig  <martin@ximian.com>
1474
1475         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1476         I thought I already killed that two months ago, but now it somehow reappeared.
1477
1478 2006-05-10  Martin Baulig  <martin@ximian.com>
1479
1480         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1481
1482 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
1483
1484         * reflection.c: Allocate memory for dynamically created methods in the image
1485         mempools.
1486
1487 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1488
1489         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
1490         don't use the ad pointer before checking if it's NULL (g_assert).
1491
1492 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
1493
1494         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1495         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1496
1497         * marshal.c: Allocate all signatures from mempools.
1498
1499         * marshal.c: Allocate some more signatures from mempools.
1500
1501 2006-05-09  Miguel de Icaza  <miguel@novell.com>
1502
1503         * object.c (mono_load_remote_field): The code used to provide a
1504         temporary variable for returning results if the user did not
1505         provide a result pointer.  But our temporary variable was allocted
1506         on the satck.
1507
1508         Fix calling code to always pass a result area.   Coverity ID 103.
1509
1510 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
1511
1512         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1513         value, not the old. Fixes #78312.
1514         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1515
1516         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
1517         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
1518         per-image cache.
1519
1520         * assembly.c (mono_assembly_close): Free image->references.
1521
1522         * assembly.c (mono_assembly_names_equal): Fix a warning.
1523         (mono_assemblies_cleanup): Cleanup more global data.
1524
1525         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
1526
1527         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
1528         ptr_cache and image->modules.
1529
1530         * image.c (mono_image_init): Allocate array_cache lazily.
1531         
1532 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1533
1534         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
1535         behavior was changed recently and has bad side effects.
1536
1537 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
1538
1539         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
1540         
1541         * assembly.c (mono_assembly_close): Remove a debug printf.
1542
1543         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
1544
1545         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
1546         to also allow for temporary references between mono_image_open ()/close ().
1547
1548         * domain.c (get_runtimes_from_exe): Add a FIXME.        
1549
1550 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
1551
1552         * marshal.c: Fix support for dynamic methods.
1553
1554         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
1555
1556         * marshal.c (mono_marshal_cleanup): New cleanup function.
1557
1558         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
1559         image mempools.
1560
1561         * class.c (mono_class_init): Fix leaking class->nested_classes.
1562
1563         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
1564
1565         * image.c (mono_image_init): Initialize the new cashes.
1566
1567         * image.c (mono_image_close): Destroy the new cashes.
1568
1569         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
1570
1571         * mempool.c (mono_mempool_strdup): New helper function.
1572
1573         * class-internals.h: Add prototype for mono_loader_unlock ().
1574
1575         * domain.c (mono_jit_info_table_find): Fix a warning.
1576         (mono_debugger_check_runtime_version): Ditto.
1577
1578         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
1579         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
1580         functions to these modules.
1581
1582         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
1583         metadata modules.
1584         
1585         * marshal.c (mono_free_bstr): Fix a warning.
1586
1587         * assembly.c (mono_assembly_open_full): Fix another small leak.
1588
1589         * object.c: Fix some unload leaks in the remoting code.
1590
1591         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
1592         function.
1593
1594         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
1595
1596         * reflection.c: Fix some unload leaks in dynamic assemblies.
1597
1598 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
1599
1600         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
1601         * marshal.h: Add BSTR support on Win32
1602         * icall.c: Add BSTR icalls
1603         * metadata.h: Add BSTR enums
1604
1605 2006-04-28  Miguel de Icaza  <miguel@novell.com>
1606
1607         Work to catch the crash from #76795 and turn it into an
1608         exception.   As I stubbed out pieces of the VisualBasic support,
1609         I found a number of places where the code was failing and I added
1610         checks to those places. 
1611         
1612         * metadata.c (do_mono_metadata_parse_generic_class): Make this
1613         function return a status code.  If we fail to parse the signature
1614         from mono_metadata_parse_generic_inst, return FALSE.
1615
1616         * loader.c (mono_get_method_from_token): If we fail to load the
1617         method (mono_class_get) return NULL.   
1618
1619         * (method_from_memberref): Return NULL if we are unable to parse
1620         the method signature
1621
1622         (mono_loader_error_prepare_exception): Since we now use the
1623         loader_error flag internally to stop processing, and obtaining
1624         exceptions that might be thrown will walk this code path the
1625         proper way of going from a MonoLoaderError into a
1626         MonoException was convoluted.   This new routine encapsulates the
1627         process of turning the error into an exception and *clearing* the
1628         error afterwards.
1629         
1630 2006-04-27  Miguel de Icaza  <miguel@novell.com>
1631
1632         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
1633         with missing assemblies), and to cope with:
1634
1635                 * Missing fieldref from a non-existing assembly.
1636                 * Missing methodref from a non-existing assembly.
1637
1638         The first batch of work to address *some* of the issues from 76661.
1639         
1640         * object.c (mono_class_create_runtime_vtable): If we fail to
1641         initialize the class raise the exception here. 
1642
1643         * metadata.c (mono_class_get_overrides_full): If any methods fail
1644         to load return the failure to the caller.
1645
1646         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
1647         flagging assemblies that failed to load.   
1648
1649         Do not crash if we are unable to load the assembly.
1650
1651         (mono_assembly_close): Do nothing with REFERENCE_MISSING
1652         assemblies. 
1653
1654         * loader.c (mono_loader_set_error_type_load): Change the
1655         convention to always pass unallocated strings, so we make our own
1656         copies (I know our own code had duplicated strings before, but
1657         this keeps the normal conventions).
1658         (method_from_memberref): Call mono_loader_set_error_method_load
1659         for all possible failures of loading the class. 
1660         Remove assert, turn into a loader error.
1661
1662         (mono_loader_error_to_exception): Move this routine from mini
1663         (mini_loader_error_to_exception) there was no need to have that in
1664         mini. 
1665
1666         * class.c (mono_class_from_typeref): If we were not able to load
1667         the assembly with mono_assembly_load_reference, call the
1668         mono_loader_set_error_type_load to register the problem.
1669
1670         (mono_class_setup_fields): If we fail to load the type from
1671         mono_metadata_parse_type_full, call mono_class_set_failure and
1672         break from the loop.
1673
1674         If class->exception_type is set, we do not layout the fields as
1675         that might crash the runtime, and instead return (from breaking
1676         from the previous loop).
1677
1678         (mono_class_setup_vtable): This now returns a boolean indicating
1679         whether the table was properly setup.   The decision is driven by
1680         mono_class_get_overrides_full which might run into non-existing
1681         methods. 
1682         
1683         (mono_class_init): Returns TRUE on success or FALSE if there was a
1684         problem in loading the type (incorrect assemblies, missing
1685         assemblies, methods, etc).
1686
1687         When we call mono_class_setup_fields we also check for a potential
1688         error inside this call (either a class exception or a general
1689         loader exception).
1690
1691         (mono_class_create_from_typedef): If the parent fails to load
1692         (calling mono_class_get_full) return NULL.
1693         
1694         ** Important **
1695
1696         calls to mono_metadata_parse_type_full should be checked
1697         everywhere and set the mono_class_set_failure
1698         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
1699
1700         The current patch checks the places where my manually constructed
1701         tests show the errors are showing up, but we should do it
1702         everywhere. 
1703
1704         ** Important2 **
1705
1706         mono_class_init return values should be tested everywhere, like
1707         the previous case this is something that we should audit
1708         everywhere and not only on the cases exposed by the tests I
1709         created. 
1710
1711 2006-04-26  Miguel de Icaza  <miguel@novell.com>
1712
1713         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
1714         boolean parameter and instead pass the information on `options'
1715         parameter (FileOptions).
1716
1717         * icall.c: Register the new signature for MonoIO.Open.
1718
1719         * debug-helpers.c (dis_one): Trying to understand how coverity
1720         works.  Fix Run 5, item 78.
1721
1722 2006-04-26  Dick Porter  <dick@ximian.com>
1723
1724         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
1725         dereference.
1726
1727 2006-04-25  Martin Baulig  <martin@ximian.com>
1728
1729         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
1730
1731         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
1732         debugger_thread_created().
1733         (debugger_gc_push_all_stacks): Don't handle the main thread in any
1734         special way.
1735         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
1736         (mono_debugger_finalize_threads): New function; undo the effects
1737         of mono_debugger_init_threads().
1738         (mono_debugger_create_all_threads): Removed.
1739
1740 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
1741
1742         * image.c (mono_image_close): Tidy up trace messages.
1743
1744         * assembly.c (mono_assembly_close): Ditto.
1745
1746         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
1747         no longer references an already freed assembly. Fixes #78168.
1748
1749 2006-04-21  Dick Porter  <dick@ximian.com>
1750
1751         * threads.c (mono_thread_detach): Fix reference counting when
1752         detaching threads.
1753
1754 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
1755
1756         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
1757         #78155.
1758
1759 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
1760
1761         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
1762         (mono_type_to_stind): Ditto.
1763
1764         * marshal.c: Use the new helper functions to simplify code.
1765
1766         * image.c (mono_image_close): Add some code for help debug assembly unloading
1767         problems.
1768
1769         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
1770         image mempool.
1771
1772         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
1773         assembly was already loaded in another appdomain. Fixes #78083.
1774
1775 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
1776
1777         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
1778         referenced assemblies.
1779         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
1780
1781         * domain.c (mono_domain_free): Add a trace message.
1782
1783         * appdomain.c (add_assemblies_to_domain): Ditto.        
1784
1785         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
1786         field.  
1787
1788 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1789
1790         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
1791
1792 2006-04-12  Martin Baulig  <martin@ximian.com>
1793
1794         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
1795         `USE_INCLUDED_LIBGC'.   
1796
1797 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1798
1799         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
1800         the patch contains ../ and a small directory name later. Hopefully fixes
1801         #78035.
1802
1803 2006-04-10  Martin Baulig  <martin@ximian.com>
1804
1805         Clean up the debugger's thread-handling code.
1806
1807         The debugger's thread-handling code has been moved from
1808         ../mini/debug-debugger.c to threads.c.  We now iterate directly
1809         over the `threads' hash, keep track of exiting threads and also
1810         use proper locking.
1811
1812         We can now debug XSP and XSP based applications with the debugger.
1813
1814         * object-internals.h (MonoThread): Added `gpointer end_stack'.
1815
1816         * threads.h
1817         (MonoThreadCallbacks): Removed; this was only used by the debugger.
1818         (mono_install_thread_callbacks): Likewise.      
1819
1820         * threads.c (mono_thread_callbacks): Removed.
1821         (debugger_thread_created, debugger_thread_exited): New static functions.
1822         (start_wrapper): Call debugger_thread_created().
1823         (thread_cleanup): Call debugger_thread_exited().
1824         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
1825         (mono_debugger_init_threads): New public function.
1826         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
1827         iterate directly over the `threads' hash and also use proper locking.
1828
1829         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
1830
1831         * mono-debug-debugger.h
1832         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
1833
1834 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
1835
1836         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
1837         argument type=array. Fixes #78057.
1838
1839 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
1840
1841         * culture-info-table.h : regenerated. Fixed bug #69652.
1842
1843 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
1844
1845         * loader.c metadata.c: Reapply a variant r59116.
1846         
1847         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
1848
1849         * class.c (mono_class_setup_interface_offsets): New internal function.
1850
1851         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
1852         interfaces too. Fixes #77398.
1853
1854         * reflection.c (encode_cattr_value): Add support for 
1855         parameter type=object, argument type=array.
1856         (load_cattr_value): Ditto. Fixes #77916.
1857
1858         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
1859         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
1860
1861         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
1862         a byval char array and CharSet is Ansi.
1863
1864         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
1865
1866 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
1867
1868         * metadata.c: Add some locking comments.
1869         
1870         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
1871         mempool.
1872         (mono_metadata_free_method_signature): Don't free the signature itself.
1873
1874         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
1875
1876         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
1877         reference the same MonoImage.
1878         (mono_assembly_load_from_full): Add an assert.
1879
1880 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
1881
1882         * image.c (mono_image_close): Don't put the image we are about to free into the
1883         loaded_images_guid_hash.
1884
1885         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
1886         to reduce code duplication.
1887
1888         * marshal.c: Register the native functions called by this module as icalls, to
1889         somewhat centralize the creation of MonoMethodSignature's.
1890
1891         * loader.c (mono_method_signature): Add a cache for method signatures.
1892
1893         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
1894         the parameter attributes of a method.
1895         (mono_metadata_parse_method_signature_full): Refactored the computation of
1896         parameter attributes into a separate function. Also avoid one allocation in
1897         most cases.
1898
1899         * assembly.c (mono_assembly_close): Ditto.
1900
1901         * image.c (mono_image_close): Log trace messages with INFO level.
1902
1903         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
1904
1905         * image.c reflection.c: Correct reference counting of image modules.
1906         
1907         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
1908         of this function from the image mempool.
1909         
1910         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
1911         to allow more cached types to be used.
1912
1913         * mono-debug.c (mono_debug_add_method): Appled patch from
1914         David S. Miller  <davem@sunset.davemloft.net>: Access 
1915         minfo->lexical_blocks[] entry elements using read32().
1916
1917 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
1918
1919         * loader.c (mono_free_method): No longer free the method header for non-dynamic
1920         methods as it is allocated from the mempool.
1921
1922         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
1923         image mempool.
1924
1925         * metadata-internals.h: Add comments describing the reference counting scheme
1926         used for MonoImage and MonoAssembly.
1927
1928         * image.c assembly.c reflection.c: Rework reference counting of images and 
1929         assemblies so they are freed when the runtime is shut down. Free some 
1930         additional memory structures when an image is unloaded.
1931         
1932 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
1933
1934         * class.c loader.c reflection.c: Allocate more data structures in
1935         the image mempool.
1936
1937 2006-03-31  Miguel de Icaza  <miguel@novell.com>
1938
1939         * icall.c
1940         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
1941         build on pre glib 2.4 systems.
1942
1943 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
1944
1945         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
1946
1947         * icall.c: Fix some warnings.
1948
1949 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
1950
1951         * culture-info-table.h : regenerated.
1952
1953 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
1954
1955         * threads.c, object-internals.h, verify.c: changed the culture caching
1956         code to use a normal MonoArray for storage so the GC can keep track of
1957         them easily. Fixed bits of the cache logic, too and simplified the
1958         code.
1959
1960 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
1961
1962         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
1963         thread for non-Boehm GCs.
1964
1965 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
1966
1967         * domain.c, object.c, domain-internals.h: reduce the amount of memory
1968         needed to keep track of the data for static fields.
1969
1970 2006-03-29  Raja R Harinath  <rharinath@novell.com>
1971
1972         Fix #75172
1973         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
1974         for interface classes.  Use 'num_methods' instead.
1975         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
1976         before using '->vtable_size' field.
1977
1978 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1979
1980         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
1981         doesn't contain managed pointers, so use a normal hashtable.
1982
1983 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1984
1985         * reflection.c, class-internals.h, domain.c: fixed handling of types
1986         used as values for objects in custom attributes (bug #77915):
1987
1988 2006-03-24  Martin Baulig  <martin@ximian.com>
1989
1990         * class.c (mono_class_setup_fields): Added support for generic
1991         instances; fixes #77580.
1992
1993 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1994
1995         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
1996
1997 2006-03-24  Dick Porter  <dick@ximian.com>
1998
1999         * file-io.c (get_file_attributes): More stat macro breakage.
2000         Fixes bug 77759.
2001
2002 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
2003
2004         * profiler.c: added the file=filename option in the default profiler
2005         to output the profile data to filename.
2006
2007 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2008
2009         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
2010         bug #77877.
2011
2012 2006-03-22  Martin Baulig  <martin@ximian.com>
2013
2014         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
2015         allocated `MonoClassField *' in `fb->handle'.
2016
2017 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2018
2019         * class.c, image.c, metadata-internals.h: implemented new mechanism to
2020         allocate interface ID to save memory and allow better ID reuse on
2021         appdomain unload. setup_generic_vtable () removal from Martin.
2022
2023 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2024
2025         * object.h, appdomain.c, domain.c, exception.c, icall.c,
2026         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
2027         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
2028         write barriers for reference stores with managed objects accessed with
2029         C structures in the runtime and in embedding programs.
2030
2031 2006-03-20  Raja R Harinath  <rharinath@novell.com>
2032
2033         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
2034         'interface_id' and 'max_interface_id' fields of MonoClasses
2035         representing open generic types.
2036
2037 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
2038
2039         * object.h, object.c, icall.c: added functions to deal with
2040         storing valuetypes that contain references in managed objects.
2041         * reflection.c, string-icalls.c, threads.c, marshal.c: small
2042         fixes and comments around uses of mono_array_addr ().
2043
2044 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
2045
2046         * object.h, icall.c, monitor.c: object.GetHashCode ()
2047         implementation that supports the moving garbage collector.
2048
2049 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
2050
2051         * icall.c, threads-types.h, threads.c: implemented finalizer for
2052         LocalDataStoreSlot.
2053
2054 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
2055
2056         * metadata.c (mono_type_size): Add a fixme.
2057         (mono_type_stack_size): Ditto.
2058
2059         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
2060         'type_forwarders' field.
2061
2062         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
2063         attribute from net 2.0.
2064
2065         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
2066         from class.c.
2067
2068         * class.c (mono_class_setup_fields): Fix a warning.
2069         
2070         * class.c (mono_class_from_name): Add support for assemblyref entries
2071         in the EXPORTEDTYPE table.
2072
2073         * reflection.c: Add support for handling type forwarders under net 2.0.
2074
2075         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
2076         
2077 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
2078
2079         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
2080         overwriting entries in ModuleBuild->types, also clean up the code
2081         a little. Fixes #77774.
2082
2083 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
2084
2085         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
2086         load friend assembly info when present.
2087
2088 2006-03-14  Raja R Harinath  <rharinath@novell.com>
2089
2090         Fix crasher on gtest-158.cs.
2091         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
2092         the return value if the MonoClass we want is yet in an
2093         inconsistent state.
2094         * class.c (mono_class_create_from_typedef): Add an comment
2095         explaining an order dependency between mono_class_setup_parent and
2096         mono_class_setup_mono_type.
2097
2098 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
2099
2100         * class.c: documentation updates and events bug fix.
2101
2102 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
2103
2104         * class.c: some cleanup, locking fixes.
2105
2106 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2107
2108         * class.c: fix the generics code to setup nested
2109         type info to the instantiated type (bug #77770).
2110
2111 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
2112
2113         * marshal.c: fixed a few type correctness issues.
2114
2115 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2116
2117         * loader.c: the Set/Get/Addrtess array methods should be public.
2118
2119 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
2120
2121         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
2122         
2123         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
2124         info->wrapper.
2125
2126 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
2127
2128         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
2129
2130         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
2131
2132         * mempool.c (mono_mempool_alloc): Speed this up a bit.
2133         (mono_mempool_alloc0): Ditto.
2134
2135 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2136
2137         * socket-io.c:
2138         (create_object_from_sockaddr): it was allocating 4 extra bytes
2139         for the AF_UNIX data. Fixes bug #77747.
2140
2141 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
2142
2143         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
2144
2145 2006-03-09  Dick Porter  <dick@ximian.com>
2146
2147         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
2148         Fixes bug 76966 again.
2149
2150 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
2151
2152         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
2153         names from r57532
2154         * appdomain.c: Bumped corlib version to 48 (due to r57532)
2155
2156 2006-03-07  Martin Baulig  <martin@ximian.com>
2157
2158         * object.c
2159         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
2160
2161 2006-03-07  Martin Baulig  <martin@ximian.com>
2162
2163         * class.c
2164         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
2165         regression introduced in r56970; see gtest-252.cs.
2166
2167         * loader.c (mono_get_method_constrained): Correctly handle generic
2168         methods; see gtest-253.cs.
2169
2170 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
2171
2172         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
2173
2174 2006-03-04  Martin Baulig  <martin@ximian.com>
2175
2176         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
2177         compute the parent type at runtime, just like we're already doing
2178         it for interfaces.
2179
2180         * reflection.c
2181         (mono_reflection_bind_generic_parameters): Don't compute the
2182         parent type anymore.
2183
2184         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
2185
2186 2006-03-04  Martin Baulig  <martin@ximian.com>
2187
2188         * mono-debug-debugger.h
2189         (mono_debugger_create_notification_function): Allocate memory at
2190         runtime and return a pointer to it.
2191
2192 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
2193
2194         * assembly.c: Fix windows build.
2195         
2196         * assembly.c: Fix build.
2197
2198         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
2199
2200         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
2201         
2202 2006-03-03  Dick Porter  <dick@ximian.com>
2203
2204         * process.c
2205         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2206         Check parameters before dereferencing them.  Fixes Aaron's part of
2207         bug 77393.
2208
2209 2006-03-03  Raja R Harinath  <rharinath@novell.com>
2210
2211         Fix performance regression.
2212         * loader.c (find_method_in_class): Add 'from_class' argument.
2213         Rename 'klass' argument to 'in_class'.  The signature is compared
2214         against the method in 'in_class', and the corresponding method is
2215         returned from 'from_class'.
2216         (find_method): Walk both 'in_class' and 'from_class' in parallel.
2217         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
2218         type definition and generic instantiation in parallel.
2219         (mono_get_method_constrained): Update to changes.
2220
2221 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
2222
2223         * threads.c: make sure the domain is correct, too when doing
2224         mono_thread_attach ().
2225
2226 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
2227
2228         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
2229         windows. Fixes #77683.
2230
2231 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
2232
2233         * object.h, *: introduced specific way to set elements of an array
2234         of references to be used as write barrier. Still need to audit the
2235         uses of mono_array_addr.
2236
2237 2006-03-01  Miguel de Icaza  <miguel@novell.com>
2238
2239         * object-internals.h: New field to cache the assmebly name, patch
2240         from Tambet Ingo (tambet@ximian.com)
2241
2242 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2243
2244         * decimal.h, class-internals.h, metadata-internals.h,
2245         file-io.h: mark a few function declarations as internal, to
2246         reduce the number of PLT entries.
2247
2248 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2249
2250         * file-io.c: fix typo in warning message.
2251
2252 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
2253
2254         * loader.c: on unix, lookup the "*A" version of a function
2255         if charset is auto as a second option before failing.
2256
2257 2006-02-28  Raja R Harinath  <rharinath@novell.com>
2258
2259         * class.h (mono_class_inflate_generic_method): Revert to two
2260         argument version.
2261         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
2262         (mono_class_inflate_generic_method_full): Add.
2263         * class.c (mono_class_inflate_generic_method_full): Rename from
2264         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
2265         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
2266         * loader.c, reflection.c: Update to changes.
2267
2268 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
2269
2270         * icall.c: const fixes and small improvements.
2271
2272 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2273
2274         * threadpool.c: for asynchronous connect(), enable the same workaround
2275         for BSD 6 as for the Mac. Fixes bug #77637.
2276
2277 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
2278
2279         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
2280         formatted classes. Fixes #77524.
2281
2282 2006-02-24  Raja R Harinath  <rharinath@novell.com>
2283
2284         * class.c (inflate_generic_type): Add a couple more
2285         micro-optimizations.
2286         (inflate_generic_context): Don't use the 'gmethod' from
2287         'inflate_with'.
2288         (mono_class_inflate_generic_method): If the method has generic
2289         parameters, but the passed-in context doesn't have a 'gmethod',
2290         create one.  Use the possibly simplified generic instantiation
2291         from the declaring class instead of the one passed in.
2292
2293 2006-02-24  Raja R Harinath  <harinath@gmail.com>
2294
2295         Make generic method signature and method header handling lazy.
2296         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
2297         (inflate_generic_header): Likewise.
2298         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
2299         parameter to avoid inflating types.
2300         (mono_get_inflated_method): Empty out.
2301         * class.h (mono_class_inflate_generic_method): Update to changes.
2302         * loader.c (mono_get_method_from_token): Don't parse signature for
2303         generic methods, nor methods of generic classes.
2304         (mono_method_signature): Rename from 'mono_method_signature'.
2305         Inflate signature on demand.
2306         (mono_method_get_header): Inflate method header on demand.
2307         * reflection.c: Update to changes.
2308
2309 2006-02-23  Raja R Harinath  <rharinath@novell.com>
2310
2311         * metadata.c (mono_metadata_inflate_generic_inst): If the
2312         instantiation is closed, don't bother expanding it in the new
2313         context.
2314         * class.c (inflate_generic_class): If the generic instantiation
2315         doesn't change after inflation, return the argument itself.
2316         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
2317         Add bounds checks.
2318         (inflate_generic_context): If neither the generic class nor the
2319         generic method instantiations change, return the original context.
2320         * reflection.c (mono_method_get_object): Do
2321         'mono_get_inflated_method' before accessing the ->klass field.
2322         (inflate_mono_method): Don't create a MonoGenericMethod unless
2323         necessary.
2324         (inflate_method): Don't pass a constructed type as the declaring
2325         type of a methodbuilder.
2326
2327 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
2328
2329         * object.c: fix memory overwrite.
2330
2331 2006-02-22  Dick Porter  <dick@ximian.com>
2332
2333         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
2334         it doesn't work any more.
2335         (mono_threads_request_thread_dump): Fix unused variable warnings.
2336
2337 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2338
2339         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
2340         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
2341         the public header file.
2342
2343 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
2344
2345         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
2346
2347 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2348
2349         * class-internals.h, object.c: reduce the size of MonoVTable
2350         and store the interface_offsets array at negative offsets.
2351
2352 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
2353
2354         * metadata.c: tweak table descriptors data structures to reduce
2355         size and runtime relocations.
2356
2357 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2358
2359         * marshal.c: fix some types and opcodes to be type-safe
2360         in marshaling wrappers.
2361
2362 2006-02-21  Ankit Jain  <jankit@novell.com>
2363
2364         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
2365
2366 2006-02-21  Raja R Harinath  <rharinath@novell.com>
2367
2368         * metadata.c (get_constraints): Relax debugging checks for monodis.
2369
2370 2006-02-21  Ankit Jain  <jankit@novell.com>
2371
2372         * metadata.c (mono_metadata_load_generic_params): Move the code
2373         checking for ambiguous generic params from here to mono/dis/get.c
2374         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
2375
2376 2006-02-21  Raja R Harinath  <harinath@gmail.com>
2377
2378         Fix assertion triggered when compiling nemerle.
2379         * class.c (mono_get_shared_generic_inst): Rename from
2380         get_shared_inst and make non-static.
2381         * loader.c (mono_get_shared_generic_method): New.  Used to create
2382         the MonoGenericContext-equivalent of a MonoGenericContainer.
2383         (mono_get_method_from_token): Initialize the 'context' field of
2384         the created MonoGenericContainer.
2385         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
2386         * metadata.c (get_constraints): Add sanity check.
2387         * class-internals.h: Add new internal methods.
2388
2389         * reflection.c (verify_safe_for_managed_space): New sanity check.
2390         Currently checks that owner-less generic parameters aren't allowed
2391         in managed space.
2392         (mono_type_get_object): Use it.
2393         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
2394         that are now in mono_type_get_object.
2395         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
2396
2397 2006-02-19  Raja R Harinath  <harinath@gmail.com>
2398
2399         * metadata.c (mono_type_create_from_typespec): Rename from
2400         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
2401         argument and caching of types in the generic container.
2402         (unwrap_arrays, find_generic_param): Remove.
2403         * metadata-internals.h: Update.
2404         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
2405
2406 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
2407
2408         * class.c (mono_class_get_exception_for_failure): Fix a warning.
2409
2410         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
2411         return values. Fixes #77581.
2412
2413         * class.c (mono_fnptr_class_get): Switch name and name_space.
2414
2415         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
2416         classes and add support for [In, Out] attributes.
2417         (mono_marshal_free_asany): Ditto. Fixes #77524.
2418
2419 2006-02-18  Raja R Harinath  <harinath@gmail.com>
2420
2421         * class.c (mono_class_from_generic_parameter): Make more robust to
2422         incomplete MonoGenericContainers from monodis.
2423
2424 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2425
2426         * class-internals.h: added some more exception types.
2427         * class.c, metadata.c: added a few checks to handle missing
2428         types.
2429
2430 2006-02-17  Raja R Harinath  <rharinath@novell.com>
2431
2432         Use owner-less generic-params some more.
2433         * class.c (my_mono_class_from_generic_parameter): Remove.
2434         (mono_class_from_generic_parameter): Handle null image,
2435         param->name and param->owner.
2436         (mono_class_from_mono_type): Update.
2437         (mono_class_create_from_typespec): Remove 'container' parameter.
2438         If that parameter is non-null, the result is always inflated by
2439         'mono_class_get_full' anyway.
2440         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
2441         parameter.
2442         (mono_class_get_full): Update.
2443
2444         * class.c (inflate_generic_type) [GENERICINST]: If the generic
2445         instance is not open, don't bother inflating.
2446         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
2447         parse metadata for inflated classes.
2448         (_mono_class_get): Change GenericContext* parameter to
2449         GenericContainer*.
2450         (mono_class_create_from_typespec): Likewise.  Simplify, and
2451         implement trivially.  All the cases are handled in
2452         mono_class_from_mono_type.  Don't inflate returned class.
2453         (mono_class_get_full): Delegate GENERICINST optimization to
2454         inflate_generic_type.
2455         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
2456
2457 2006-02-16  Dick Porter  <dick@ximian.com>
2458
2459         * socket-io.c (create_object_from_sockaddr): Fix typo.
2460         (create_sockaddr_from_object): Check array lengths before
2461         potentially accessing items off the end.
2462         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2463         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2464         (ves_icall_System_Net_Sockets_Socket_Send_internal)
2465         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2466         length checks to avoid wraparound overflows.
2467         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2468         contents of the array of sockets
2469         (hostent_to_IPHostEntry2)
2470         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2471         Check return value of inet_ntop ().
2472         (addrinfo_to_IPHostEntry): Fix typo
2473
2474 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2475
2476         Type metadata parsing doesn't use generic-instantiation information.
2477         * metadata.c (mono_metadata_parse_array_full): Change
2478         MonoGenericContext* parameter to MonoGenericContainer*.
2479         (mono_metadata_parse_type_full): Likewise.
2480         (mono_type_create_from_typespec_full): Likewise.
2481         (mono_metadata_parse_mh_full): Likewise.
2482         (mono_metadata_parse_generic_inst): Likewise.
2483         (do_mono_metadata_parse_generic_class): Likewise.
2484         (do_mono_metadata_parse_type): Likewise.
2485         * metadata-internals.h: Update to changes.
2486         * class.c (mono_class_find_enum_basetype): Likewise.
2487         (mono_class_setup_fields): Likewise.
2488         (mono_class_create_from_typespec): Likewise.
2489         * loader.c (method_from_methodspec): Likewise.
2490         (mono_get_method_from_token): Likewise.
2491         (mono_method_get_header): Likewise.
2492
2493 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2494
2495         * marshal.c: handle additional GENERICINST case (patch from
2496         Thong Nguyen <tum@veridicus.com>).
2497         Fix a few cases where LDIND_I/STIND_I was used for references.
2498
2499 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2500
2501         * reflection.c (mono_reflection_get_token): Remove unused variable.
2502
2503 2006-02-16  Martin Baulig  <martin@ximian.com>
2504
2505         * reflection.c (mono_reflection_get_token): Add support for fields
2506         in instantiated generic types.
2507
2508         * icall.c
2509         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2510
2511 2006-02-15  Martin Baulig  <martin@ximian.com>
2512
2513         * icall.c
2514         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2515         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2516         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
2517         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
2518
2519 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
2520
2521         * class.c, metadata.c, metadata.h, object.c, icall.c,
2522         marshal.c: changed mono_type_get_underlying_type () to do
2523         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
2524         Fixed handling of instantiated generic valuetypes (bug #75479).
2525
2526 2006-02-15  Raja R Harinath  <rharinath@novell.com>
2527
2528         * metadata.c (mono_metadata_decode_signed_value): Simplify.
2529         Delegate to mono_metadata_decode_value, and work on the returned value.
2530
2531         * icall.c (ves_icall_MonoType_GetGenericArguments):
2532         Add consistency check here too.
2533         
2534 2006-02-15  Ankit Jain  <jankit@novell.com>
2535
2536         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
2537         char/short etc.
2538
2539 2006-02-15  Ankit Jain  <jankit@novell.com>
2540
2541         * metadata.c (mono_metadata_decode_signed_value): New function to decode
2542         signed values, used only for representing lower bounds of arrays.
2543         (mono_metadata_parse_array_full): Use new
2544         mono_metadata_decode_signed_value to decode lower bounds.
2545
2546 2006-02-14  Martin Baulig  <martin@ximian.com>
2547
2548         * reflection.c
2549         (mono_reflection_get_token): Support "MonoGenericMethod" and
2550         "MonoGenericCMethod" and allow generic instances / methods.
2551
2552 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
2553
2554         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
2555         to obtain the terminal size using an ioctl.
2556
2557         * object.c (mono_nullable_init): Revert this as nullable reference
2558         types are not valid.
2559         (mono_nullable_box): Ditto.
2560
2561 2006-02-09  Dick Porter  <dick@ximian.com>
2562
2563         * threads.c (mono_thread_detach): Drop a reference to the thread
2564         we're detaching.
2565
2566 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
2567
2568         * object.c (mono_nullable_init): Handle nullable reference types.
2569         (mono_nullable_box): Ditto. Fixes #77446.
2570
2571 2006-02-07  Martin Baulig  <martin@ximian.com>
2572
2573         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
2574
2575 2006-02-07  Ankit Jain  <jankit@novell.com>
2576
2577         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
2578         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
2579         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
2580         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
2581         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
2582         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
2583
2584 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
2585
2586         * class.c (mono_class_create_generic): Set type_token as well.
2587
2588         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
2589         compatible with MS.
2590
2591 2006-02-02  Martin Baulig  <martin@ximian.com>
2592
2593         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
2594         has never been used so far.
2595
2596 2006-02-02  Martin Baulig  <martin@ximian.com>
2597
2598         * mono-debug-debugger.h: Changed comment at the top of this file;
2599         the header is not installed, but it's safe to #include it from
2600         within the JIT.
2601
2602         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
2603         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
2604
2605 2006-02-02  Martin Baulig  <martin@ximian.com>
2606
2607         * mono-debug.h
2608         (MonoSymbolTable): Removed the `metadata_info' field.
2609
2610         * mono-debug.c
2611         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
2612
2613         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2614         (mono_debugger_add_builtin_types): Removed.
2615         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
2616         (mono_debugger_create_notification_function): We now operate on a
2617         pre-allocated area; take a `gpointer' and return `void'.
2618
2619         * mono-debug-debugger.c
2620         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
2621         (mono_debugger_add_builtin_types): Removed.
2622
2623 2006-02-02  Martin Baulig  <martin@ximian.com>
2624
2625         * threads.c (mono_debugger_create_all_threads): New public method.
2626
2627 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2628
2629         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
2630         breaks on several platforms.
2631
2632 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
2633
2634         * assembly.c: the VS.NET build doesn't supply default values for
2635         MONO_ASSEMBLIES and MONO_CFG_DIR.
2636
2637 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
2638
2639         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
2640         helper function.
2641
2642         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
2643
2644         * loader.c (method_from_memberref): Fix a warning.
2645
2646         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
2647
2648         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
2649         with explicit layout. Fixes #77433.
2650
2651 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
2652
2653         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
2654         max_interface_id is initialized before using it. Fixes #77398.
2655         (ves_icall_Type_GetInterfaces): Ditto.
2656
2657 2006-01-30  Raja R Harinath  <rharinath@novell.com>
2658
2659         * metadata.c (mono_metadata_parse_method_signature_full): Don't
2660         allocate memory for parameter attributes when parsing memberref
2661         signatures.
2662         * loader.c (mono_loader_set_error_method_load): Don't warn.
2663         (method_from_memberref): Ensure MissingMethodException gets thrown
2664         if method is not found.  Make warning more informative.
2665
2666 2006-01-29  Raja R Harinath  <harinath@gmail.com>
2667
2668         Fix #77397
2669         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
2670         return true if is byref.
2671         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
2672         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
2673         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
2674
2675 2006-01-27  Raja R Harinath  <rharinath@novell.com>
2676
2677         Fix tests/find-method.2.il
2678         * loader.c (find_method, find_method_in_class): Remove is_inflated
2679         argument.  Revert 2006-01-18 change.
2680         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
2681         is generic, search for method in its generic definition.
2682         * class.c (mono_class_setup_vtable_general): Print generic
2683         arguments of generic types in debugging printf.
2684
2685 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
2686
2687         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
2688
2689         * threads.c (mono_threads_request_thread_dump): New helper function.
2690
2691 2006-01-25  Raja R Harinath  <rharinath@novell.com>
2692
2693         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
2694
2695 2006-01-25  Ankit Jain  <jankit@novell.com>
2696
2697         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
2698         move definition to ..
2699         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
2700         
2701 2006-01-25  Ankit Jain  <jankit@novell.com>
2702             Raja R Harinath  <rharinath@novell.com>
2703
2704         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
2705         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
2706         as necessary.
2707
2708 2006-01-25  Martin Baulig  <martin@ximian.com>
2709
2710         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
2711         `MonoDebuggerThread' into debug-debugger.c.
2712
2713 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2714
2715         * profiler.c: fix printing of data.
2716
2717 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
2718
2719         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
2720           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
2721
2722 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2723
2724         * object.c: fix deadlock related to string interning.
2725
2726 2006-01-23  Martin Baulig  <martin@ximian.com>
2727
2728         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
2729
2730         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
2731
2732 2006-01-23  Martin Baulig  <martin@ximian.com>
2733
2734         * mono-debug.h: Moved the prototypes of some functions which are
2735         used by the JIT here from mono-debug-debugger.h.
2736
2737 2006-01-21  Martin Baulig  <martin@ximian.com>
2738
2739         * Makefile.am: Don't install mono-debug-debugger.h.
2740
2741 2006-01-21  Martin Baulig  <martin@ximian.com>
2742
2743         * mono-debug-debugger.h: Enforce the private status of this header
2744         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
2745         Moved some stuff from mono-debugger-jit-wrapper.h here.
2746
2747 2006-01-20  Raja R Harinath  <rharinath@novell.com>
2748
2749         * class.c (mono_class_from_typeref): Add a sanity test to help
2750         catch lack of assembly load/search hooks.
2751
2752 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
2753
2754         * marshal.c (emit_struct_conv): Relax the fields with same offset
2755         check even more. Fixes #77230.
2756
2757 2006-01-18  Martin Baulig  <martin@ximian.com>
2758
2759         * loader.c (find_method_in_class): Added `gboolean is_inflated'
2760         argument; if false, we compare the uninstantiated signatures.
2761         (method_from_memberref): Compare the uninstantiated signatures;
2762         fixes #76417.
2763
2764 2006-01-18  Robert Jordan  <robertj@gmx.net>
2765
2766         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
2767         Clear the weak link. Fixes bug #77170.
2768
2769         * gc.c (mono_gchandle_free):
2770         Reflect *-gc.c changes (tiny optimization).
2771
2772 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
2773
2774         * metadata.c (mono_metadata_signature_dup): Applied patch from
2775         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
2776         Fixes #77288.
2777
2778 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
2779
2780         * marshal.c (emit_struct_conv): Allow fields with the same offset when
2781         marshalling from native to managed code. Fixes #77230.
2782
2783 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2784
2785         * threadpool.c: fix problem (Mac only) when more than one asynchronous
2786         connect. Fixes bug #77020.
2787
2788 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2789
2790         * class.c: fixed id assignement for nested interfaces (bug #77275).
2791         Added also better info for --print-vtable debugging.
2792
2793 2006-01-12  Martin Baulig  <martin@ximian.com>
2794
2795         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
2796         interfaces on-the-fly; fixes #76625.
2797
2798         * class-internals.h
2799         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
2800         don't need that anymore.
2801
2802 2006-01-12  Miguel de Icaza  <miguel@novell.com>
2803
2804         * socket-io.c
2805         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
2806         To avoid initing the nested_classes when not needed I turned the
2807         PeerCredData as a toplevel internal class, as it has to be shared
2808         anyways. 
2809
2810         Fixes the CASA issue.
2811
2812 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
2813
2814         * domain.c: Accessors for MonoJitInfo
2815
2816         * profiler-private.h: Add jitinfo to the end jit hook
2817
2818         * profiler.[ch]: Define new hooks, called after jitting which give
2819         the MonoJitInfo that was compiled
2820
2821 2006-01-10  Martin Baulig  <martin@ximian.com>
2822
2823         * class.c (mono_class_setup_events): Add support for generic
2824         classes; fixes #76440.
2825
2826 2006-01-06  Raja R Harinath  <rharinath@novell.com>
2827
2828         Fix #77160.
2829         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
2830         on passed-in method.
2831
2832 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2833
2834         * object.c (mono_runtime_invoke_array): Add Nullable support.
2835
2836         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
2837
2838 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
2839
2840         * file-io.c: Don't consider sockets as directory and avoid an endless
2841         loop. Fix bug #76966.
2842
2843 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2844
2845         * object.c (mono_nullable_init): New helper function.
2846         (mono_nullable_box): Ditto.
2847
2848         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
2849
2850         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
2851
2852         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
2853         
2854 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
2855
2856         * class.c (mono_class_is_assignable_from): Make T assignable to 
2857         Nullable<T>.
2858
2859 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
2860
2861         * appdomain.c: Bump corlib version to 46.
2862         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
2863         serialization purpose) and changed ves_icall_System_Reflection_
2864         Assembly_get_code_base signature to accept a boolean (to escape, or 
2865         not, the assembly code base).
2866
2867 2005-12-23  Dick Porter  <dick@ximian.com>
2868
2869         * icall.c: 
2870         * threads-types.h: 
2871         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
2872         CreateEvent icall now returns "created" boolean parameter.
2873
2874 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
2875
2876         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
2877         #76967.
2878
2879         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
2880         when attr_klass is an interface. Fixes #77045.
2881
2882 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
2883
2884         * marshal.c (emit_struct_conv): Fix previous patch.
2885         
2886         * marshal.c (emit_struct_conv): Add a check for fields with the same
2887         offset.
2888
2889 2005-12-20  Raja R Harinath  <rharinath@novell.com>
2890
2891         Fix regression in Mono.C5.
2892         * class.c (mono_class_create_generic): If 'klass' is an interface
2893         set up the interface offsets.
2894         (mono_class_is_assignable_from): Don't throw away generic arguments.
2895
2896 2005-12-19  Raja R Harinath  <rharinath@novell.com>
2897
2898         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
2899         type parameters.
2900
2901 2005-12-15  Raja R Harinath  <rharinath@novell.com>
2902
2903         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
2904         dead store.
2905         (do_mono_metadata_parse_generic_class): Don't pass the current
2906         generic context when parsing the type being instantiated: it
2907         cannot use it, anyway.
2908
2909         * loader.c (method_from_memberref): Don't inflate a signature if
2910         it doesn't contain any type parameters.
2911
2912 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
2913
2914         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
2915
2916 2005-12-14  Martin Baulig  <martin@ximian.com>
2917
2918         * class.c
2919         (mono_type_get_name_recurse): Don't return null for type
2920         parameters and open generic classes.
2921         (mono_class_setup_methods): Don't exclude generic instances.
2922         (mono_get_unique_iid): Use different IDs for different
2923         instantiations of the same generic type.
2924         (mono_class_setup_vtable): Only use setup_generic_vtable() for
2925         open generic instances; create a normal vtable for closed generic
2926         instances.
2927         (mono_class_setup_vtable_general): We're now also called for
2928         closed generic instances.
2929
2930         * reflection.c
2931         (mono_reflection_bind_generic_parameters): Correctly use
2932         mono_metadata_lookup_generic_inst() everywhere.
2933
2934 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
2935
2936         * object.c (mono_class_create_runtime_vtable): Call 
2937         mono_class_setup_vtable ().
2938
2939         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
2940         function.
2941         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
2942         #76959.
2943
2944         * loader.c (mono_loader_set_error_type_load): Print the type load
2945         warnings to the console so they are more visible to the user.
2946         (mono_loader_set_error_method_load): Ditto.
2947
2948         * reflection.c (ensure_runtime_vtable): Revert the last change as it
2949         is still broken.
2950         
2951         * reflection.c (ensure_runtime_vtable): Fix build.
2952
2953         * reflection.c (ensure_runtime_vtable): Disable an optimization which
2954         doesn't work in all cases.
2955
2956 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
2957
2958         * object.c (mono_array_new_full): Treat a single dimensional array
2959         with 0 lower bounds as an szarray. Fixes #76973.
2960
2961         * reflection.c (custom_attr_visible): Really fix this.
2962
2963 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
2964
2965         * reflection.c (custom_attr_visible): Allow nested public attributes
2966         as well.
2967
2968         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
2969         interface check.
2970
2971 2005-12-12  Raja R Harinath  <harinath@gmail.com>
2972
2973         * class.c (set_generic_param_owner): Delete.
2974         (mono_class_create_from_typedef): Don't set ->owner field of
2975         generic parameters to "param containers" of enclosing classes.
2976         * reflection.c (mono_reflection_initialize_generic_parameter):
2977         Likewise.
2978
2979 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
2980
2981         * reflection.c (custom_attr_visible): Fix build.
2982
2983 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
2984
2985         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
2986         private attributes.
2987         
2988         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
2989         handling of null parameter defaults.
2990
2991 2005-12-09  Raja R Harinath  <rharinath@novell.com>
2992
2993         * class.c (mono_class_from_generic_parameter): Don't set
2994         klass->generic_container.
2995         (my_mono_class_from_generic_parameter): Likewise.
2996
2997 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
2998
2999         * reflection.c (load_public_key): Fix a warning.
3000         (method_encode_code): Fix unaligned accesses.
3001
3002 2005-12-07  Martin Baulig  <martin@ximian.com>
3003
3004         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
3005
3006         * reflection.c
3007         (write_generic_param_entry): Encode our custom attrs.
3008
3009         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
3010
3011 2005-12-07  Martin Baulig  <martin@ximian.com>
3012
3013         * reflection.c (encode_new_constraint): Removed; we don't use the
3014         `NewConstraintAttribute' anymore.
3015
3016 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
3017
3018         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
3019         not fire a TypeResolve event when Assembly.GetType () is called.
3020
3021 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
3022
3023         Beginning of support for nullable types in the runtime. Parts of
3024         this patch are from Martin.
3025
3026         * appdomain.c (MONO_CORLIB_VERSION): Bump
3027
3028         * domain.c (mono_init_internal): get the nullable type
3029
3030         * class.c (mono_class_is_nullable): New method
3031         (mono_class_get_nullable_param): New mehod
3032         (mono_class_create_generic): In types T? set cast_class to T
3033
3034         * class-internals.h (MonoDefaults): new nullable default class
3035         (mono_class_get_nullable_param, mono_class_get_nullable_param):
3036         new methods.
3037
3038 2005-12-05  Raja R Harinath  <rharinath@novell.com>
3039
3040         * metadata.c (select_container): New.  Refactor code to select the
3041         appropriate GenericContainer given the type of generic parameter
3042         we are looking for.
3043         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
3044         not a MonoGenericContext.  Use select_container.  Update parameters.
3045         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
3046         and MONO_TYPE_MVAR.
3047         (unwrap_arrays): Remove duplicate tests.
3048         (find_generic_param): Rename from 'has_same_context'.  Now walks a
3049         generic instantiated class to find any arguments that are generic
3050         parameters.
3051         (mono_type_create_from_typespec_full): Use find_generic_param to
3052         avoid evicting some generic instantiations from the typespec
3053         cache.
3054
3055 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
3056
3057         * reflection.c: fixed writing of doubles on ARM FPA.
3058
3059 2005-12-02  Robert Jordan  <robertj@gmx.net>
3060
3061         * icall.c: Fixed EventInfo.ReflectedType (#76829).
3062
3063 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3064
3065         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
3066         least on SUSE 10 they are not the same (on debian, they are just the
3067         same thing).
3068
3069 2005-12-01  Raja R Harinath  <rharinath@novell.com>
3070
3071         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
3072         DeclaringType for VARs and MVARs.
3073         * class.c (set_generic_param_owner): Fix initialization of owner
3074         fields.
3075
3076 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3077
3078         * icall.c: fixed Enum.ToObject() to correctly convert the values.
3079
3080 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3081
3082         * threadpool.c: workaround for a bug that shows up on the Mac:
3083         select()+connect() on a blocking socket is not like it should
3084         be, so we proceed to connect() in that case, wasting the I/O
3085         threadpool thread until connect succeedes. Fixes bug #75436.
3086
3087 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3088
3089         * threadpool.c: fix typo when setting file descriptor states.
3090
3091 2005-11-28  Raja R Harinath  <rharinath@novell.com>
3092
3093         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
3094         * metadata.c (mono_metadata_parse_method_signature_full): Don't
3095         create a temporary signature container.
3096         (mono_metadata_parse_generic_param): Update to changes.
3097         (mono_type_create_from_typespec_full): Update to changes.
3098         * loader.c (method_from_memberref): Don't use a
3099         MonoGenericContainer while parsing a memberref signature.
3100         (method_from_methodspec): Remove dead-store of the 'container'
3101         variable.  It's overwritten before use.
3102
3103         * metadata.c (mono_type_create_from_typespec_full): Make debugging
3104         checks tighter.
3105         (mono_metadata_parse_generic_param): Likewise.
3106         * loader.c (find_method_in_class): Does not need a
3107         MonoGenericContainer.  Use 'mono_method_signature' rather than
3108         'mono_method_signature_full'.
3109         (find_method, mono_get_method_constrained, method_from_memberref):
3110         Update to changes.
3111
3112         * metadata.c (mono_type_create_from_typespec_full): Ensure that
3113         owner-less generic-parameters are never evicted from the typespec
3114         cache.
3115
3116         * loader.c (method_from_memberref): Don't use the current context
3117         when parsing signatures.
3118         (method_from_methodspec, mono_get_method_from_token): Update to changes.
3119
3120         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
3121         side-effects in g_assert.
3122         * loader.c (mono_get_method_from_token): Resolve klass earlier so
3123         that we don't potentially lose information.
3124
3125 2005-11-26  Dick Porter  <dick@ximian.com>
3126
3127         * icall.c:
3128         * threads.c: icalls to implement basic (ie, not named)
3129         System.Threading.Semaphore.
3130
3131 2005-11-24  Dick Porter  <dick@ximian.com>
3132
3133         * process.c
3134         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3135         Use GetProcessId() if it's available.
3136
3137 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
3138
3139         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
3140
3141 2005-11-23  Raja R Harinath  <rharinath@novell.com>
3142             Ankit Jain  <jankit@novell.com>
3143
3144         * loader.c (mono_get_method_from_token): Initialize 'method' field
3145         of all generic parameters before parsing the signature.  Remove
3146         code that "fixed"-up MVAR references.
3147
3148 2005-11-23  Ankit Jain  <jankit@novell.com>
3149
3150         * metadata.c (mono_metadata_has_generic_params):
3151         (mono_metadata_load_generic_param_constraints):
3152         (mono_metadata_load_generic_params): Move duplicate code ...
3153         (mono_metadata_get_generic_param_row): ... here. Returns the
3154         first row-id in GenericParam table for a given owner (token).
3155         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
3156         prototype.
3157
3158 2005-11-23  Raja R Harinath  <rharinath@novell.com>
3159             Ankit Jain  <jankit@novell.com>
3160
3161         * metadata.c (mono_metadata_class_equal): Pass signature_only when
3162         comparing VARs too.
3163         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
3164         type->data.generic_param only if the type is an MVAR.
3165         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
3166         leak owner-less VARs and MVARs into managed space.
3167
3168 2005-11-21  Martin Baulig  <martin@ximian.com>
3169
3170         * class-internals.h
3171         (MonoMethod): Moved the `generic_container' here from
3172         `MonoMethodNormal' since we now also need it for
3173         `MonoMethodPInvoke';
3174         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
3175         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
3176         an union containing both `MonoMethodNormal' and
3177         `MonoMethodPInvoke'.
3178
3179         * loader.c
3180         (mono_get_method_from_token): Allow implementing generic methods
3181         as interncalls.
3182
3183         * threads.c
3184         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
3185         icall.
3186
3187 2005-11-17  Dick Porter  <dick@ximian.com>
3188
3189         * icall.c: 
3190         * process.h: 
3191         * process.c: Split the Process Start_internal icall into
3192         ShellExecuteEx_internal and CreateProcess_internal, which are
3193         called depending on whether UseShellExecute is true.  Fixes bug
3194         76670.
3195
3196         * appdomain.c (MONO_CORLIB_VERSION): Incremented
3197
3198 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
3199
3200         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
3201         'msize' parameters, use the information in 'mspec' instead.
3202         (emit_object_to_ptr_conv): Ditto.
3203
3204         * marshal.c (emit_struct_conv): Handle explicit layout structs with
3205         fields out of order. Fixes #76733.
3206
3207 2005-11-17  Ankit Jain  <jankit@novell.com>
3208
3209         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
3210
3211 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
3212
3213         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
3214           bug #76575.
3215
3216 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
3217
3218         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
3219         for types with non-auto layout. Fixes #76717.
3220
3221 2005-11-16  Ankit Jain  <jankit@novell.com>
3222
3223         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
3224         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
3225         if generic_context is null.
3226           (mono_metadata_generic_param_equal): param->owner can be null.
3227           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
3228         null.
3229
3230 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
3231
3232         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
3233         the correct value.
3234
3235 2005-11-15  Martin Baulig  <martin@ximian.com>
3236
3237         * object.c (set_value): Use mono_class_from_mono_type() instead of
3238         the hack for generic instances; fixes #76136.
3239
3240 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
3241
3242         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
3243         fields.
3244
3245         * image.c (load_metadata_ptrs): Initialize the new fields.
3246
3247         * reflection.c (create_dynamic_mono_image): Ditto.
3248
3249         * reflection.c (build_compressed_metadata): Use the new fields.
3250
3251         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
3252         icall.
3253
3254         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
3255         icall.
3256         
3257 2005-11-15  Ankit Jain  <jankit@novell.com>
3258             Raja R Harinath  <harinath@gmail.com>
3259
3260         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
3261         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
3262         new per-generic_container cache if the cached MonoType's context matches
3263         the current context.
3264           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
3265         to the expected context.
3266           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
3267
3268 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3269
3270         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
3271         we changed the signature of an icall.
3272         * icall.c: Modify to mono_double_ParseImpl return true/false 
3273         depending on the success, instead of throwing the exception. This will
3274         help us in Double.TryParse methods.
3275         
3276 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
3277
3278         * marshal.c (emit_marshal_object): Throw an exception when
3279         marshalling 'object' instead of crashing. Fixes #76696.
3280
3281 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
3282
3283         * class-internals.h: Add prototype for mono_type_get_full_name ().
3284
3285 2005-11-11  Dick Porter  <dick@ximian.com>
3286
3287         * threads.c (mono_thread_manage): Make sure the main thread has
3288         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
3289
3290 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
3291
3292         * loader.c (mono_loader_set_error_type_load): Log a warning to the
3293         console about the missing type.
3294         (mono_loader_set_error_method_load): Ditto.
3295
3296 2005-11-09  Miguel de Icaza  <miguel@novell.com>
3297
3298         * mono-config.c (mono_get_config_dir): Set the system defaults if
3299         none is specified.
3300
3301         * assembly.c (mono_set_dirs): New API entry point to set the
3302         assembly and the config directory in one call
3303
3304 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
3305
3306         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
3307         the ftnptr was created from a delegate in a domain other than the
3308         current domain. Fixes #75377.
3309
3310         * exception.h exception.c: Add mono_get_exception_not_supported ().
3311
3312 2005-11-08  Martin Baulig  <martin@ximian.com>
3313
3314         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
3315
3316 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
3317
3318         * security-manager.h: Added definitions to deal with strongname key 
3319         pairs bigger (and smaller) than 1024 bits.
3320         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
3321         adjust wrt the public key length being used.
3322
3323 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
3324
3325         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
3326           Windows build (r51396-51397).
3327
3328 2005-11-03  Martin Baulig  <martin@ximian.com>
3329
3330         * class.c (mono_class_setup_vtable_general): Also add generic
3331         methods to the vtable; fixes #76581.
3332
3333 2005-11-01  Miguel de Icaza  <miguel@novell.com>
3334
3335         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
3336         sure that we lookup GetString method from the System.Text.Encoding
3337         class, not the derived class or we get an empty method.
3338
3339         Fixed class #76612.
3340
3341 2005-10-25  Miguel de Icaza  <miguel@novell.com>
3342
3343         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
3344         if it has been previously set (embedders). 
3345
3346         Make mono_set_rootdir available also on Unix.
3347
3348 005-10-24  Robert Jordan  <robertj@gmx.net>
3349
3350         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
3351
3352 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
3353
3354         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
3355         only calls which are made to native code use this flag.
3356
3357         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
3358
3359 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
3360
3361         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
3362         Add support for FieldBuilders.
3363
3364 2005-10-29  Martin Baulig  <martin@ximian.com>
3365
3366         * mono-debug.c
3367         (mono_debug_using_mono_debugger): New public method; returns
3368         whether we're running inside the debugger.
3369
3370 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
3371
3372         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
3373         for Method/Constructor/FieldBuilders.
3374
3375 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
3376
3377         * reflection.c (module_add_cattrs): Save custom attributes for global methods
3378         and fields as well.
3379
3380 2005-10-26  Martin Baulig  <martin@ximian.com>
3381
3382         * mono-debug-debugger.c
3383         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
3384
3385 2005-10-24  Raja R Harinath  <harinath@gmail.com>
3386
3387         * icall.c (base64_to_byte_array): Don't pass an out-of-range
3388         integer to isspace.
3389
3390 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
3391
3392         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
3393         when passing valuetypes byref. Fixes #76502.
3394
3395 2005-10-19  Jackson Harper  <jackson@ximian.com>
3396
3397         * profiler.c: Don't put a . in front of types that are not in a
3398         namespace.
3399
3400 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
3401
3402         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
3403
3404 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
3405
3406         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
3407         #76436.
3408         (mono_marshal_get_ldflda_wrapper): Fix a warning.
3409
3410 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3411
3412         * assembly.c metadata-internals.h icall.c: Define an additional
3413         parameter for mono_assembly_name_parse_full, so we can avoid creating
3414         S.R.AssemblyName.Version when no version info wasn't passed.
3415         
3416 2005-10-09  Miguel de Icaza  <miguel@novell.com>
3417
3418         * class.c (mono_type_get_full_name): Reimplement method that was
3419         removed. 
3420
3421         * image.c: Some docs
3422
3423 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
3424
3425         * profiler.c (output_newobj_profile): Fix printing of Total memory
3426         on x86.
3427
3428 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
3429
3430         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
3431
3432 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
3433
3434         * threads.c: remove debug output.
3435
3436 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
3437
3438         * threads.c (mono_thread_manage): Fix crashes if more than 64
3439         threads need to be aborted. Hopefully fixes #75899.
3440
3441         * assembly.c (mono_stringify_assembly_name): New helper function.
3442
3443         * class.c: Use mono_stringify_assembly_name instead of the similar
3444         static function.
3445
3446         * assembly.h assembly.c: Add support for calling a postload search 
3447         hook if an assembly cannot be loaded.
3448
3449         * appdomain.c: Register new search hooks which call the AssemblyResolve
3450         events in AppDomain. Fixes #75231
3451
3452 2005-10-07  Martin Baulig  <martin@ximian.com>
3453
3454         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
3455         methods without debug info.
3456
3457 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
3458
3459         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3460         wrappers.
3461
3462 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3463
3464         * file-io.c: now that we return symlinks, use lstat and, when the file
3465         is a symbolic link, stat, to get the file attributes. Also avoid the
3466         conversion to/from utf16/external.
3467
3468 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
3469
3470         * class.c (mono_class_layout_fields): Compute klass->has_references
3471         correctly if an embedded valuetype is not yet initialized. Fixes
3472         #76331.
3473
3474 2005-10-04  Martin Baulig  <martin@ximian.com>
3475
3476         * metadata.c
3477         (mono_metadata_load_generic_param_constraints): New public
3478         function; splitted the constraints loading out from
3479         mono_metadata_load_generic_params().
3480
3481         * class.c (mono_class_create_from_typedef): Call
3482         mono_metadata_load_generic_param_constraints() after setting up
3483         the type and creating our parent; fixes #75329.
3484
3485 2005-10-04  Martin Baulig  <martin@ximian.com>
3486
3487         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3488         non-dynamic parent classes.
3489
3490 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
3491
3492         * file-io.c : win32 build fix (ETXTBSY seems not found).
3493
3494 2005-10-04  Martin Baulig  <martin@ximian.com>
3495
3496         * reflection.c
3497         (mono_image_get_methodspec_token): Make the cache actually work;
3498         fixes #75974.
3499
3500 2005-10-04  Martin Baulig  <martin@ximian.com>
3501
3502         * class.c (mono_class_name_from_token): Removed the unneccessary
3503         `MonoGenericContext *' argument.
3504
3505 2005-10-04  Martin Baulig  <martin@ximian.com>
3506
3507         * loader.c
3508         (method_from_methodspec): Make the caching work again; fixes the
3509         performance regression from #76262.
3510
3511 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3512
3513         * file-io.c:
3514         * file-io.h:
3515         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3516         GetFileSystemEntries that performs the same work but without going
3517         into io-layer, locking, etc.
3518
3519 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
3520
3521         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
3522         ThreadState_Stopped as well. Fixes #76047.
3523
3524 2005-09-29  Martin Baulig  <martin@ximian.com>
3525
3526         * class.c
3527         (inflate_generic_context): If the new context has a `gmethod', set
3528         its `container' that that gmethod's `container'.
3529
3530         * metadata.c
3531         (mono_metadata_parse_generic_param): Simplify things;
3532         `generic_container = generic_context->container;' is just fine.
3533
3534         * loader.c (method_from_methodspec): Code cleanups.
3535
3536 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
3537
3538         * decimal.c: fix warning (and let gcc generate correct
3539         code on ARM with optimizations).
3540
3541 2005-09-28  Martin Baulig  <martin@ximian.com>
3542
3543         * loader.c
3544         (method_from_memberref): Added `MonoGenericContext *class_context'
3545         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
3546         (method_from_methodspec): If we're a memberref, use the enclosing
3547         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
3548
3549 2005-09-28  Martin Baulig  <martin@ximian.com>
3550
3551         * object.c (mono_runtime_invoke_array): Added support for
3552         MONO_TYPE_GENERICINST; fixes #75917.
3553
3554 2005-09-27  Martin Baulig  <martin@ximian.com>
3555
3556         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
3557         `k->byval_arg.type' to determine the actual type.
3558
3559         * loader.c (method_from_methodspec): Removed some hacks.
3560
3561 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
3562
3563         * class-internals.h (mono_field_is_deleted): Do the test for
3564         rtspecialname before we check the actual name of the field. This
3565         prevents us from dereferencing a pointer into the string table,
3566         saving us from accessing a few pages
3567
3568         * *.c: Replace the use of {Enter,Leave}CriticalSection with
3569         macros. This will allow a deadlock debugger to easily be plugged
3570         in.
3571
3572 2005-09-27  Martin Baulig  <martin@ximian.com>
3573
3574         * loader.c (method_from_methodspec): Create a "signature"
3575         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
3576
3577 2005-09-27  Martin Baulig  <martin@ximian.com>
3578
3579         * class.c
3580         (inflate_generic_class): Correctly set the new context's
3581         container.
3582
3583         * loader.c
3584         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
3585         instead of a `MonoGenericContext *'.
3586         (mono_method_signature_full): Take a `MonoGenericContainer *'
3587         instead of a `MonoGenericContext *'.
3588
3589         * metadata.c
3590         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
3591         instead of a `MonoGenericContext *'.
3592         (mono_metadata_parse_method_signature_full): Likewise.
3593
3594 2005-09-26  Martin Baulig  <martin@ximian.com>
3595
3596         * class.c
3597         (mono_class_from_generic_parameter): Set `klass->generic_container'
3598         (mono_class_from_generic_parameter): Likewise.
3599         (mono_bounded_array_class_get): We inherit the generic container
3600         from the element class.
3601
3602         * loader.c
3603         (find_method, find_method_in_class): Take a `MonoGenericContext *'
3604         argument rather than computing it here.
3605         (method_from_memberref): Correctly set the generic context before
3606         parsing the signature.  Fixes #75681.
3607
3608 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
3609
3610         * object.c (mono_class_has_special_static_fields): Fix warnings.
3611
3612 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3613
3614         * assembly.c: Add parse_public_key function, to
3615         par the public keys. Also added mono_assembly_name_parse_full,
3616         to define it the parsed key should be freed or not.
3617         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
3618         to parse a long format assembly name.
3619         * metadata-internals.h: Keep mono_assembly_name_parse_full as
3620         private, since calling it to preserve the key requires
3621         freeing it manually.
3622         
3623 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
3624
3625         * locales.c : removed HAVE_ICU part.
3626
3627 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3628
3629         * object.c (mono_class_create_runtime_vtable): Avoid calling 
3630         field_is_special_static if the klass has no special static fields.
3631
3632         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
3633         (MonoCachedClassInfo): Likewise.
3634
3635         * object.c (mono_class_has_special_static_fields): New helper function.
3636
3637 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3638
3639         * class.c (mono_class_create_from_typedef): Don't call 
3640         interfaces_from_typedef_full for enums.
3641         (mono_class_create_from_typedef): Compute the base types of enums directly
3642         without calling mono_class_setup_fields ().
3643         (mono_class_find_enum_basetype): New helper function.
3644
3645         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
3646         one place inside the string heap.
3647         
3648 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
3649
3650         * class.c: locking fixes, code cleanups, some docs added.
3651         Allocate some data structures in the image mempool.
3652
3653 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3654
3655         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3656         the example code.
3657         
3658 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
3659
3660         * class-internals.h, class.c, reflection.c: reduce memory taken by
3661         MonoClass.
3662
3663 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
3664
3665         * metadata.c, metadata.h, loader.h: documentation updates, code and
3666         API cleanups.
3667
3668 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3669
3670         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
3671         the example code.
3672
3673         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
3674         page faults caused by the runtime while reading metadata.
3675
3676 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3677
3678         * socket-io.c: the field names were changed 3 months ago and no one
3679         realized until bug #76077 got filed!
3680
3681 2005-09-20  Martin Baulig  <martin@ximian.com>
3682
3683         * icall.c (assembly_icalls): Removed some unused debugger icalls.
3684
3685 2005-09-20  Martin Baulig  <martin@ximian.com>
3686
3687         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
3688         write the rank into the class entry.
3689
3690 2005-09-20  Martin Baulig  <martin@ximian.com>
3691
3692         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
3693
3694 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
3695
3696         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3697
3698         * icall.c (custom_attrs_defined_internal): New icall.
3699
3700         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
3701         function.
3702         (mono_custom_attrs_construct_by_type): New helper function.
3703
3704 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
3705
3706         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
3707         terminate the resulting string. Fixes #76123.
3708
3709 2005-09-16  Martin Baulig  <martin@ximian.com>
3710
3711         * mono-debug.c
3712         (mono_debug_add_method): Ignore inflated methods for the moment.
3713
3714 2005-09-14  Martin Baulig  <martin@ximian.com>
3715
3716         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
3717
3718 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
3719
3720         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
3721         return a success/failure indication.
3722         (mono_metadata_interfaces_from_typedef_full): Ditto.
3723         (get_constraints): Ditto.
3724
3725 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
3726
3727         * marshal.c (emit_marshal_array): Fix handling of null arrays.
3728         
3729         * marshal.c (emit_marshal_array): Add support for returning string
3730         arrays from delegates. Fixes #76063.
3731
3732         * marshal.c: Use the emit_ldloc/stloc macros where possible.
3733
3734 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
3735
3736         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
3737         icall.
3738
3739 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
3740
3741         * reflection.c icall.c: Fix after mono_get_exception_type_load
3742         signature change.
3743
3744         * assembly.c (mono_assembly_get_assemblyref): New helper function.
3745         (mono_assembly_load_reference): Use the new helper.
3746
3747         * class-internals.h (MonoLoaderError): New structure containing 
3748         information about type loading errors.
3749
3750         * class-internals.h loader.c: Add APIs to store per-thread loader
3751         error information.
3752
3753         * loader.c class.c: Set the loader error if needed.
3754
3755         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
3756
3757 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
3758
3759         * decimal.c: fixed to handle the broken ARM fp format.
3760
3761 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
3762
3763         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
3764         broken.
3765
3766 2005-09-06  Martin Baulig  <martin@ximian.com>
3767
3768         * domain.c (supported_runtimes): Added v2.0.50727.
3769
3770 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
3771
3772         * culture-info.h: reduce the size of some structures.
3773
3774 2005-09-05  Martin Baulig  <martin@ximian.com>
3775
3776         Reflect latest API changes in the August CTP.
3777
3778         * icall.c
3779         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
3780         ("MonoType.HasGenericArguments"): Removed.
3781         ("MonoMethod.BindGenericParameters"): Renamed to
3782         "MakeGenericMethod".
3783         ("MethodBuilder.BindGenericParameters"): Renamed to
3784         "MakeGenericMethod".    
3785
3786 2005-09-05  Martin Baulig  <martin@ximian.com>
3787
3788         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
3789
3790 2005-09-05  Martin Baulig  <martin@ximian.com>
3791
3792         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3793
3794         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
3795         generic_container is non-NULL.
3796
3797 2005-09-05  Martin Baulig  <martin@ximian.com>
3798
3799         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3800
3801         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
3802
3803 2005-08-29  Michal Moskal  <malekith@nemerle.org>
3804
3805         * reflection.c (encode_locals,
3806         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
3807         for large generic types.
3808
3809 2005-09-05  Martin Baulig  <martin@ximian.com>
3810
3811         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3812
3813         * class.c (mono_dup_array_type): New public method.
3814         (mono_metadata_signature_deep_dup): New public method.
3815         (dup_type): Correctly duplicate array and function types.
3816
3817 2005-09-05  Martin Baulig  <martin@ximian.com>
3818
3819         Applying a patch from Michal Moskal <malekith@nemerle.org>.
3820
3821         * reflection.c (get_default_param_value_blobs): Handle generic types
3822         and generic methods.
3823
3824 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
3825
3826         * class.c: Fixed error reporting (method/class were inversed) for 
3827         inheritance demands.
3828         * security-manager.c|h: Added the AppDomain when calling the managed
3829         System.Security.SecurityManager.InheritanceDemand method.
3830
3831 2005-09-01  Raja R Harinath  <rharinath@novell.com>
3832
3833         * reflection.c (encode_marshal_blob): 'marshaltype' and
3834         'marshaltyperef' are alternate sources for the custom marshaler
3835         name.
3836
3837 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
3838
3839         * class.c: fix creation of array classes with rank == 1
3840         (patch by Ankit Jain <jankit@novell.com>).
3841
3842 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
3843
3844         * object.c: fix check for creating the bound data for arrays vs
3845         szarrays.
3846
3847 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3848
3849         * object.c: configuration file name is now based on the executable name,
3850         not the image name. Fixes bug #75931.
3851
3852 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
3853
3854         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
3855         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
3856
3857 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
3858
3859         * rand.c: Use wincrypt.h instead of WinCrypt.h.
3860
3861 2005-08-24  Ankit Jain  <jankit@novell.com>
3862             Raja R Harinath  <rharinath@novell.com>
3863
3864         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
3865           called by it recursively.
3866           (mono_class_init): Remove special case in pending_init handling, since it's
3867           superseded by the fix to mono_class_from_typeref.
3868
3869 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3870
3871         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
3872         BROKEN_THREAD_START stuff.
3873
3874 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
3875
3876         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
3877         trampoline.
3878
3879         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
3880         
3881         * object.c (mono_delegate_ctor): Replace the original function address with
3882         a delegate trampoline.
3883
3884 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
3885
3886         * icall.c: add boolean argument to base64_to_byte_array and 
3887         InternalFromBase64String to control whether a whitespace-only string
3888         is allowed (or should casue a FormatException to be thrown). We need
3889         this as the behavior has changed between MS.NET 1.x and 2.0, and we
3890         to match the MS behaviour in both profiles.
3891         * appdomain.c: Bump corlib version.
3892
3893 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3894
3895         This patch implements a big portion of publisher policy
3896         support, used to bind assembly versions and redirect
3897         one assembly from version A to version B.
3898
3899         * assembly.c:
3900         New GSList loaded_assembly_bindings, for storing the cached
3901         assembly bindings.
3902         (assembly_binding_maps_name): New static function for checking if a 
3903         assembly binding information maps an assembly name.
3904         (mono_assembly_binding_info_free): New function for freeing
3905         assembly binding information resources.
3906         (get_publisher_policy_info): New static function for retrieving 
3907         assembly binding information from a MonoImage.
3908         (compare_versions): New static function for comparing an assembly
3909         binding information data and the version of an assembly name.
3910         (check_policy_versions): New static function for checking if an
3911         assembly binding info mapping an assembly name is valid for it.
3912         (mono_assembly_load_publisher_policy): New static function for
3913         loading the 'policy.major.minor.MyAssembly' image for an assembly
3914         with an assembly name 'aname'.
3915         (mono_assembly_bind_version): New static function for updating
3916         assembly redirection.
3917         (mono_assembly_apply_binding): New static function for applying
3918         assembly binding.
3919         (search_binding_loaded): New static function for searching 
3920         loaded assembly binding infos in the cache domain.
3921         (mono_assembly_load_full): Don't apply assembly binding for
3922         reflection only assemblies.
3923
3924         * metadata-internals.h: Add MonoAssemblyBindingInfo,
3925         which contains information about assembly binding. Also
3926         declare signature for mono_config_parse_publisher_policy ()
3927         function, used to retrieve pub policy info.
3928         
3929         * mono-config.c:
3930         (publisher_policy_start): New static function used to parse publisher 
3931         policy config files.
3932         (publisher_policy_parser): New static MonoParseHandler containing 
3933         the functions used when parsing config files.
3934         (mono_config_parse_publisher_policy): New function for parsing
3935         publisher policy files.
3936         
3937 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
3938
3939         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
3940
3941         * marshal.c (mono_delegate_free_ftnptr): Ditto.
3942
3943         * object.c (mono_get_addr_from_ftnptr): New helper function.
3944
3945         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
3946
3947         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3948
3949 2005-08-19  Dick Porter  <dick@ximian.com>
3950
3951         * threads.c, threads.h, appdomain.c, appdomain.h,
3952         profiler-private.h, monitor.c, object.c, object-internals.h,
3953         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
3954         store the thread ID, so it can hold a 64 bit value if needed.
3955
3956 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
3957
3958         * reflection.c (mono_reflection_create_dynamic_method): Store the
3959         handle class into the method references as well so ldtoken works in
3960         dynamic methods.
3961
3962         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
3963         types.
3964
3965 2005-08-19  Ankit Jain <jankit@novell.com>
3966
3967         Fix #75847.
3968         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
3969           here rather than using the method signature of a arbitrary function
3970           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
3971           two arguments.
3972           Hack done with Harinath.
3973
3974 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3975
3976         * threadpool.c: disable printing stack traces when we get a exception
3977         in a threadpool thread. I need to do more testing to figure out which
3978         cases actually print this. Fixes bug #75828.
3979
3980 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3981
3982         * icall.c: there might be ignored whitespace after the last '='. This
3983         fixes length computation and bug #75840.
3984
3985 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
3986
3987         * assembly.c (mono_assembly_load_full): Consider .exe extension as
3988         well. Fixes #75809.
3989
3990         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
3991         #75784.
3992         
3993         * reflection.c (create_custom_attr_data): Ditto.
3994
3995 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
3996
3997         * locales.c, culture-info.h : removed RegionLCIDMap.
3998         * culture-info-tables.h : regenerated.
3999
4000 2005-08-16  Martin Baulig  <martin@ximian.com>
4001
4002         * class.c (mono_type_get_name_recurse): Small fix.
4003
4004 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
4005
4006         * locales.c : indentation fixie.
4007
4008 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
4009
4010         * object-internals.h,
4011           locales.h,
4012           locales.c,
4013           culture-info.h,
4014           icall.c : added RegionInfo table support.
4015         * culture-info-table.h : regenerated for region support.
4016
4017 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
4018
4019         * reflection.c (resolve_object): handle all kinds of MonoMethod
4020         including generic ones
4021
4022 2005-08-12  Ankit Jain <jankit@novell.com>
4023
4024         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
4025           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
4026
4027 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
4028
4029         * process.c: Don't close a thread handle when it's NULL. This is a
4030         workaround for bug #75733.
4031
4032 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
4033
4034         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
4035
4036 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
4037
4038         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
4039
4040 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4041
4042         * threadpool.c: if a work item in the thread pool has a callback that
4043         catches a exception, don't propagate it after invoking the callback.
4044         Fixes bug #75336.
4045
4046 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
4047
4048         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
4049
4050         * class-internals.h (MonoCachedClassInfo): Add some new fields.
4051
4052         * class.c (mono_class_init): Load field info lazily in the AOT case.    
4053
4054         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
4055
4056 2005-08-03  Ankit Jain  <jankit@novell.com>
4057
4058         Fix #75683.
4059         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
4060           PInvoke calling convention is 0.
4061
4062 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
4063
4064         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
4065         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
4066
4067 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
4068
4069         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
4070         to handle threads not started by the GC (patch by Michael Meeks
4071         <michael.meeks@novell.com>).
4072
4073 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
4074
4075         * reflection.c: Make buffer used in emitting types larger for some
4076         big generic types (patch by Michal Moskal).
4077
4078 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
4079
4080         * mono-debug.c: Fix some (not all) alignment problems.
4081
4082 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4083
4084         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
4085         Invoke mono_image_load_from_data_full passing the refonly
4086         parameter.
4087
4088         * assembly.c
4089         (mono_assembly_open_from_bundle): Add the refonly argument, 
4090         in order to pass it to other methods it calls to.
4091         (do_mono_assembly_open): Add the refonly argument, in order 
4092         to pass it to other methods it calls to.
4093         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
4094         the refonly parameter to it.
4095
4096         * image.c: Add loaded_images_refonly_hash and
4097         loaded_images_refonly_guid_hash to cache the reflection
4098         only loaded images.
4099         (mono_images_init): Initialize the hash tables used for
4100         caching the reflection only images.
4101         (load_modules): Invoke mono_image_open_full passing the refonly
4102         parameter to load the modules the correct way.
4103         (build_guid_table): Add the refonly argument, to re-build the 
4104         correct hash table.
4105         (do_mono_image_open): Added the refonly argument, in order to
4106         define it for the loaded image.
4107         (mono_image_loaded_full): New function, which receives an
4108         additional parameter to look for the image in the refonly or
4109         non-refonly section.
4110         (mono_image_loaded): Updated, using mono_image_loaded_full.
4111         (mono_image_loaded_by_guid_full): The same case that happens
4112         with mono_image_loaded_full.
4113         (mono_image_loaded_by_guid): Likewise.
4114         (register_image): Use the ref_only variable inside MonoImage
4115         to decide in which hash table store the current image.
4116         (mono_image_open_from_data_full): Rename
4117         mono_image_open_from_data to mono_image_open_from_data_full,
4118         adding the refonly argument, to define the ref_only variable 
4119         inside MonoImage.
4120         (mono_image_open_from_data): Return 
4121         mono_image_open_from_data_full.
4122         (mono_image_open_full): Rename mono_image_open to
4123         mono_image_open_full, receiving the new refonly argument,
4124         to pass it to inner methods.
4125         (mono_pe_file_open): Update this function, to open
4126         a MonoImage as a non-refonly image.
4127         (mono_image_close): Use the refonly variable inside
4128         MonoImage to remove the image from the correct caches.
4129
4130         * image.h: Add the signatures of mono_image_open_full,
4131         mono_image_open_from_data_full, mono_image_loaded_full,
4132         mono_image_loaded_by_guid_full.
4133
4134         * metadata-internals.h: Add the ref_only field to 
4135         MonoImage.
4136         
4137 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4138
4139         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
4140         Fix the last behavior, which used to load the assemblies and
4141         extract MonoReflectionAssemblyName information, instead of
4142         extract it from the metadata tables. Needed for Reflection
4143         Only assemblies.
4144         
4145 2005-07-29  Martin Baulig  <martin@ximian.com>
4146
4147         * mono-debug-debugger.c
4148         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
4149         not initialized.
4150
4151         * mono-debug.c
4152         (mono_debug_address_from_il_offset): Check whether we have
4153         debugging support before attempting to take the lock.
4154         (mono_debug_source_location_from_address): Likewise.
4155         (mono_debug_source_location_from_il_offset): Likewise.
4156         (mono_debug_il_offset_from_address): Likewise.
4157         (mono_debug_address_from_il_offset): Likewise.
4158
4159 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
4160
4161         * class.c (mono_class_from_name_case): Add support for dynamic images.
4162         Fixes #75650.
4163
4164         * object.c (mono_class_compute_gc_descriptor): Add a workaround
4165         for #75479.
4166
4167 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
4168         
4169         * reflection.c (mono_method_get_object): Fix warning.
4170
4171 2005-07-28  Martin Baulig  <martin@ximian.com>
4172
4173         * mono-debug.c
4174         (mono_debug_add_wrapper): Also write the wrapper type.
4175
4176 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
4177
4178         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
4179         
4180         * class.c (mono_class_init): Avoid reading nested classes if the AOT
4181         data indicates the class has none.
4182
4183 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
4184
4185         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
4186         loader lock with the debugger lock. Prevents deadlocks for beagle.
4187
4188         Beagle can now run on an smp box for a weekend without any
4189         issues. Woohoo!
4190
4191 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
4192
4193         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
4194         in a module. Fixes #75629.
4195
4196 2005-07-26  Martin Baulig  <martin@ximian.com>
4197
4198         * mono-debug.c (mono_debug_add_wrapper): New static method.
4199         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
4200         interncall or a wrapper.
4201
4202         * mono-debug.h (MonoDebugWrapperData): New public typedef.
4203         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
4204         (MONO_DEBUGGER_VERSION): Bump to 51.
4205
4206         * mono-debug-debugger.c
4207         (mono_debugger_add_type): Removed this empty function.
4208         (mono_debugger_add_method): Likewise.
4209
4210 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
4211
4212         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
4213         before accessing method->slot.
4214
4215 2005-07-21  Jb Evain  <jbevain@gmail.com>
4216
4217         * reflection.c (method_encode_clauses/class): Handle filters clauses.
4218         Fixes #75010.
4219
4220 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
4221
4222         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
4223         #75587.
4224
4225 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
4226
4227         * image.h image.c: Add mono_image_get_guid () API function.
4228
4229 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
4230
4231         There were issues when multiple threads tried to load
4232         assemblies. A deadlock was created between assemblies_mutex and
4233         mono_domain_assemblies_lock. This fixes the issue by making the
4234         assembly ref counting be lock free. See bug 75586.
4235         
4236         * image.c (mono_image_close): The add ref function here was using
4237         Interlocked operations while the unref was using a mutex and a
4238         --. I don't think this was ever a bug that would be exposed in a
4239         non-pendantic way (ie, by an embedder doing a ref on one thread
4240         and an unref on another), but for the sake of correctness, this is
4241         now Interlocked.
4242
4243         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
4244         (mono_assembly_load_reference): Call mono_assembly_addref rather
4245         than touching the refcount ourselves.
4246         (mono_assembly_close): Use InterlockedDecrement to unref the
4247         assembly. Don't acquire the lock unless it is actually needed.
4248
4249 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
4250
4251         * class.c (mono_class_layout_fields): Fix calculation of has_references
4252         for generic types.
4253
4254 2005-07-12  Martin Baulig  <martin@ximian.com>
4255
4256         Applying a patch from Michal Moskal <malekith@nemerle.org>.
4257
4258         * metadata.c
4259         (mono_type_hash): Provide better hashing for generic instances.
4260         (mono_generic_inst_hash): Improve hashing.
4261         (mono_generic_class_hash): Likewise.
4262
4263         * reflection.c (mymono_metadata_type_hash): Improve hashing for
4264         generic instances.
4265
4266 2005-07-12  Martin Baulig  <martin@ximian.com>
4267
4268         * reflection.c (mono_reflection_create_runtime_class): Remove the
4269         hack for generic type definitions and non-`Run' assemblies.
4270         (mono_reflection_bind_generic_parameters): Also use
4271         `klass->wastypebuilder' to check for TypeBuilders.
4272
4273 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
4274
4275         * class.c (mono_class_layout_fields): Fix calculation of has_references
4276         for generic types.
4277
4278         * class.c (inflate_generic_class): Fix a leak.
4279         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
4280         for generic types.
4281
4282 2005-07-11  Martin Baulig  <martin@ximian.com>
4283
4284         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
4285         on error.
4286
4287 2005-07-11  Martin Baulig  <martin@ximian.com>
4288
4289         * loader.c (find_method): Also lookup in
4290         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
4291
4292 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
4293
4294         * appdomain.c (mono_domain_unload): Don't free the error message
4295         before passing it to mono_get_exception_...
4296
4297         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
4298         
4299 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
4300
4301         * threads.c: try to better guess an available RT signal (bug #75387).
4302
4303 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
4304
4305         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
4306         and CACHE_OBJECT.
4307
4308 2005-07-07  Martin Baulig  <martin@ximian.com>
4309
4310         * class.c (mono_type_get_name_full): Return NULL for
4311         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
4312         fixes #75408.
4313
4314 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
4315
4316         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
4317         exit the appdomain as well being aborted.
4318
4319         * threadpool.c: Create all threadpool threads inside the root appdomain, and
4320         change back to the root domain after calling managed code. This enables
4321         appdomains using threadpools to be unloaded.
4322
4323 2005-07-07  Martin Baulig  <martin@ximian.com>
4324
4325         * class-internals.h
4326         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
4327         into `MonoDynamicGenericClass' since we only need it for dynamic
4328         types.
4329
4330         * reflection.c (mono_class_bind_generic_parameters): We don't need
4331         to compute the `parent' here.
4332
4333 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
4334
4335         * culture-info-table.h : regenerated.
4336
4337 2005-07-06  Martin Baulig  <martin@ximian.com>
4338
4339         * icall.c
4340         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
4341
4342         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
4343
4344 2005-07-06  Martin Baulig  <martin@ximian.com>
4345
4346         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
4347         we're doing a signature-only comparision; fixes #74945.
4348
4349 2005-07-06  Martin Baulig  <martin@ximian.com>
4350
4351         * class-internals.h (MonoGenericClass): Moved some things out into
4352         a new `MonoInflatedGenericClass' type.  
4353         (MonoInflatedGenericClass): New type; the `klass' of a
4354         `MonoGenericClass' is now computed lazyly in
4355         mono_get_inflated_generic_class().      
4356
4357         * class.c (mono_get_inflated_generic_class): New public function.
4358         (mono_class_inflate_generic_method): Removed the unused
4359         `MonoClass *' argument.
4360         (setup_generic_vtable): Don't call mono_get_inflated_method() on
4361         all the methods.
4362         (mono_class_create_generic): Make this static and merge it with
4363         mono_class_create_generic_2(); we're now called automatically from
4364         mono_get_inflated_generic_class().
4365
4366         * loader.c (mono_method_signature): Call
4367         mono_get_inflated_method() here.
4368
4369 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
4370
4371         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
4372         type of fields with RVA.
4373
4374         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
4375         for this pseudo class.
4376         (my_mono_class_from_generic_parameter): Likewise.
4377         (mono_class_init): Allow interfaces to have cctors.
4378
4379 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
4380
4381         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
4382         lazily for AOT methods.
4383
4384 2005-07-05  Martin Baulig  <martin@ximian.com>
4385
4386         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
4387         returns FALSE for a successful match, not TRUE.
4388
4389 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
4390
4391         * loader.c (mono_method_get_index): Optimize this a bit.
4392
4393 2005-07-04  Martin Baulig  <martin@ximian.com>
4394
4395         * class.c
4396         (class_compute_field_layout): Move the check for generic type
4397         definitions into mono_class_layout_fields().  Fixes #74684.
4398         (mono_class_from_generic_parameter): Correctly compute
4399         `klass->parent'; fixes #75457.
4400
4401         * reflection.c (register_assembly, register_module): Make sure
4402         `domain->rejobject_hash' is already created.
4403
4404 2005-07-02  Martin Baulig  <martin@ximian.com>
4405
4406         * class-internals.h
4407         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
4408         `MonoDynamicGenericClass'.      
4409
4410 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
4411
4412         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
4413         returned by a field getter is null, since null is a valid value.
4414
4415 2005-07-01  Martin Baulig  <martin@ximian.com>
4416
4417         * reflection.c (mono_reflection_generic_class_initialize): Update
4418         the `dgclass->fields [i].parent' to the correct class.
4419         (mono_image_get_fieldref_token): Use the declaring type, not the
4420         reflected type.
4421
4422 2005-07-01  Martin Baulig  <martin@ximian.com>
4423
4424         * loader.c (find_method): Also look in the interfaces; fixes #75429.
4425
4426 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
4427
4428         * threads.c (thread_cleanup): assert that thread != NULL
4429         (wait_for_tids_or_state_change): We were using the wrong variable
4430         when accessing wait->threads. `i' was always out of the bounds of
4431         the array.
4432
4433 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4434
4435         * loader.c: map user32 and kernel32 to libMonoSupportW
4436
4437 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
4438
4439         * appdomain.c (unload_thread_main): Mark this as WINAPI.
4440
4441 2005-06-28  Martin Baulig  <martin@ximian.com>
4442
4443         * loader.c (method_from_methodspec): Fix #75334.
4444
4445 2005-06-28  Martin Baulig  <martin@ximian.com>
4446
4447         Fix #74953 - Arrays now implement the generic IList<T> interface
4448         on the 2.0 platform.
4449
4450         * class-internals.h (MonoDefaults): Added `generic_array_class'.
4451
4452         * reflection.c (mono_class_bind_generic_parameters): New public
4453         function; similar to mono_reflection_bind_generic_parameters(),
4454         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
4455
4456         * domain.c (mono_init_internal): Try to initialize.
4457         `mono_defaults.generic_array_class' here; this'll only succeed if
4458         we're using the 2.0 corlib.
4459
4460         * icall.c
4461         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4462         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4463         (mono_lookup_internal_call): Added support for nested classes.
4464
4465         * loader.c
4466         (mono_get_method_from_token): Set `result->signature->pinvoke' if
4467         we're an interncall and have generic arguments.
4468
4469         * class.c
4470         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4471         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4472         instance of System.Array.InternalArray<T> for arrays, so they
4473         implement the generic IList<T> interface.
4474
4475 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
4476
4477         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4478         (chastamar@yahoo.com). Fixes #75374.    
4479
4480 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
4481
4482         * culture-info-table.h: regenerated.
4483
4484 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4485
4486         * icall.c: handle spaces correctly for base64 strings.
4487
4488 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
4489
4490         * *.c: Kill some warnings.
4491
4492 2005-06-23  Duncan Mak  <duncan@novell.com>
4493
4494         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4495         that this builds on Solaris 10 (x86).
4496
4497 2005-06-23  Martin Baulig  <martin@ximian.com>
4498
4499         * class.c
4500         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4501         generic type definitions.
4502
4503 2005-06-23  Martin Baulig  <martin@ximian.com>
4504
4505         Fix #75331.
4506
4507         * metadata.c (mono_class_get_overrides): Renamed to
4508         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4509         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4510         pass it to mono_get_method_full().
4511
4512 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
4513
4514         * reflection.c (mono_reflection_create_runtime_class): take the
4515         mono_domain_lock in this method. Prevents deadlocks
4516
4517 2005-06-22  Martin Baulig  <martin@ximian.com>
4518
4519         * loader.c (method_from_methodspec): Fix #75330.
4520
4521 2005-06-22  Martin Baulig  <martin@ximian.com>
4522
4523         * reflection.c (type_get_qualified_name): Use
4524         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
4525         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
4526         argument; use it if we don't have an assembly name.
4527
4528 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
4529
4530         * object.c: In mono_message_init, set "copy out" flag for in
4531         parameters with the [Out] flag.
4532
4533 2005-06-21  Martin Baulig  <martin@ximian.com>
4534
4535         * class.c
4536         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
4537         and MONO_TYPE_PTR.
4538
4539 2005-06-21  Martin Baulig  <martin@ximian.com>
4540
4541         * class.c (mono_class_init): Don't initialize `class->fields' for
4542         generic instances since they're initialized again in
4543         compute_field_layout(). 
4544         (compute_field_layout): Set the field's `generic_info' here; fix
4545         #75320. 
4546
4547 2005-06-21  Martin Baulig  <martin@ximian.com>
4548
4549         * class-internals.h
4550         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
4551
4552         * metadata.c (mono_metadata_generic_method_equal): Also
4553         distinguish the `generic_class'; fixes #75334.
4554
4555 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4556
4557         * domain.c:
4558         * appdomain.c:
4559         * domain-internals.h:
4560         * reflection.c: 'domain_assemblies' field is now protected by its own
4561         lock. Don't call into managed code to run the AssemblyLoad event if we
4562         now there are no registered delegates for it.
4563
4564 2005-06-20  Martin Baulig  <martin@ximian.com>
4565
4566         * class.c (mono_class_is_assignable_from): Use a custom version of
4567         mono_class_has_parent() to make things work for generic instances;
4568         fix #75300.
4569
4570 2005-06-20  Martin Baulig  <martin@ximian.com>
4571
4572         * loader.c (method_from_methodspec): Apply a patch from
4573         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
4574
4575 2005-06-20  Martin Baulig  <martin@ximian.com>
4576
4577         * class.c (mono_class_init): Reverted Zoltan's last change; it
4578         breaks generics.
4579
4580 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
4581
4582         * threads.c (wait_for_tids_or_state_change): Add missing locking.
4583
4584 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4585
4586         * socket-io.c: fix the index in the socket array for writable/error
4587         sockets. Fixes bug #75306.
4588
4589 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
4590
4591         * class.c (mono_class_init): Allow interfaces to have static ctors.
4592
4593 2005-06-17  Martin Baulig  <martin@ximian.com>
4594
4595         * loader.c (method_from_methodspec): Use `context->container' when
4596         parsing the `gmethod->inst'.
4597
4598 2005-06-17  Martin Baulig  <martin@ximian.com>
4599
4600         * class.c (mono_type_get_name_recurse): Don't add the assembly
4601         name for type arguments.
4602
4603 2005-06-15  Martin Baulig  <martin@ximian.com>
4604
4605         * reflection.c (mono_image_get_inflated_method_token): Encode
4606         correct klass; fixes #75260.
4607
4608 2005-06-13 Michal Moskal <malekith@nemerle.org>
4609
4610         * icall.c: Make GetCorrespondingMethod/Constructor take
4611         MonoReflectionMethod method not MonoMethod. Removed
4612         MonoType.GetCorrespondingField, and make
4613         MonoGenericType.GetCorrespondingField take name not
4614         MonoClassField.
4615
4616 2005-06-13  Michal Moskal <malekith@nemerle.org>
4617
4618         * reflection.c (field_encode_signature, encode_locals):
4619          Make sizes of buffers for types larger (for big generic types).
4620          (create_generic_typespec,
4621          mono_reflection_sighelper_get_signature_local,
4622          mono_reflection_sighelper_get_signature_field):
4623          Add asserts for too small buffers.
4624
4625 2005-06-15  Martin Baulig  <martin@ximian.com>
4626
4627         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
4628         if our parent is not a dynamic type.
4629
4630 2005-06-15  Martin Baulig  <martin@ximian.com>
4631
4632         * class-internals.h (MonoTypeNameFormat): New enum.
4633
4634         * class.c
4635         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
4636         (mono_type_get_full_name): Removed.
4637         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
4638         argument instead of the boolean's.
4639
4640         * icall.c (ves_icall_System_MonoType_getFullName):
4641         Added `gboolean assembly_qualified'.    
4642
4643         * reflection.h
4644         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
4645
4646         * reflection.c (mono_reflection_parse_type): Parse the new type
4647         name format.
4648
4649 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4650
4651         * icall.c: no need to convert from utf16 to utf8 and then back again
4652         after the call to GetLogicalDrives.
4653
4654 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4655
4656         * icall.c: frombase64. Fix problems exposed by new tests.
4657
4658 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4659
4660         * icall.c: added internal calls for converting char [] and strings in
4661         base64 into byte [].
4662
4663 2005-06-10  Martin Baulig  <martin@ximian.com>
4664
4665         * class.c (mono_class_create_generic_2): Read the nested classes
4666         from the metadata rather than from `gklass->nested_classes' since
4667         `gklass' might not be initialized yet.
4668
4669 2005-06-09  Duncan Mak  <duncan@novell.com>
4670
4671         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
4672         all public headers. Fixes #74919.
4673
4674 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
4675
4676         * domain.c: The key for proxy_vtable_hash is now a pointer
4677         array. Added new GHashFunc and GCompareFunc functions for this.
4678
4679         * class.h: The list of interfaces in MonoRemoteClass is known in
4680         advance and can't grow (we create a new MonoRemoteClass if needed),
4681         so now the interface array can be allocated together with
4682         MonoRemoteClass.
4683         
4684         * object.c: Added a new method create_remote_class_key.
4685         Fixed mono_remote_class so it does not depend on
4686         mono_upgrade_remote_class.
4687         Removed extend_interface_array.
4688         Added new method clone_remote_class(), which makes a copy of a remote
4689         class and adds a new interface or class to it.
4690         mono_upgrade_remote_class() now creates a new remote class (or gets
4691         it from the cache) if an vtable upgrade is needed. In this way
4692         we make sure that other objects sharing the same remote class
4693         don't get the new vtable with unwanted interfaces.
4694         
4695         * object-internals.h:
4696         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
4697         
4698         * marshal.c: Track changes in mono_upgrade_remote_class().
4699
4700 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
4701         * icall.c: Add runtime methods for obtaining members of inflated
4702         class, which were created from supplied non-inflated members. It
4703         is used in internal Get{Method,Constructor,Field} methods in
4704         System.Type
4705
4706 2005-06-09  Martin Baulig  <martin@ximian.com>
4707
4708         * reflection.c
4709         (mono_reflection_bind_generic_method_parameters): Fix #75169.
4710
4711 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4712         * reflection.c (mono_image_basic_init): Define
4713         Version in MonoDynamicAssembly. 
4714         
4715 2005-06-08  Martin Baulig  <martin@ximian.com>
4716
4717         Fix #75136.
4718
4719         * loader.c
4720         (mono_method_signature_full): New public method; takes a
4721         `MonoGenericContext *'.
4722         (find_method): Use mono_method_signature_full() and pass the
4723         klass'es context to it.
4724
4725         * class.c (mono_class_is_inflated_method): Use
4726         mono_method_signature_full() and pass the context to it.
4727
4728 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
4729
4730         * object.c: add proper locking in mono_remote_class_vtable(),
4731         fixes possible memory corruption.
4732
4733 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
4734
4735         * marshal.c (mono_remoting_marshal_init): set
4736         initialized after initialization.
4737
4738 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
4739
4740         * locales.c : hush.
4741
4742 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
4743
4744         * object.c (extend_interface_array): fix really silly
4745         memory corrupting / comparison bug.
4746
4747 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4748
4749         * reflection.c: Functions added to support the creation
4750         of CustomAttributeData, which includes Attribute data
4751         used by ReflectionOnly methods.
4752
4753         * reflection.h:  mono_reflection_get_custom_attrs_data and
4754          mono_custom_attrs_data_construct added (functions exposed).
4755
4756          * icall.c: Added mono_reflection_get_custom_attrs_data
4757          as icall.
4758         
4759 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
4760
4761         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
4762         lupus's request.
4763
4764 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
4765
4766         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
4767
4768         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
4769         dynamic DllImportAttribute.
4770
4771         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
4772         dynamic DllImportAttribute.
4773
4774         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
4775         Fixes #75162.
4776
4777 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4778
4779         * threads.c: avoid segfault when an unstarted thread is aborted.
4780
4781 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
4782
4783         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
4784         Returns the name and version of the runtime for reporting.
4785
4786 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4787
4788         * appdomain.c: bump corlib version.
4789         * object-internals.h: new field in MonoReflectionAssembly.
4790
4791 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4792
4793         * object-internals.h: Carlos forgot to add this field.
4794
4795 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4796
4797         * icall.c: Added create_version to create instances
4798         of Version of MonoReflectionAssemblyName. This change helps
4799         the AssemblyName tests to keep running fine.
4800         
4801 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
4802   
4803         * object.c (mono_method_return_message_restore): A somehow less
4804         intrusive fix for #75138.
4805
4806 2005-06-03  Raja R Harinath  <rharinath@novell.com>
4807
4808         * object.c (mono_method_return_message_restore): Fix computation
4809         of expected number of out args.
4810
4811 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4812
4813         * reflection.c (mono_image_get_method_info): Fix the case when the
4814         charset is empty.
4815
4816 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
4817
4818         * object.c: Added missing null check in
4819           mono_method_return_message_restore.
4820
4821 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
4822
4823         * reflection.c (mono_image_get_method_info): Handle the case when
4824         dllentry is empty.
4825
4826 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
4827
4828         * object.c: When creating the vtable for a proxy, take into account
4829         all inherited interfaces, not only the ones registered in
4830         iclass->interfaces. This fixs bug #74996.
4831         Also, in mono_method_return_message_restore, verify that the array
4832         of out args has the expected lengh.
4833
4834 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4835
4836         * socket-io.c: update the timeout in Poll when the call is interrupte.
4837
4838 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4839
4840         * socket-io.c: support abort/suspend in Select_internal after last
4841         change.
4842
4843 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4844
4845         * threadpool.c: remove warning.
4846
4847 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4848
4849         * icall.c:
4850         * socket-io.[ch]: Select_internal uses poll() now when available, thus
4851         removing the 1024 limit from select(). Runtime part of the fix for
4852         bug #71203.
4853
4854 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4855
4856         * socket-io.c: when resolving the addresses for the same
4857         host returned by gethostname(), get the local IPs from the interface
4858         list. Loopback addresses are discarded if the are interfaces up with
4859         non-loopback ones. Fixes bug #63265.
4860
4861 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
4862
4863         * appdomain.c, verify.c, object-internals.h, reflection.c:
4864         bumped corlib number to 36, and added new extra_flags field
4865         to ReflectionMethodBuilder and friends.  Fixes #75060.
4866
4867 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
4868
4869         * gc.c: register a new weak link only if the object is non-null
4870         (fixes bug#75047).
4871
4872 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4873
4874         * culture-info.h : short time pattern too.
4875
4876 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
4877
4878         * culture-info.h : expand long time pattern string length.
4879
4880 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4881
4882         * culture-info-table.h : update (more French date format; #72788).
4883
4884 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
4885
4886         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
4887         the method is static. Fixes #75029.
4888
4889 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
4890
4891         * reflection.c: Update the table_idx field of method builders after
4892         saving the module, since it can change. This is a workaround for
4893         bug #74914. 
4894
4895 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
4896
4897         * culture-info-table.h : update (additional French date format).
4898
4899 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
4900
4901         * icall.c (ves_icall_type_Equals): Revert last change.
4902         
4903         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
4904
4905         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
4906
4907 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
4908
4909         * class-internals.h: Added executioncontext_class field to 
4910         MonoDefaults structure.
4911         * domain.c: Cache System.Threading.ExecutionContext class in 
4912         mono_defaults.
4913         * object.c: Capture the ExecutionContext for asynchroneous calls in
4914          mono_async_result_new.
4915         * object-internals.h: Added execution_context and original_context 
4916         fields to MonoAsyncResult. Added execution_context to MonoThread.
4917         * security-manager.c|.h: Added mono_get_context_capture_method to 
4918         return the capture method (if required by the security manager or by
4919         the framework version used).
4920         * threadpool.c: Apply capture (if present) ExecutionContext in 
4921         mono_async_invoke and revert to original context after it completes.
4922
4923 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
4924
4925         * culture-info-table.h : updated (real hacky solution for zh-CHT).
4926
4927 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
4928
4929         * culture-info-table.h : zh-CHT related workaround.
4930
4931 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4932
4933         * marshal.c (emit_marshal_custom): Add some error checking and call the
4934         methods in the ICustomMarshaler interface. Fixes #74875.
4935         
4936         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
4937         native->managed wrappers.
4938
4939 2005-05-12  Martin Baulig  <martin@ximian.com>
4940
4941         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
4942         here and use the loader lock.
4943
4944         * mono-debug.c: Properly lock when the debugger is not attached.
4945         (mono_debug_init): Release the initial lock if we're not running
4946         in the debugger.
4947
4948 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
4949
4950         * marshal.c (emit_marshal_custom): Pass through NULL values without
4951         calling the custom marshalling routines.
4952
4953         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
4954         conversion in structures. Fixes #74882.
4955
4956 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
4957
4958         * culture-info-table.h : zh-* cultures were missing.
4959
4960 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
4961
4962         * threads.c: Added a new event background_change_event which is signaled
4963         when a thread changes its background mode.
4964         Moved here several checks previously done in managed code. The checks
4965         require the thread lock, and using the thread lock in managed code
4966         can result in deadlocks.
4967         Merged Start_internal and Thread_internal into a single method. Now 
4968         Thread_internal does all work of creating and starting a thread.
4969         Added icalls for setting and getting the state of the object. Moved from
4970         managed code to avoid locking there.
4971         Added wait_for_tids_or_state_change() which is called instad of
4972         wait_for_tids when waiting for non-backround threads to end. This method
4973         will return if one of the threads ends or the background_change_event
4974         is signaled.
4975         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
4976         the background mode. This method signals the background_change_event
4977         event.
4978         * icall.c:
4979         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
4980         removed Start_internal.
4981         
4982 2005-05-11  Martin Baulig  <martin@ximian.com>
4983
4984         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
4985         to order of some fields to get proper alignment on 64-bit machines.
4986
4987 2005-05-11  Martin Baulig  <martin@ximian.com>
4988
4989         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
4990         changes as they're broken and completely fuck up the debugger.
4991
4992         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
4993
4994 2005-05-10  Martin Baulig  <martin@ximian.com>
4995
4996         * reflection.c (mono_reflection_generic_class_initialize): Don't
4997         call mono_class_setup_parent() here.
4998
4999 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5000
5001         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
5002         send/receive timeout use an integer in milliseconds. We were using a
5003         struct timeval.
5004
5005 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5006
5007         * locales.c:
5008         (internal_get_cultures): reserve the first slot of the array for the
5009         InvariantCulture, which will be filled in managed code.
5010
5011 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
5012
5013         * reflection.c (mono_image_fill_module_table): Initialize the
5014         GENERATION field as well.
5015
5016 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5017
5018         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
5019         Monitor.Enter on the object.
5020
5021 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
5022
5023         * threads.c: Enable the wait for running threads when exiting.
5024         * icall.c: Suspend all threads before exiting.
5025
5026 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
5027
5028         * assembly.c (mono_assembly_load_reference): Fix warning.
5029
5030 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5031
5032         * threadpool.c: changed the default number of threads per cpu. From now
5033         on, the default will be 20 + (5 * number of cpus) instead of 50.
5034
5035 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
5036
5037         * loader.c (mono_method_get_signature_full): Add locking here.
5038
5039 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
5040
5041         * appdomain.c: Moved methods for parsing and freeing assembly
5042         names to assembly.c.
5043         * assembly.c, domain-internals.h: Created public methods for parsing
5044         assembly names. Fixed mono_assembly_load_with_partial_name:
5045         it now finds the best match, taking into account the version,
5046         token and culture specified in the partial name. Also return
5047         the latest version if no version information is specified.
5048
5049 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
5050
5051         * threadpool.c: replace check for SocketAsyncCall class.
5052
5053 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5054
5055         * threadpool-internals.h:
5056         * Makefile.am: added threadpool-internals.h
5057
5058         * threadpool.c: call mono_unhandled_exception on exceptions not handled
5059         that happen in threadpool threads (tested on MS).
5060         (mono_thread_pool_remove_socket): new function that dispatch any pending
5061         AIO call on a socket that is closing. By now only epoll really needs it,
5062         as select/poll wake up when the socket closes.
5063
5064
5065         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
5066
5067 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
5068
5069         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
5070
5071 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
5072
5073         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
5074
5075 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
5076
5077         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
5078         has an abort request, convert it into a suspend request.
5079
5080 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
5081
5082         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
5083         warning for the usage of `UnmanagedFunctionPointerAttribute' which
5084         is not supported yet.
5085
5086 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5087
5088         * image.c: register assemblies loaded from data (bundles) in the loaded
5089         assemblies hash. Fixes bug #74772.
5090
5091 2005-04-29  Martin Baulig  <martin@ximian.com>
5092
5093         * class.c (mono_type_get_name_recurse): Update to the new naming
5094         schema from the latest .NET 2.x beta2.
5095         (mono_class_setup_vtable_general): If we're a generic instance,
5096         copy the vtable from our generic type definition and inflate all
5097         the methods in it.
5098
5099         * loader.c (find_method): Update to the new naming schema from the
5100         latest .NET 2.x beta2.
5101
5102 2005-04-29  Raja R Harinath  <harinath@gmail.com>
5103
5104         * class.c (mono_class_init): Add a mono_loader_unlock to the
5105         #74734 fix.
5106
5107 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
5108
5109         * icall.c (ves_icall_System_Environment_Exit): Remove the 
5110         suspend_all_other_threads () call for the time being, since it can hang.
5111
5112         * threads.c (mono_thread_manage): Similarly, disable the waiting for
5113         the background threads to exit, since it can also hang.
5114
5115         * class.c (mono_class_init): Applied patch from Ankit Jain 
5116         (radical@gmail.com). Avoid pending init errors when a field refers
5117         to a nested class using a typeref. Fixes #74734.
5118
5119         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
5120         this for dynamic modules.
5121
5122 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5123
5124         * threads.c: don't wait for threads that are in the process of aborting
5125         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
5126         and waiting for background threads to finish. This makes xsp and
5127         mod-mono-server exit without random length delays and/or hangs.
5128
5129 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5130
5131         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
5132
5133 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
5134
5135         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
5136         dynamic types to prevent infinite loops. Fixes #74727.
5137
5138         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
5139         ..._is_assignable_to.
5140
5141 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
5142
5143         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
5144
5145 2005-04-25  Martin Baulig  <martin@ximian.com>
5146
5147         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
5148
5149         * domain.c
5150         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
5151
5152         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
5153
5154         * reflection.c (build_compressed_metadata): Set metadata header
5155         version to 2.0.
5156
5157 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
5158
5159         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
5160         number into an integral and a decimal part. Fixes #70473.
5161
5162         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
5163
5164 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
5165
5166         * culture-info-table.h : reflected the latest locale-builder output.
5167
5168 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5169
5170         * threadpool.c: check for SuspendRequested too when deciding if
5171         mono_thread_interruption_checkpoint should be called.
5172
5173 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5174
5175         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
5176         * threads.c: remove interruption_mutex and use Interlocked instead. When
5177         suspending all the threads, wait for all the suspended events at once.
5178         If we're shutting down and get an APC that is going to be queued,
5179         call mono_thread_execute_interruption immediately, as the thread might
5180         be sleeping on a pthread condition or mutex.
5181
5182         * icall.c: call mono_runtime_set_shutting_down before suspending the
5183         threads.
5184
5185         Fixes bug #74693. And now xsp is happier when exiting.
5186
5187 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
5188
5189         * loader.c (mono_stack_walk): Fix #74690.
5190
5191 2005-04-22  Martin Baulig  <martin@ximian.com>
5192
5193         * mono-debug.h (MonoDebugMethodJitInfo): Added
5194         `MonoDebugMethodJitInfo *jit'.
5195
5196         * mono-debug.c (mono_debug_read_method): Cache the
5197         MonoDebugMethodJitInfo in `address->jit'.
5198         (mono_debug_free_method_jit_info): New public method.
5199
5200 2005-04-22  Martin Baulig  <martin@ximian.com>
5201
5202         * class.c (mono_class_is_assignable_from): Disallow
5203         type parameter -> interface.
5204
5205 2005-04-21  Dick Porter  <dick@ximian.com>
5206
5207         * threads.c (mono_thread_create): Turn an assertion into an error.
5208
5209 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
5210
5211         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
5212         
5213         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
5214         Fix some gcc 4.0 warnings.
5215
5216 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
5217
5218         * file-io.c: fix alt dir separator char on unix systems
5219         and cleanup (fixes bug #71214).
5220
5221 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
5222
5223         * marshal.c: Use CALLVIRT instead of CALL when dispatching
5224         a call to a remote domain, since the method may be an
5225         interface method in the client domain. This fixes bug #74192.
5226
5227 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5228
5229         * threadpool.c: recv/send are now performed before going back to managed
5230         code to save one transition.
5231
5232 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5233
5234         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
5235
5236         * metadata/threadpool.c: removed hack to workaround the bug above.
5237
5238         Fixes bug #74618.
5239
5240 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
5241
5242         * reflection.c reflection.h: Fix handling of parameter defaults in
5243         dynamic methods. Also fixes handling of parameter attributes.
5244         Fixes #74609.
5245
5246         * mono-debug.c (mono_debug_close_image): Fix warning.
5247
5248 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5249
5250         * socket-io.h: replaced old unused field with new 'blocking'.
5251         * threadpool.c: restore socket blocking state on windows(tm).
5252
5253 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
5254
5255         * icall.c: don't return the codebase in the AssemblyName[] returned by
5256         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
5257         * object-internals.h: Removed FIXME (fields were presents) and fixed
5258         versioncompat declaration.
5259
5260 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5261
5262         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
5263         not closed, so don't cleanup when it happens.
5264
5265 2005-04-13  Chris Toshok  <toshok@ximian.com>
5266
5267         * mono-debug-debugger.h: change prototype for
5268         mono_debugger_lookup_type.
5269
5270         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
5271         this function, although it should probably be named
5272         mono_debugger_init_type.
5273
5274 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5275
5276         * threadpool.c: fix non-AIO case.
5277
5278 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
5279
5280         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
5281         the built-in profiler to measure just JIT compilation times.
5282
5283 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5284
5285         * threadpool.c: the epollfd might be closed by another thread at
5286         any time, so ignore EBADF at treat it as a "we're closing" sign.
5287
5288 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5289
5290         * threadpool.c: release the semaphores with a count equals to the number
5291         of working threads in both IO and regular pools. Fixed typo that messed
5292         up the count of IO pool threads. Don't initialize the pipe handles if
5293         we're using epoll.
5294
5295 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5296
5297         * threadpool.c: some systems don't like a NULL when deleting the socket
5298         from epoll.
5299
5300 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5301
5302         * threadpool.c: fix semaphore allocation.
5303
5304 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5305
5306         * threadpool.c: added epoll() based implementation for asynchronous IO
5307         that is used instead of the default poll() when available.
5308         It can be disabled by setting MONO_DISABLE_AIO.
5309
5310 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5311
5312         * threadpool.c: windows needs 'closesocket' and instead of returning
5313         0 when the stream is closed while in select, it returns -1. Fixes bug
5314         #74573.
5315
5316 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
5317
5318         * class.c (class_compute_field_layout): Fix the regression caused by
5319         the previous try.
5320
5321 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5322
5323         * threadpool.c: separate pool for socket async. IO.
5324         * threadpool.h: mono_max_worker_threads is not a global any more.
5325
5326 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
5327
5328         * class.c (class_compute_field_layout): Fix #74549.
5329
5330 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5331
5332         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
5333         use 2 connected sockets instead.
5334
5335 2005-04-08  Miguel de Icaza  <miguel@novell.com>
5336
5337         * mono-config.c: Add new entry point for mkbundle
5338         mono_config_parse_memory. 
5339
5340 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5341
5342         * threadpool.c: removed another unused function.
5343
5344 2005-04-08  Ankit Jain  <radical@corewars.org>
5345
5346         * reflection.c (get_default_param_value_blobs): Add 'types'
5347         parameter to get the types encoded in the constant table.
5348         (mono_param_get_objects): Use the type from the constant table,
5349         not the type of the parameter, when creating default values.
5350         Handle null default values correctly.
5351
5352 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5353
5354         * file-io.c:
5355         * file-io.h:
5356         * threadpool.c:
5357         * threadpool.h:
5358         * icall.c:
5359         * socket-io.c: removed dead code for async IO.
5360
5361 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5362
5363         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
5364
5365         * threadpool.c: intercept socket async. calls and pass them to a thread
5366         that is polling and dispatching the job items to the threadpool as
5367         socket become ready. Fixes bugs #71217, #71933.
5368
5369         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
5370         between char and short/ushort arrays.
5371
5372         * socket-io.c: remove dead code.
5373
5374 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
5375
5376         * locales.c,
5377           icall.c : removed InternalToUpper_Comp() and
5378           InternalToLower_Comp().
5379
5380 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
5381
5382         * char-conversions.h : The tables were incorrectly generated. Should
5383           be generated against invariant culture.
5384
5385 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
5386
5387         * object.c (mono_runtime_invoke_array): Fix return value when 
5388         passing pre-created valuetype objects to ctors.
5389
5390         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
5391         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
5392         Fixes #74338.
5393
5394 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
5395
5396         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
5397         only used with --security and hides the wrong corlib version error.
5398
5399 2005-03-30  Joshua Tauberer  <tauberer@for.net>
5400
5401         * class.c: Changed mono_class_name_from_token so that types
5402         outside of a namespace don't have an initial period.  Improved
5403         the g_warning message used in _mono_class_get when loading
5404         fails.
5405         * assembly.c: In mono_assembly_load_reference, when an assembly
5406         can't be found, "No such file or directory" is misleading and
5407         unhelpful because a few paths were checked for the presence of
5408         the assembly.  When that happens (ENOENT), display a nicer
5409         message indicating the directories that were searched.  In all
5410         cases, the warning is made easier to read for non-hackers.
5411
5412 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
5413
5414         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
5415         project/solution.
5416         * appdomain.h|domain.c: Removed inline from functions.
5417         * appdomain.c: Reduced warnings when compiling on windows.
5418         * icall.c: Fixed output_debug declaration to gunichar2*.
5419         * mono-config.c: Reduced warnings when compiling on windows.
5420         * rand.c: Added missing "windows.h". Added missing return value.
5421         * rawbuffer.c: Added missing winsock2.h for windows.
5422         * sysmath.h: Added mono-compiler.h header to allow/ease 
5423         compilation with non-GCC compilers.
5424         * threads.c: Fixed declarations to compile with VS.NET C compiler.
5425         Removed cast warnings.
5426
5427         Adapted from the work of J Lothian (for VC6).
5428
5429 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
5430
5431         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
5432         from default_path.
5433
5434 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
5435
5436         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
5437         the 2.0 profile.
5438
5439 2005-03-27  Raja R Harinath  <harinath@gmail.com>
5440
5441         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
5442         has to be in $(exec_prefix).  $(prefix) is for arch-independent
5443         stuff, and it would probably use $(prefix)/share rather than
5444         $(prefix)/lib.
5445
5446 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5447
5448         * console-io.c: added 2 includes that might be missing.
5449
5450 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
5451
5452         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
5453         profile.
5454
5455         * reflection.c (create_custom_attr): Allocate the params array using
5456         alloca so it gets GC tracking.
5457
5458 2005-03-23  Chris Toshok  <toshok@ximian.com>
5459
5460         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5461         out some spew.
5462
5463 2005-03-24  Raja R Harinath  <rharinath@novell.com>
5464
5465         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5466         changes to pick up any changes in prefix, etc.
5467
5468 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5469
5470         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5471         
5472         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5473         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5474
5475 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5476
5477         * class-internals.h object-internals.h class.c reflection.c: Extend the
5478         mono_lookup_dynamic_token () function to return the class of the
5479         token as well. 
5480
5481         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5482         well. Fixes #73848.
5483
5484 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
5485
5486         * security-manager.c: Skip inheritance checks for intra-corlib
5487         class inheritance and method overrides. This skips a lot of checks
5488         and (anyway) permissions cannot work until corlib is loaded.
5489
5490 2005-03-23  Martin Baulig  <martin@ximian.com>
5491
5492         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5493         MONO_TYPE_GENERICINST.  
5494
5495 2005-03-23  Martin Baulig  <martin@ximian.com>
5496
5497         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5498
5499 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5500
5501         * class.c: added locking comments to some functions.
5502         Cache the interface offsets arrays (saves about 20 KB
5503         of runtime memory in a typical app).
5504         Reduce the time overhead in mono_class_setup_supertypes ().
5505
5506 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5507
5508         * icall.c: speedup and fix leaks in GetMethodsByName and
5509         GetPropertiesByName.
5510
5511 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5512
5513         * reflection.c: some locking fixes.
5514
5515 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5516
5517         * metadata.c: added missing break in case statement.
5518
5519 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
5520
5521         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5522         typedbyref return values. Fixes #73941.
5523
5524 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5525
5526         * security-manager.c|h: Added demandunmanaged method and 
5527         suppressunmanagedcodesecurity class to MonoSecurityManager.
5528         Renamed aptc class to allowpartiallytrustedcallers.
5529
5530 2005-03-17  Martin Baulig  <martin@ximian.com>
5531
5532         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
5533
5534 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5535
5536         * file-io.c: disabled file async. IO using aio_*. It uses the
5537         threadpool now. Workaround for bug #73718.
5538
5539 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5540
5541         * assembly.h, mono-config.c: added code to deal with bundled configs
5542         for bundled assemblies.
5543
5544 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
5545
5546         * *.c, private.h: cleanup, removing old private.h header file.
5547
5548 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5549
5550         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
5551         and throw_on_unmappable_char attributes.
5552
5553 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
5554
5555         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
5556         _ProcessName_internal.
5557
5558 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
5559
5560         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
5561         #73631.
5562
5563         * icall.c threads.c threads-types.h: Remove slothash icalls as they
5564         are no longer used.
5565
5566 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
5567
5568         * object.c (compute_class_bitmap): Add support for generics. Fixes
5569         #73527.
5570
5571 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5572
5573         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
5574
5575 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5576
5577         * filewatcher.c: commented out the code for windows watcher, as we don't
5578         use it (we use the managed implementation instead).
5579
5580 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
5581
5582         * object-internals.h (MonoThread): Remove 'unused1' field.
5583
5584         * appdomain.c: Bump corlib version.
5585
5586         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
5587
5588         * reflection.c (mono_reflection_create_runtime_class): Remove the
5589         AssemblyBuilder.Save optimization since it causes too many problems.
5590
5591 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
5592
5593         * exception.c|h: Added mono_get_exception_reflection_type_load to
5594         create a ReflectionTypeLoadException object.
5595         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
5596         to return NULL is a InheritanceDemand fails during reflection. Updated
5597         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
5598         ReflectionTypeLoadException if an InheritanceDemand fails during 
5599         reflection. Added icall mapping for GetLinkDemandSecurity.
5600         * security-manager.c|h: Added ves_icall_System_Security_
5601         SecurityManager_GetLinkDemandSecurity internal call to return the
5602         class and methods permissions set for a LinkDemand. Removed unused
5603         fields in MonoSecurityManager.
5604
5605 2005-03-10  Martin Baulig  <martin@ximian.com>
5606
5607         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
5608         it's a generic instance.
5609
5610 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
5611
5612         * reflection.c (mono_get_object_from_blob): Applied patch from
5613         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
5614
5615         * class.c (mono_class_is_assignable_from): Another try at fixing 
5616         #73469 without breaking anything.
5617
5618 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
5619
5620         * class.c: (mono_class_is_assignable_from): Revert the last changes
5621         since they don't work with generics.
5622         
5623         * class.c (mono_class_is_assignable_from): Fix build bustage.
5624
5625         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
5626         the managed IsAssignableFrom method. Fixes #73469.
5627
5628         * reflection.c (mono_reflection_call_is_assignable_from): New helper
5629         function.
5630
5631 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
5632
5633         * object.c (mono_load_remote_field_new): Fix returning uninitialized
5634         memory when the remoting callback does not sets the out arguments.
5635         Fixes #73007.
5636
5637         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
5638         by mistake.
5639
5640         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
5641
5642         * object-internals.h (MonoStackFrame): Sync with managed object layout.
5643
5644         * appdomain.c: Bump corlib version.
5645
5646 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
5647
5648         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
5649         function.
5650
5651         * threads.c (mono_thread_attach): Detect threads which are not started
5652         by the GC pthread wrappers.
5653
5654 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
5655
5656         * icall.c: Added new icall for RNG.
5657         * rand.c|h: Added new icall to open the RNG. This allows to share a 
5658         single handle on Linux to access /dev/urandom and fix #73183.
5659
5660 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5661
5662         * object.c: setting the new vtable in a transparent proxy object must
5663         not change the GC descriptor.
5664
5665 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5666
5667         * object.c: fixed compilation without GCJ support.
5668         * reflection.c: for runtime-created types ensure klass->has_references
5669         is correct (bug #73215).
5670
5671 2005-03-02  Martin Baulig  <martin@ximian.com>
5672
5673         * class.c (mono_class_is_assignable_from): Make this work if
5674         `oklass' is a generic instance; fixes #72831.
5675
5676 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5677
5678         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
5679         with hasthis set.
5680         
5681         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
5682
5683         * marshal.c: Reorganize native->managed marshalling code to also use
5684         the emit_marshal_... functions.
5685
5686 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5687
5688         * object.c: typed allocs have issues with bitmap sizes > 30,
5689         so check for max_set >= 30.
5690
5691 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
5692
5693         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
5694         managed code. Fixes #73012.
5695
5696         * metadata.h (MonoMarshalSpec): Add elem_mult field.
5697
5698         * metadata.c reflection.c: Load/Emit elem_mult as well.
5699         
5700         * metadata.h (MonoMarshalSpec): Add comment.
5701
5702         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
5703
5704         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
5705         num_elem to -1 if not given.
5706
5707         * object-internals.h (MonoReflectionMarshal): Add has_size field.
5708
5709         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
5710         given values.
5711
5712 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
5713
5714         * null-gc.c (mono_gc_free_fixed): Was not compilable.
5715
5716 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
5717
5718         * reflection.c (encode_marshal_blob): Encode param_num field as well.
5719
5720         * object-internals.h (MonoReflectionMarshal): Add param_num field.
5721
5722 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
5723
5724         * object.c: generalized the reference bitmap creation
5725         and added hooks for the new GC.
5726         * class-internals.c: removed the gc_bitmap field from MonoClass.
5727
5728 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5729
5730         * domain.c: help the compiler to produce better code
5731         in mono_jit_info_table_find ().
5732
5733 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5734
5735         * object.c: make all allocations look typed.
5736
5737 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5738
5739         * socket-io.c: load Mono.Posix if it's not loaded already
5740         (fixes bug#73033).
5741
5742 2005-02-24  Martin Baulig  <martin@ximian.com>
5743
5744         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
5745         * reflection.c (dup_type): Likewise.
5746
5747 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
5748
5749         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
5750         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
5751
5752 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5753
5754         * domain.c, threads.c, object-internals.h: make the critical thread
5755         local vars use the fast access mode (even when we're compiled in
5756         a lib). Provide accessors to be used by the jit during codegen.
5757
5758 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5759
5760         * appdomain.c: Changed hook functios behavior to include
5761         support for the reflection only assemblies. Some icalls were changed
5762         to support the mentioned assemblies too. Signatures of static methods
5763         try_assembly_resolve and real_load now have an additional parameter:
5764         refonly.
5765
5766         * assembly.c: General changes to mono_assembly_ methods to support
5767         reflection only api. Functions mono_assembly_open, mono_assembly_load,
5768         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
5769         suffix, to support an additional gbool parameter to specify whether
5770         the assembli is reflection only or not. Created some new hook functions 
5771         to add support for reflection only assemblies. Signatures of static 
5772         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
5773         have now an additional parameter: refonly.
5774
5775         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
5776         indicating whether the assembly is reflection only or not.
5777
5778         * exception.c: Add mono_get_exception_invalid_operation.
5779
5780         * icall.c: Throw an InvalidOperationException when trying to invoke
5781         a property/method/event, or trying to set/get the value of a field.
5782         Also add an icall to retrieve the ref_only flag to the
5783         MonoReflectionAssembly.
5784
5785 2005-02-23  Chris Toshok  <toshok@ximian.com>
5786
5787         Part of fix for #72827.
5788         * mono-debug.c (mono_debug_add_method): add lexical block data to
5789         the info we write.  Kind of a hack at the moment - we copy the
5790         lexical block info from the MonoDebugMethodInfo to the
5791         MonoDebugMethodJitInfo here, before writing it.
5792         (mono_debug_read_method): read the lexical block info.
5793
5794         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
5795
5796         * debug-mono-symfile.h: add lexical block support.
5797
5798         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
5799         support.
5800
5801 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5802
5803         * loader.c (mono_lookup_pinvoke_call): Fix warning.
5804
5805         * object.c (mono_runtime_free_method): Call mono_free_method () and
5806         put the TODOs there.
5807
5808         * loader.c (mono_free_method): Free up most memory allocated for 
5809         dynamic methods.
5810
5811 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5812
5813         * reflection.c: properly flag a Type argument to a
5814         named custom attr value (bug #72248).
5815
5816 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5817
5818         * reflection.c: reduce code duplication in named custom
5819         attribute encoding.
5820
5821 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
5822
5823         * reflection.c: properly encode custom attrs of type object
5824         (bug #72649).
5825
5826 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
5827
5828         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
5829
5830 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
5831
5832         * socket-io.c: load System.dll if it's not loaded already
5833         (bug #72850 and #70477).
5834
5835 2005-02-21  Martin Baulig  <martin@ximian.com>
5836
5837         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
5838         generic instances.
5839
5840 2005-02-21  Martin Baulig  <martin@ximian.com>
5841
5842         * reflection.c (mono_image_build_metadata): We also need to
5843         "fixup" the MethodImpl table after we computed the final method
5844         indices.  Call fixup_methodimpl() to do that.
5845         (fixup_methodimpl): New private method.
5846
5847 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
5848
5849         * assembly.c: special case mscorlib.dll (bug#72536),
5850         patch from Carlos Alberto Cortez.
5851
5852 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
5853
5854         * threads-types.h threads.c: Fix build bustage.
5855
5856         * threads.c: Use a union for long<->double conversions.
5857
5858         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
5859         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
5860
5861         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
5862         containing the checkpoint call with NOT_TAKEN.
5863         
5864         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
5865         checkpoint before pushing the arguments, so they won't have to be
5866         spilled to stack.
5867
5868 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5869
5870         * domain.c, assembly.c, domain-internals.h: make some data
5871         const and relocation-free.
5872
5873 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
5874
5875         * object.c, appdomain.c, class-internals.h: introduce the
5876         MonoClassRuntimeInfo structure to hold the info needed to
5877         use a class at runtime. Made mono_class_vtable() lock-free
5878         for all the appdomains.
5879
5880 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
5881
5882         * metadata-internals.h, image.c: introduce a per-image mempool to
5883         be used for memory that has the same lifetime as the image.
5884
5885 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
5886
5887         * domain.c: In mono_init_internal(), instead of selecting the first
5888         runtime version supported by an executable, get a list of all
5889         supported versions and select the one for which an mscorlib exists
5890         (since even if the runtime supports a given version, it doesn't mean
5891         that the framework for that version is installed).
5892         Modified get_runtimes_from_exe to support this behavior.
5893         In supported_runtimes, added information about additional system
5894         assembly versions.
5895         
5896         * assembly.c: Added support for more than one system assembly version
5897         per runtime version. Updated the assembly list.
5898         In mono_assembly_remap_version, removed the initial version check,
5899         since we don't know to which version we need to compare until we
5900         get the version set on which the assembly is based.
5901         Moved the code for loading corlib into the new method
5902         mono_assembly_load_corlib(), so it can be used by the initialization
5903         code.
5904         
5905         * domain-internals.h: Updated data structures and added declaration
5906         for mono_assembly_load_corlib.
5907
5908 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5909
5910         * reflection.c (resolve_object): Fix the creation of the signature in 
5911         the SignatureHelper case.
5912
5913         * assembly.c (mono_assembly_remap_version): Fix binary search.
5914         
5915 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
5916  
5917         * class.c: Added inheritance check when a method is overloaded (from a
5918         virtual method or when implementing an interface) and when a class is
5919         inherited. Added functions to set a failure for a class and to 
5920         retreive the exception from a failure.
5921         * class-internals.h: Added fields to MonoClass to keep the exception
5922         information status for inheritance (or other exceptions) to be thrown
5923         later (i.e. not at load time).
5924         * object.c: Throw the inheritance SecurityException when a type is to 
5925         be created with either class or method inheritance violations.
5926         * reflection.c|h: Fix when getting declsec from a class. Removed 
5927         unrequired code for class. Improved sanity in parameter naming.
5928         * security-manager.c|h: Added functions to check for class and method
5929         inheritance.
5930
5931 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
5932
5933         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
5934         and has_finalize in dynamic types as well.
5935
5936 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
5937
5938         * culture-info-table.h : fixed currency format for en-GB (and so on).
5939
5940 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
5941
5942         * gc.c: ensure the GC handles never have 0 as a value.
5943
5944 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5945
5946         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
5947         a pointer to a struct to unmanaged code. Fixes #72625.
5948
5949 2005-02-16  Martin Baulig  <martin@ximian.com>
5950
5951         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
5952
5953 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
5954
5955         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
5956
5957 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5958
5959         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
5960
5961         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
5962         UnmanagedFunctionPointerAttribute, use it for determining calling convention
5963         etc. Fixes #71471.
5964
5965         * reflection.c (mono_custom_attrs_get_attr): New helper function.
5966
5967         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
5968
5969 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
5970
5971         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
5972         changes to make the current context a field in MonoThread.
5973
5974 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
5975
5976         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
5977         the last change.
5978         
5979         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
5980         extracted from mono_marshal_get_native_wrapper.
5981
5982         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
5983         to create wrappers around native functions.
5984
5985         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
5986         delegates for arbitrary function pointers. Fixes #71472.
5987
5988 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5989
5990         * threads.c: cleaned up the code a little.
5991
5992 2005-02-15  Martin Baulig  <martin@ximian.com>
5993
5994         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
5995         the data table.
5996
5997         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
5998         allocate larger chunks if needed.
5999
6000 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
6001
6002         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
6003         in by mistake.
6004
6005 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
6006
6007         * domain.c: keep the domains in an array and ensure the domain ids
6008         are kept small, so they can be used as indexes to domain-specific data
6009         with a small memory overhead.
6010
6011 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
6012
6013         * icall.c: Handle byref types in Type icalls. Fixes #72544.
6014
6015 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
6016
6017         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
6018
6019 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
6020
6021         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
6022
6023         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
6024         values.
6025
6026         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
6027         
6028 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
6029
6030         * domain-internals.h: add the hashtable here.
6031
6032         * class-internals.h: Remove `info' from MonoMethod
6033
6034         * domain.c: Add a new hashtable, jit_trampoline_hash
6035
6036 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6037
6038         * object.c: don't set the value of static fields
6039         (fixes bug#72494).
6040
6041 2005-02-11  Martin Baulig  <martin@ximian.com>
6042
6043         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
6044         (mono_debug_add_method): Silently ignore the method if it's too big.
6045         (mono_debug_add_type): Likewise.
6046
6047 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
6048
6049         * threads.c, appdomain.c: remove #ifdefs from the code.
6050
6051 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
6052
6053         * metadata-internals.h: Added flags to MonoAssembly to cache the most
6054         common security informations. This allows us to stay in unmanaged code
6055         when doing LinkDemand and it's special cases (except for the first 
6056         time for initialization). The flags a very much used with --security.
6057         * reflection.c|h: Added code to get declarative security attributes 
6058         for LinkDemand and InheritanceDemand. This required to refactor the
6059         existing code for Demand.
6060         * security-manager.c|h: Added new method fields for the special cases
6061         of LinkDemand.
6062
6063 2005-02-10  Martin Baulig  <martin@ximian.com>
6064
6065         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
6066         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
6067
6068 2005-02-10  Martin Baulig  <martin@ximian.com>
6069
6070         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
6071         debugging code; this is almost a complete rewrite.
6072
6073         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
6074
6075 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6076
6077         * domain.c, object.h: expose mono_string_equal () and 
6078         mono_string_hash ().
6079         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
6080         it's implemented in managed code.
6081
6082 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6083
6084         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
6085         lo leak objects between appdomains.
6086
6087 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6088
6089         * assembly.c: old compilers compilation fix from 
6090         robertj@gmx.net (Robert Jordan).
6091
6092 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
6093
6094         * class-internals.h: Little reminder for the future.
6095
6096         * debug-helpers.c: Fix up wrapper_type_names
6097
6098 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6099
6100         * image.c, metadata-internals.h: when loading an image from a file,
6101         mmap all of it and use the same codepaths as when using a
6102         in-memory image: the code is simpler and we use less memory
6103         (both writable and readonly).
6104
6105 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6106
6107         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
6108         API to alloc runtime data structures that need to be tracked by the
6109         GC and contain pointers.
6110         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
6111         make the code more readable and eventually use a different GC.
6112
6113 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
6114
6115         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
6116         for out arguments.
6117         
6118 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
6119
6120         * object.c: In release_type_locks(), don't release the cctor lock
6121         if it has already been released. This fixes a crash in the
6122         thread5 test.
6123
6124 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6125
6126         * gc.c, marshal.c, icall.c: register a delegate for finalization
6127         only when the native function pointer has been allocated for it.
6128
6129 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6130
6131         * object.c: cleaned up some code, allocate objects that are
6132         pointer free with the atomic malloc variant. Allocate memory
6133         for static data from the mempool if it's pointer-free.
6134         Allocate the bounds array at the end of the array data, when needed.
6135         * object-internals.h, object.h: move a private function in a private
6136         header.
6137         * class.c: handle missing case in tracking references in fields.
6138
6139 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6140
6141         * class.c, class-internals.h: keep track if a type has
6142         reference fields in either the instance or static fields.
6143
6144 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
6145
6146         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
6147         and renamed to MonoRuntimeInfo. Added fields to store the expected
6148         framework assembly version. Changed mono_get_framework_version and
6149         mono_get_runtime_version for a single mono_get_runtime_info method.
6150         
6151         * assembly.c: Added method to remap system assembly versions to the
6152         current executing runtime version. Removed old mapping code.
6153         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
6154         
6155         * icall.c, reflection.c: Track api changes.
6156
6157 2005-02-06  Miguel de Icaza  <miguel@novell.com>
6158
6159         * loader.c (method_from_memberref): Improve error reporting,
6160         produce the class name instead of the typeref/typedef index. 
6161
6162 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
6163
6164         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
6165
6166 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
6167
6168         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
6169         stdcall and charset name mangling.  Reorganize the code and add
6170         some tracing stuff.
6171
6172 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
6173
6174         * monodiet.c: More iters!
6175
6176         * marshal.c: Iter usage.
6177
6178         * icall.c: Iter usage.
6179
6180         * object.c: Use iters.
6181
6182         * debug-helpers.c: More iters
6183
6184 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
6185
6186         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
6187         under win32.
6188
6189 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
6190
6191         * mono-debug-debugger.c: use iters
6192
6193         * class.c, class-internals.h: mono_class_setup_events is static
6194         now
6195
6196         * All callers: use iters
6197
6198 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
6199
6200         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
6201         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
6202
6203 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
6204
6205         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
6206
6207         * marshal.h: Add prototypes for ldfld/stfld_remote.
6208
6209         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
6210         this is called during startup.
6211         
6212 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
6213
6214         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
6215         MonoThreadsSync struct private in monitor.c. Changed the way
6216         MonoThreadsSync is allocated so it's faster and there is no
6217         need to keep track of it with a finalizer and it uses less memory.
6218         This also finally allows us to allocate mono objects as ptrfree when
6219         there are no reference fields.
6220
6221 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
6222
6223         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
6224         disappearing link to the GC interface and use them to simplify
6225         the gchandles code.
6226
6227 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
6228
6229         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
6230         stfld_remote which call mono_load/store_field_new. This allows methods
6231         calling ldfld/stfld wrappers to be AOTed.
6232
6233         * console-io.c: Include sys/filio.h under solaris.
6234         
6235         * console-io.c: Include curses.h if needed correctly.
6236
6237 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
6238         
6239         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
6240         method->klass as well.
6241
6242         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
6243
6244         * class.c (mono_class_init): Switch on lazy initialization of 
6245         methods.
6246
6247         * class.c (mono_class_get_finalizer): Handle the case when the 
6248         finalizer is inherited.
6249
6250 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6251
6252         * console-io.c: <curses.h> is needed by term.h on solaris.
6253
6254 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
6255
6256         * icall.c, class-internals.h, monodiet.c, class.c: Remove
6257         mono_class_setup_properties where possible. Remove this ftn from
6258         the header file, and make it static.
6259
6260 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
6261
6262         * loader.c: Add missing setup_... call.
6263
6264         * class.c: Add missing setup_... calls.
6265
6266         * class.c (mono_class_init): Switch on lazy initialization of 
6267         the generic vtable.
6268         
6269         * class.c (mono_class_init): Fix generics broken by the recent changes.
6270
6271         * monodiet.c (handle_type): Add missing setup_... calls.
6272
6273         * class.c: Back out garbage in previous patch.
6274         
6275         * class.c: Add missing setup_... calls.
6276
6277         * class.c (mono_class_get_method_from_name_flags): Avoid calling
6278         mono_class_setup_methods () if possible.
6279
6280         * class-internals.h (MonoClass): Add 'has_cctor' flag.
6281
6282         * class-internals.h (MonoCachedClassInfo): New structure.
6283
6284         * class.c: Initialize properties and events fields of MonoClass lazily.
6285
6286         * class.c: Add infrastructure for lazily initializing the methods and
6287         vtable fields of MonoClass. Not yet used.
6288
6289         * class.c (mono_class_get_finalizer): New helper function.
6290
6291         * class.c: Add infrastructure for loading some class related data from
6292         an AOT file.
6293
6294         * object.c: Add infrastructure for initializing the vtable from data
6295         in the AOT file.
6296
6297         * gc.c (run_finalize): Use mono_class_get_finalizer ().
6298
6299         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
6300         appropriate initialization function before accessing parts of the
6301         MonoClass structure.
6302
6303         * marshal.c: Fix warnings.
6304         
6305         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
6306
6307         * mono-debug-debugger.c (get_exception_message): Use 
6308         mono_class_get_method_from_name_flags ().
6309
6310 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
6311
6312         * reflection.c, appdomain.c: Replace a few manual searches that
6313         Zoltan missed. (Paolo approved this part of my initial patch).
6314
6315 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
6316
6317         * profiler.c: disable recording statistical events at report time.
6318
6319 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6320
6321         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
6322         to byteswap arrays of enum values, too (bug #72080).
6323
6324 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
6325
6326         * appdomain.c (set_domain_search_path): Allow this to be called if
6327         domain->setup is not yet set.
6328
6329         * loader.c (mono_method_get_index): New helper function.
6330
6331         * loader.c reflection.c: Use mono_method_get_index ().
6332
6333         * class.c (mono_class_get_method_from_name_flags): New helper method.
6334
6335         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
6336         this.
6337
6338         * class.c (mono_class_get_cctor): New helper method.
6339
6340         * string-icalls.c object.c class.c marshal.c reflection.c: Use
6341         mono_class_get_method () to look up methods.
6342
6343 2005-02-01  Miguel de Icaza  <miguel@novell.com>
6344
6345         * console-io.c: Fix the build, this should work on Windows.
6346
6347 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
6348
6349         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
6350         be set to null to keep things valid
6351
6352 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6353
6354         * icall.c: added Console 2.0 icalls.
6355         * Makefile.am: added console-io.[ch]
6356         * console-io.[ch]: internal calls for Console 2.0 API.
6357
6358 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6359
6360         * class.c: make sure we consider all the interfaces
6361         when calculating max_interface_id (bug found by
6362         Jeroen Frijters running ikvm).
6363
6364 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
6365
6366         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
6367         valuetype fields to null.
6368
6369         * object.c (set_value): Ditto. Fixes #71669.    
6370
6371 2005-01-31  Martin Baulig  <martin@ximian.com>
6372
6373         * metadata.c (mono_metadata_has_generic_params): New public
6374         function; checks whether something is a generic method.
6375
6376 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6377
6378         * appdomain.c: fix infinite recursion when adding assemblies.
6379
6380 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
6381
6382         * object.c: Fix small typo to return all items for Environment.
6383         GetCommandLineArgs.
6384
6385 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6386
6387         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
6388         reflection.c: more domain and assembly-unload related fixes
6389         and memory leaks plugs.
6390
6391 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
6392
6393         * 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.
6394
6395 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
6396
6397         * loader.c (mono_method_signature): Make this method lazy
6398         (mono_get_method_from_token): Don't computate the signature here.
6399
6400         Doing this saves quite a bit of memory. I got 90 kb on starting up
6401         monodoc. It should also save some disk reads on startup.
6402
6403         * *: MonoMethod->signature might be NULL now. You *MUST* use
6404         mono_method_signature.
6405
6406 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
6407
6408         * object.c (mono_runtime_get_main_args): Return an array from the
6409         current domain here. Fixes #71938.
6410
6411 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
6412
6413         * monitor.c: formatting changes to comply with the
6414         mono coding style and remove #ifdefs from the code.
6415
6416 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6417
6418         * metadata.c, private.h: remove some unneeded data
6419         and use a more compact representation for table schemas.
6420
6421 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
6422
6423         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
6424         to get a better distribution in hash tables.
6425         * *.c: use mono_aligned_addr_hash() where appropriate.
6426         * assembly.c: make var static.
6427
6428 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
6429
6430         * domain-internals.h: Put MonoJitInfo on a diet.
6431
6432         * domain.c: Fix a warning.
6433
6434 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6435
6436         * gc.c: rework the gc handles code to reuse handles
6437         when freed.
6438
6439 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6440
6441         * domain.c: fixed long standing bug in mono_string_equal() which
6442         was brought to light with the ldstr changes.
6443
6444 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
6445
6446         * reflection.c: Remove warning by adding missing include for marshal.h
6447
6448 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6449
6450         * domain.c, object.c: change the ldstr_table to hold
6451         MonoString* as keys: makes the runtime isinterned lookup
6452         faster and simplifies memory management.
6453
6454 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
6455  
6456         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
6457         possible to add imperative security checks before calling the icall.
6458         * reflection.c: Return security attributes on the original MonoMethod
6459         (and not the wrapped one). This fix permissions on icalls.
6460
6461 2005-01-25  Dick Porter  <dick@ximian.com>
6462
6463         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6464         the check for mktime() support actually test the mktime() return
6465         value.  "Fixes" bug 71682, though the output is still different to
6466         MS.
6467
6468 2005-01-25  Martin Baulig  <martin@ximian.com>
6469
6470         * class.c (mono_class_is_assignable_from): Make this work for
6471         generic instances.
6472
6473 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
6474
6475         * marshal.c (mono_string_utf8_to_builder)
6476         (mono_string_builder_to_utf16): We might not have ownership of the
6477         string. In thise case, we need to create a new buffer.
6478
6479         * object-internals.h (mono_stringbuilder_capacity): sb->str might
6480         be null, in which case, use the default capacity.
6481
6482 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6483
6484         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6485         GC events to the profiler.
6486
6487 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6488
6489         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6490         if you don't want the GC to run.
6491
6492 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6493
6494         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6495         start providing a GC API and keeping different implementations in
6496         their own file.
6497         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6498
6499 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
6500
6501         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6502         mmap rather than allocating a huge buffer.
6503         (mono_debug_close_mono_symbol_file): Free the buffer allocated
6504         above.
6505
6506 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
6507
6508         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6509         and CheckExecutionRights.
6510         * reflection.c|h: Keep the index of the declarative security to be 
6511         used, instead of the pointer, when AOT compiler is used. Also add 
6512         class initialization when requesting demands.
6513         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6514         CheckExecutionRights. Both properties are now FALSE by default, and
6515         unmodifiable, unless the --security option is used.
6516
6517 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6518
6519         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
6520         reflection.c: properly refcount images and assemblies, many leaks fixed.
6521
6522 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6523
6524         * threadpool.c: increase the timeout for threads in the thread pool to
6525         10s.  Fixes bug #67159.
6526
6527 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
6528
6529         * class-internals.h: Sun's compiler insists on explicit
6530         signed on bit fields to handle then correctly.
6531
6532 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
6533
6534         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
6535         Make the size of the array fit only the number of invalid path
6536         chars that we have.
6537
6538         * class.c (_mono_class_get): Improve the error reporting when a
6539         class referenced is not found, to assist debugging. 
6540
6541 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
6542
6543         * threads.c: fix off-by-one error.
6544         * domain.c: free data allocated in the domain.
6545
6546 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6547
6548         * reflection.c (mono_method_body_get_object): Fill out exception info
6549         as well.
6550
6551         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
6552         structure.
6553         
6554 2005-01-19  Martin Baulig  <martin@ximian.com>
6555
6556         * loader.c (mono_get_method_constrained): Make this work again.
6557
6558 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
6559
6560         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
6561         guint16 to match the managed side.
6562
6563         * reflection.c (mono_reflection_body_get_object): Fill out local
6564         variables array.
6565
6566         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
6567         as well.
6568
6569         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
6570         'local_var_sig_token'.
6571
6572 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
6573
6574         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
6575         System.Drawing.
6576
6577         * reflection.c (mono_method_body_get_object): Handle abstract and
6578         runtime methods.
6579
6580 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
6581
6582         * marshal.c, loader.c, class-internals.h, reflection.c:
6583         store the emthod data for a wrapper in an array instead of a list.
6584
6585 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
6586
6587         * marshal.c: change the code to allocate memory more
6588         conservatively for method wrappers.
6589
6590 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6591
6592         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
6593         fields from MonoClass to the marshal info structure where they belong.
6594
6595 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6596
6597         * class.c, object.c, class-internals.h, marshal.c: rearrange
6598         some fields and tweak some types to lower memory usage.
6599
6600 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
6601
6602         * threads.c (signal_thread_state_change): Handle the case when the
6603         target thread is the current thread.
6604
6605         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
6606
6607         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
6608         emit_ptr_to_object_conv. 
6609
6610         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
6611         marshalling. Fixes #71352.
6612
6613 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6614
6615         * metadata.h, blob.h: move table enum to blob.h so it can be included
6616         in any header.
6617         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
6618         cut the size of MonoImage/MonoDynamicImage.
6619
6620 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
6621
6622         * profiler.c (mono_profiler_install_simple): Fix default arguments.
6623
6624 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
6625
6626         * reflection.c, reflection.h, icall.c: add a function to check
6627         if an attribute type is defined for a metadata object.
6628
6629 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
6630
6631         * object-internals.h: Added some needed fields from StringBuilder class.
6632         * marshal.c: Set the maxCapacity when creating a StringBuilder.
6633
6634 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
6635
6636         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
6637         threads before shutting down the runtime.
6638
6639         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
6640
6641 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6642
6643         * object-internal.h, threads.c: implement stacksize and 
6644         parameterized thread start functionality (requires
6645         matching corlib). Marked broken code for later removal.
6646
6647 2005-01-12  Martin Baulig  <martin@ximian.com>
6648
6649         * class-internals.h (MonoGenericClass): Moved the `initialized'
6650         flag to MonoDynamicGenericClass, removed `init_pending'.
6651         (MonoGenericInst): Added `is_reference' flag.
6652
6653 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
6654
6655         * reflection.c (mono_image_create_pefile): Only set the pe_offset
6656         inside the MSDOS header. Fixes #71201.
6657
6658         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
6659         gc thread.
6660         (mono_domain_finalize): Ditto.
6661
6662 2005-01-12  Martin Baulig  <martin@ximian.com>
6663
6664         * class.c (mono_get_shared_generic_class): Use the cache for
6665         non-dynamic generic classes.
6666
6667         * class-internals.h (mono_class_create_generic_2): Removed
6668         function prototype, this function is now static inside class.c.
6669
6670         * class.c (mono_class_create_generic_2): Made this static, only
6671         call it from mono_class_init() and mono_class_setup_parent().
6672         (collect_implemented_interfaces_aux): Call mono_class_init() on
6673         the interfaces we collect.
6674         (mono_class_setup_vtable): Call mono_class_init (class->parent).
6675
6676 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6677
6678         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
6679         it a real thread handle.
6680
6681         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
6682         MonoJitExceptionInfo, since each catch clause needs its own variable.
6683         
6684 2005-01-11  Dick Porter  <dick@ximian.com>
6685
6686         * image.c (mono_pe_file_open): New variant on mono_image_open()
6687         that does not set up the CLI metadata; used for FileVersionInfo so
6688         it can get the data for windows binaries too.
6689         
6690         * process.c (process_read_string_block): Don't read off the end of
6691         the StringTable block.
6692
6693         These both fix bug 70766.
6694
6695 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
6696
6697         * gc.c: set some fields to NULL at GC cleanup time.
6698         * threads.c: if we quit the main thread, call exit ().
6699
6700 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6701
6702         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
6703
6704 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
6705
6706         * threads.h, threads.c, object.c: added accessor and settor for
6707         main_thread. Handle it specially when exiting from it: wait
6708         for other foreground threads to exit.
6709
6710 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6711
6712         * process.c, verify.c: remove some bloat.
6713
6714 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
6715
6716         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
6717         the calling convention to cdecl under win32.
6718
6719 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
6720
6721         * object.c (mono_object_get_size): New function to get the size of
6722         an object instance.
6723
6724         * profiler.c (simple_allocation): Use above.
6725
6726 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
6727
6728         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
6729         ves_icall_System_AppDomain_getRootDomain (as it's not required to
6730         get an appdomain by it's id and we can't assume the root's id is 0).
6731         * domain-internals.h: Change the function prototype to match.
6732         * icall.c: Change the icall table for AppDomain.
6733
6734 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
6735
6736         * locales.c (string_invariant_compare_char): Only compute
6737         GUnicodeTypes in the case where we need them.  Test for ordinality
6738         first and return if so.
6739
6740         From the commit:
6741
6742                 /*
6743                  * FIXME: here we must use the information from c1type and c2type
6744                  * to find out the proper collation, even on the InvariantCulture, the
6745                  * sorting is not done by computing the unicode values, but their
6746                  * actual sort order.
6747                  */
6748
6749 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6750
6751         * loader.c: for P/Invoke methods, allow the "Internal" shared
6752         library name to refer to the calling process symbol namespace.
6753
6754 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
6755
6756         * Makefile.am: Add the security manager to the build.
6757         * security-manager.c|h: New. Initialization of the security manager.
6758
6759 2005-01-07  Dick Porter  <dick@ximian.com>
6760
6761         * threads.c: 
6762         * monitor.c: Update thread state during Monitor and WaitHandle
6763         waits.  Fixes bug 71031.
6764
6765 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
6766
6767         * reflection.c (property_encode_signature): Correctly handle when the
6768         property has no methods.
6769
6770 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
6771
6772         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
6773         
6774         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
6775         fields from mb, not rmb. Fixes #71017.
6776
6777         * marshal.c (emit_ptr_to_str_conv): Add support for 
6778         ByValTStr -> string conversion. Fixes #71015.
6779
6780         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
6781
6782         * mempool.c (mono_mempool_contains_addr): New helper function.
6783
6784 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6785
6786         * metadata.c (mono_metadata_compute_size): Fix size calculation of
6787         HasSematics encoded fields.
6788         
6789         * metadata.c (mono_type_to_unmanaged): Improve error message for 
6790         invalid string marshalling.
6791
6792         * metadata.c: Fix warnings.
6793         
6794 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6795
6796         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
6797         profiler support.
6798
6799 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6800
6801         * domain.c object.c domain-internals.h: Revert part of r38077 since the
6802         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
6803         tests.
6804
6805 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
6806
6807         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
6808         so methods containing these can be AOTed.
6809
6810 2005-01-03  Martin Baulig  <martin@ximian.com>
6811
6812         * loader.c (find_method): Removed the hack for generic instances.
6813         (method_from_memberref): If our parent is a generic instance, pass
6814         its generic type definition to find_method() and then inflate the
6815         method.
6816         (mono_get_method_constrained): Pass the generic type definition to
6817         find_method() and inflate the method later.
6818
6819         * class-internals.h (MonoStats): Added `generic_class_count'.
6820
6821         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
6822         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
6823
6824         * reflection.c (mono_custom_attrs_from_params): Don't ignore
6825         generic type definitions.
6826
6827 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
6828
6829         * loader.c icall.c: Fix warnings.
6830
6831 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
6832
6833         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
6834         blittable types. Fixes #70864.
6835
6836 2004-12-29  Martin Baulig  <martin@ximian.com>
6837
6838         * icall.c
6839         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
6840
6841         * reflection.c (mono_method_get_object): Create a
6842         "System.Reflection.MonoGenericMethod" for inflated methods; don't
6843         call mono_get_inflated_method().
6844
6845         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
6846
6847 2004-12-27  Martin Baulig  <martin@ximian.com>
6848
6849         * class-internals.h (MonoMethod): Added `is_inflated' flag.
6850         (MonoMethodInflated): Added `inflated' field.
6851
6852         * class.c (mono_class_inflate_generic_method): Don't really
6853         inflate the method here; just set the `is_inflated' flag in the
6854         MonoMethod.
6855         (mono_class_get_inflated_method): Actually inflate the method here
6856         if it's not already inflated; we use the MonoMethodInflated's new
6857         `inflated' field as a cache.
6858
6859 2004-12-26  Martin Baulig  <martin@ximian.com>
6860
6861         * class.c
6862         (inflate_generic_class): Moved some code out of inflate_generic_type().
6863         (mono_class_inflate_generic_method): If we're already inflated,
6864         inflate the context and use the declaring method; ie. make sure
6865         the declaring method of an inflated method is always the generic
6866         method definition.
6867         (mono_class_create_from_typedef): Create
6868         `class->generic_container->context->gclass'.
6869
6870 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
6871
6872         * metadata-internals.h, marshal.c, reflection.c: More
6873         MonoGHashTable->GHashTable.
6874
6875         * domain-internals.h, class.c: Change MonoGHashTable's into
6876         GHashTables for some cases where no gc stuff is used
6877
6878         All users: update apis
6879
6880 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
6881
6882         * metadata.c (builtin_types): Make this `const'. Makes this get
6883         put into the shareable section.
6884         (mono_metadata_init): Casts to make gcc happy.
6885
6886 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
6887
6888         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
6889
6890 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
6891
6892         * icall.c: Added an internal call to retrieve the position and length
6893         of assembly-level declarative security attributes (RequestMinimum, 
6894         RequestOptional and RequestRefuse). This is used by the Assembly class
6895         to re-create the corresponding permission sets.
6896
6897 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
6898
6899         * marshal.c: fix the stelemref wrapper to be type correct
6900         (and faster).
6901
6902 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6903
6904         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
6905         to do key & 0x7fffffff. Hashtable already does this. It just
6906         results in longer code.
6907
6908 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
6909
6910         * appdomain.c: Bump corlib version.
6911         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
6912         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
6913         * reflection.c|h: Add functions to get declarative security infos
6914         (blob position and length) for assemblies, classes and methods.
6915
6916 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
6917
6918         * reflection.c: sort the constant table (bug #70693).
6919
6920 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
6921
6922         * object-internals.h, threads.c, domain.c: add accessors for
6923         the MonoThread and MonoDomain tls keys.
6924
6925 2004-12-18  Martin Baulig  <martin@ximian.com>
6926
6927         * class.c (inflate_generic_type): If we're inflating a generic
6928         instance, set `ngclass->context->container = context->container';
6929         ie. the container we inflated into.
6930
6931         * metadata.c (mono_metadata_parse_generic_param): Reflect above
6932         inflate_generic_type() changes.
6933
6934 2004-12-17  Martin Baulig  <martin@ximian.com>
6935
6936         * class-internals.h
6937         (MonoGenericClass): Replaced `MonoType *generic_type' with
6938         `MonoClass *generic_class'.  Removed `dynamic_info'; if
6939         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
6940         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
6941
6942 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
6943
6944         * exception.c (mono_exception_from_token): New helper function.
6945
6946 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
6947
6948         * assembly.c (mono_assembly_load_with_partial_name): Call 
6949         mono_assembly_loaded before invoking the preload hooks. Fixes
6950         #70564.
6951
6952         * object-internals.h (MonoThread): Change culture_info and 
6953         ui_culture_info into an array.
6954
6955         * threads.c: Cache culture info objects from more than one appdomain.
6956
6957         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
6958         current UI culture.
6959
6960 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
6961
6962         * threads.h threads.c appdomain.c: Clear the culture_info field of
6963         all threads during unloading if they point to an object in the dying
6964         appdomain.
6965
6966 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
6967
6968         * culture-info.h (TextInfoEntry): New struct
6969         * object-internals.h: sync with managed
6970         * locales.c: fill the `text_info_data' field
6971         * culture-info-tables.h: update
6972
6973 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
6974
6975         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
6976         collector.
6977
6978 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
6979
6980         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
6981         (ves_icall_ModuleBuilder_getMethodToken): Ditto
6982
6983 2004-12-12  Martin Baulig  <martin@ximian.com>
6984
6985         * mono-debug-debugger.c (write_type): If we're an enum and the
6986         builtin types have already been initialized, call mono_class_init().
6987
6988 2004-12-11  Martin Baulig  <martin@ximian.com>
6989
6990         * metadata.c (mono_metadata_load_generic_params): Added
6991         `MonoGenericContainer *parent_container' argument; automatically
6992         compute `container->is_method'; pass the correct owner to
6993         get_constraints().      
6994
6995         * reflection.c (compare_genericparam): Sort the GenericParam table
6996         according to increasing owners. 
6997
6998 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
6999
7000         * profiler.c: allow disabling the default profiler.
7001
7002 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
7003
7004         * decimal.c, icall.c: allow disabling System.Decimal support.
7005
7006 2004-12-09  Marek Safar <marek.safar@seznam.cz>
7007
7008         * reflection.c: Add support for null attribute arguments.
7009
7010 2004-12-09  Martin Baulig  <martin@ximian.com>
7011
7012         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
7013         names to get rid of compiler warnings.
7014
7015 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
7016
7017         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
7018         mono_marshal_load_type_info (). Fixes #69625.
7019         (mono_marshal_get_ptr_to_struct): Likewise.
7020
7021 2004-12-08  Martin Baulig  <martin@ximian.com>
7022
7023         * mono-debug.h: Bumped version number to 47.
7024
7025         * mono-debug-debugger.c
7026         (mono_debugger_event_handler, mono_debugger_event): Take two
7027         guint64 arguments insteed of a gpointer and a guint32.  
7028
7029 2004-12-08  Martin Baulig  <martin@ximian.com>
7030
7031         * debug-mono-symfile.h
7032         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
7033         `address' to `native_offset'.
7034
7035 2004-12-08  Martin Baulig  <martin@ximian.com>
7036
7037         * class.c (mono_class_create_from_typespec): Only inflate if we
7038         either have `context->gclass' or `context->gmethod'.
7039
7040 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
7041
7042         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
7043
7044         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
7045
7046         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
7047
7048         * reflection.c (mono_assembly_get_object): Remove the workaround put
7049         in for the release.
7050         
7051         * appdomain.c: Use the corlib_internal field from MonoAssembly.
7052
7053         * appdomain.c: Bump corlib version.
7054
7055         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
7056         be visible in other appdomains.
7057
7058 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
7059
7060         * threads.c: Interlocked inc and dec for longs were messed up,
7061         use a KISS based impl for this. Fixes 70234
7062
7063 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
7064
7065         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
7066
7067 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7068
7069         * icall.c: fix to follow policy not to allow struct
7070         arguments in icalls.
7071
7072 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7073
7074         * process.c: make the patch that handles spaces in file paths work
7075         on mono/windows too.
7076
7077 2004-12-06  Martin Baulig  <martin@ximian.com>
7078
7079         * class.c (mono_class_create_generic): Call
7080         mono_class_setup_supertypes() if we're dynamic.
7081         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
7082
7083 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
7084
7085         * object-internals.h: Add new fields to MonoThread.
7086
7087         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7088
7089         * icall.c threads-types.h threads.c: Add new icalls.
7090
7091         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
7092
7093         * object-internals.h (MonoReflectionAssembly): Sync object layout with
7094         managed side.
7095
7096         * appdomain.c: Bump corlib version.
7097
7098         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
7099         internal assemblies. Fixes #69181.
7100
7101 2004-12-05  Martin Baulig  <martin@ximian.com>
7102
7103         * class.c (mono_class_inflate_generic_signature): Make this a
7104         no-op if `context' is NULL or we don't have any type parameters;
7105         also copy `sentinelpos'.        
7106
7107 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
7108
7109         * image.c: Add unbox_wrapper_cache.
7110
7111         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
7112
7113         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
7114         function generator.
7115         
7116         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
7117         Fixes #70173.
7118
7119         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
7120         
7121 2004-12-04  Martin Baulig  <martin@ximian.com>
7122
7123         * loader.c (mono_method_get_signature_full): New public function;
7124         like mono_method_get_signature(), but with an additional
7125         `MonoGenericContext *' argument.
7126
7127         * class.c (mono_class_inflate_generic_signature): Formerly known
7128         as inflate_generic_signature(); make this public.
7129
7130 2004-12-04  Martin Baulig  <martin@ximian.com>
7131
7132         * metadata.c
7133         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
7134         instead of a `MonoGenericContainer *'.  
7135         (mono_metadata_parse_array_full): Likewise.
7136         (mono_metadata_parse_signature_full): Likewise.
7137         (mono_metadata_parse_method_signature_full): Likewise.
7138         (mono_metadata_parse_generic_inst): Likewise.
7139         (mono_metadata_parse_generic_param): Likewise.
7140         (mono_metadata_parse_mh_full): Likewise.
7141         (mono_type_create_from_typespec_full): Likewise.
7142
7143 2004-12-03  Martin Baulig  <martin@ximian.com>
7144
7145         * class-internals.h (MonoGenericContainer): Replaced the
7146         `MonoGenericContext * pointer with a `MonoGenericContext'
7147         structure and made it the first element.
7148
7149 2004-12-03  Martin Baulig  <martin@ximian.com>
7150
7151         * class.c
7152         (inflate_generic_type): Set the `context->container' when creating
7153         a new MonoGenericContext.
7154         (mono_class_inflate_generic_method): Likewise.
7155         (mono_class_create_from_typespec): Just use `context->container'
7156         to get the container.
7157
7158         * loader.c (method_from_methodspec): Set `context->parent' from
7159         `context->container' - and if that's a method container, use its
7160         parent.  Also set the `context->container' when creating a new
7161         MonoGenericContext.
7162         (mono_get_method_from_token): Use just `context->container' to get
7163         the container.
7164
7165         * metadata.c (do_mono_metadata_parse_generic_class): Also set
7166         `gclass->context->container'.
7167
7168         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
7169         the `context->container' when creating a new MonoGenericContext.
7170
7171 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
7172
7173         * reflection.c (compare_genericparam): Sort params with identical
7174         owner by their number. Fixes gen-111 on sparc.
7175
7176 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
7177
7178         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
7179         around the domain changes.
7180
7181         * appdomain.c (mono_domain_unload): Handle the case when the thread
7182         calling Unload is itself being aborted during unloading. Fixes #70022.
7183
7184         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
7185
7186         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
7187         checkpoint_func as an icall so it gets a wrapper.
7188         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
7189         in the cross-appdomain wrappers too.
7190
7191         * threads.c (mono_thread_has_appdomain_ref): Make this public.
7192
7193         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
7194
7195         * reflection.c: Fix some memory leaks.
7196         
7197 2004-12-02  Martin Baulig  <martin@ximian.com>
7198
7199         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
7200
7201         * metadata.c (generic_class_cache): New static hashtable.
7202         (mono_metadata_lookup_generic_class): New public method.
7203
7204 2004-12-02  Martin Baulig  <martin@ximian.com>
7205
7206         * class.c (mono_class_create_from_typedef): Call
7207         mono_class_setup_parent() and mono_class_create_mono_type() before
7208         parsing the interfaces.
7209
7210 2004-12-02  Martin Baulig  <martin@ximian.com>
7211
7212         * metadata.c (generic_inst_cache): New static hashtable.
7213         (mono_metadata_lookup_generic_inst): New public function.
7214         (mono_metadata_inflate_generic_inst): New public function.
7215         (mono_metadata_parse_generic_inst): New public function.
7216         (do_mono_metadata_parse_generic_class): Use the new
7217         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
7218         since this'll also use the cache.
7219
7220         * reflection.c (mono_reflection_bind_generic_method_parameters):
7221         Use mono_metadata_lookup_generic_inst() to use the new cache.
7222
7223         * class.c (inflate_mono_type): Use
7224         mono_metadata_inflate_generic_inst() to inflate a generic
7225         instance; this'll also use the new cache.
7226
7227         * loader.c (method_from_methodspec): Use
7228         mono_metadata_parse_generic_inst() and
7229         mono_metadata_inflate_generic_inst() rather than parsing it
7230         manually, so we can use the new cache.
7231
7232 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
7233
7234         * threads.c (wait_for_tids): Do not incorrectly free threads when 
7235         the wait times out.
7236
7237 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7238
7239         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
7240         iter->args based on whether parameters are passed in registers (i.e.
7241         MONO_ARCH_REGPARMS is defined)
7242
7243 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
7244
7245         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
7246         the exception message. Fixes #70070.
7247         (method_from_methodspec): Fix warnings.
7248
7249 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7250
7251         * process.c: (complete_path) return the path quoted
7252
7253 2004-12-01  Martin Baulig  <martin@ximian.com>
7254
7255         * class-internals.h (MonoGenericInst): New structure.
7256         (MonoGenericClass): Replaced `type_argc', `type_argv' and
7257         `is_open' with `MonoGenericInst *inst'.
7258         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
7259         `is_open' with `MonoGenericInst *inst'.
7260
7261 2004-11-30  Martin Baulig  <martin@ximian.com>
7262
7263         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
7264
7265         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
7266         to `generic_class_cache'.
7267
7268         * metadata.c
7269         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
7270         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
7271         (mono_generic_inst_is_valuetype): Renamed to
7272         mono_generic_class_is_valuetype().
7273
7274         * class-internals.h
7275         (MonoGenericInst): Renamed to MonoGenericClass.
7276         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
7277         (MonoClass): Renamed `generic_inst' to `generic_class'.
7278         (MonoGenericContext): Renamed `ginst' to `gclass'.
7279
7280         * object-internals.h
7281         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
7282
7283         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
7284         mono_reflection_generic_class_initialize().
7285
7286         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
7287         now known as "System.Reflection.MonoGenericClass".
7288         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
7289
7290 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
7291
7292         * class-internals.h: Added a flag field to MonoClass to cache the
7293         declarative security attributes actions associated with the class.
7294         * domain-internals.h: Added booleans to MonoJitInfo to cache the
7295         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
7296         applicable to the JITted method.
7297         * reflection.c|h: Added functions to extract (as flags) which security
7298         actions are available (declaratively) for a method, class or assembly.
7299         * metadata.c|h: Added functions to search the declarative security
7300         table in the metadata.
7301         
7302 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
7303
7304         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
7305         EXPORTEDTYPES are already in the class name cache, so there is no
7306         need to add extra code here to look at them. Just removes a bit of
7307         cruft.
7308
7309         (ves_icall_System_Environment_get_TickCount): No need for #if
7310         WINDOWS. We already have the code in io-layer.
7311
7312 2004-11-28  Martin Baulig  <martin@ximian.com>
7313
7314         * loader.c
7315         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
7316         Fixes gen-112.cs.
7317
7318 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
7319
7320         * assembly.c (do_mono_assembly_open): Instead of having a
7321         conditional WITH_BUNDLE, incorporate support for bundles here, by
7322         having a global `bundles' variable holding a pointer to the actual
7323         bundles. 
7324
7325         (mono_register_bundled_assemblies): New API call used by the
7326         bundle code. 
7327
7328         See mkbundle.1 for details.
7329         
7330 2004-11-27  Martin Baulig  <martin@ximian.com>
7331
7332         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
7333         the vtable for generic methods.
7334
7335 2004-11-26  Martin Baulig  <martin@ximian.com>
7336
7337         * metadata.c
7338         (mono_metadata_generic_method_hash): New public function.
7339         (mono_metadata_generic_method_equal): Likewise.
7340
7341         * class-internals.h
7342         (MonoGenericContainer): Added `GHashTable *method_hash'.
7343
7344         * reflection.c (ReflectionMethodBuilder): Added
7345         `MonoGenericContainer *generic_container'.
7346         (reflection_methodbuilder_to_mono_method): Don't create a new
7347         MonoGenericContainer each time we're called.
7348         (mono_reflection_bind_generic_method_parameters): Use
7349         `container->method_hash' to cache the results so we don't create a
7350         different method if we're called several times with the same
7351         arguments.
7352
7353         * loader.c (method_from_methodspec): Use the new
7354         `container->method_hash' here, too.
7355
7356 2004-11-26  Martin Baulig  <martin@ximian.com>
7357
7358         * class.c (inflate_generic_signature): Correctly compute
7359         `res->has_type_parameters'.
7360         (mono_class_vtable): Use the `has_type_parameters' flag to
7361         determine whether we're a generic method.
7362
7363         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
7364
7365 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
7366
7367         * object.c (mono_runtime_run_main): Fix a small memory leak.
7368
7369 2004-11-25  Martin Baulig  <martin@ximian.com>
7370
7371         * class.c (set_generic_param_owner): Fixed the loop.
7372
7373 2004-11-25  Martin Baulig  <martin@ximian.com>
7374
7375         * object.c (mono_class_vtable): Don't create any JIT wrappers for
7376         generic methods.
7377
7378 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
7379
7380         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
7381         names. Fixes #69787.
7382
7383 2004-11-24  Martin Baulig  <martin@ximian.com>
7384
7385         * class.c (mono_class_create_generic_2): If we don't have a
7386         `ginst->parent', inflate `gklass->parent' to get our parent.
7387
7388 2004-11-24  Martin Baulig  <martin@ximian.com>
7389
7390         * reflection.c (compare_genericparam): Correctly sort the
7391         GenericParam table; fixes #69779.
7392
7393 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
7394
7395         * reflection.c: When writing a PE file, don't create a huge
7396         buffer in memory. Just write the arrays we have to the file.
7397         This reduces memory usage.
7398
7399         * metadata-internals.h: MonoDynamicStream pefile is no longer used
7400         globally.
7401
7402 2004-11-17  Martin Baulig  <martin@ximian.com>
7403
7404         * class.c (mono_class_init): Don't setup `class->parent' for
7405         dynamic instances; moved this to mono_class_generic_2().
7406         (mono_class_create_generic): Also set `klass->inited' for dynamic
7407         generic instances.
7408         (mono_class_create_generic_2): Don't do anything for dynamic
7409         generic instances.  Set `klass->parent' here and also call
7410         mono_class_setup_parent() here. 
7411
7412         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
7413         `MonoType *parent' argument; set `ginst->parent' before calling
7414         mono_class_create_generic_2(), so we set the correct parent.
7415
7416 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
7417
7418         * reflection.c: allow getting attributes from ModuleBuilder
7419         (used by ikvm).
7420
7421 2004-11-17  Martin Baulig  <martin@ximian.com>
7422
7423         * class.c (mono_class_create_from_typedef): If a type parameter is
7424         inherited from an outer class, set its owner to that class.
7425
7426 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
7427
7428         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
7429           for (int*) written size. This fixes bug #69592.
7430
7431 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
7432
7433         * icall.c: Added IsAuthenticodePresnet internal call.
7434         * image.c|h: New function that check a MonoImage for an Authenticode
7435         signature in the certificate PE data directory.
7436         * security.c|h: New internal call to ask the runtime if an 
7437         Authenticode signature seems referenced in the PE header.
7438
7439 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
7440
7441         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
7442
7443         * reflection.c (mono_image_create_pefile): Free the assembly streams
7444         after writing out the assembly file.
7445
7446         * object.c (mono_runtime_run_main): Fix small memory leak.
7447
7448         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
7449         property access modifiers. Fixes #69389.
7450
7451 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
7452
7453         * domain.c, object.c, object-internals.h, domain-internals.h,
7454         object.h, marshal.c: keep dynamic code info per domain.
7455
7456 2004-11-15  Martin Baulig  <martin@ximian.com>
7457
7458         * class.c (mono_type_get_name_recurse): Put type arguments in
7459         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
7460         see bug #68387.
7461
7462 2004-11-15  Martin Baulig  <martin@ximian.com>
7463
7464         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7465         (mono_class_setup_vtable): When computing `the_cname' for a
7466         generic instance, don't include the namespace since we'd otherwise
7467         add it twice.
7468
7469 2004-11-15  Martin Baulig  <martin@ximian.com>
7470
7471         * class.c (mono_class_create_generic): Changed return type to void.
7472         (mono_class_create_generic_2): New public function; setup
7473         `class->method', `class->field' and `class->interfaces' here
7474         instead of in mono_class_init().
7475
7476         * class.h (mono_class_create_generic): Moved to class-internals.h.
7477
7478 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
7479
7480         * reflection.c (mono_image_create_pefile): take a file HANDLE.
7481         rather than writing to memory, write to this file. Right now,
7482         we are just writting into a buffer, and copying that. However
7483         we can avoid the buffer later.
7484
7485         (mono_dynamic_stream_reset): new function
7486
7487         * icall.c, object-internals.h: update for the above.
7488
7489 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
7490
7491         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7492         have been using gc'd memory. First it is slower, unlikely
7493         the comment in the source code said, secondly, it increases
7494         our footprint to do it in the gc.
7495
7496         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7497         the method so that it does not have to copy to managed code.
7498
7499 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
7500
7501         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7502
7503 2004-11-12  Martin Baulig  <martin@localhost>
7504
7505         * reflection.c (mono_image_create_token): Allow generic method
7506         definitions here, since they may appear in an `.override'; see
7507         gen-98/gen-99 for an example.
7508
7509 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
7510
7511         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7512         #69365.
7513
7514         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7515         descriptive.
7516
7517 2004-11-11  Martin Baulig  <martin@ximian.com>
7518
7519         * class.c (mono_class_setup_vtable): In an explicit interface
7520         implementation, the method name now includes the arity.
7521
7522 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
7523
7524         * object.c (mono_array_full_copy): Fix warning.
7525
7526 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
7527
7528         * appdomain.c: Removed look_for_method_by_name(). Use the new method
7529         mono_class_get_method_from_name() instead.
7530         
7531         * class-internals.h: Added two new types of wrappers. 
7532         Added MonoRemotingTarget enum. Added new trampoline function type, which
7533         takes an additional MonoRemotingTarget value as parameter, so it is
7534         possible to request a trampoline for a specific target.
7535         
7536         * class.c: Added new mono_class_get_method_from_name() method.
7537         
7538         * class.h: In MonoRemoteClass, we can have now to vtables, one for
7539         general remoting sinks and one specific for cross domain calls.
7540         
7541         * debug-helpers.c: Added new wrapper names.
7542         
7543         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
7544         of a remote class.
7545         
7546         * image.c: Porperly delete value objects form the remoting invoke hashtable.
7547         
7548         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
7549         with several other methods (mono_marshal_get_xappdomain_dispatch,
7550         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
7551         and others) can generate a fast remoting wrapper for cross domain calls.
7552         More information can be found in docs/remoting.
7553         Other changes: Removed mono_find_method_by_name, and used
7554         mono_class_get_method_from_name instead.
7555         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
7556         is stored in the remoting invoke hashtable.
7557         
7558         * marshal.h: published the new method for getting the xdomain wrapper,
7559         and also added a method for getting the adequate wrapper for a given
7560         method and target.
7561         
7562         * object-internals.h, object.c: Added a couple of methods for capying and
7563         cloning arrays.
7564         Modified mono_install_remoting_trampoline, which takes the new remoting
7565         trampoline that has a remoting target as parameter.
7566         mono_class_proxy_vtable now also takes a remoting target as parameter, and
7567         will return the most suitable vtable for the target.
7568         Added mono_remote_class_vtable, which returns the vtable of a remote class
7569         (which can be the normal remoting vtable or the xdomain vtable).
7570         
7571         * threads.c: the xdomain invoke and dispatch wrappers must also be
7572         protected against interruptions.
7573
7574 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7575
7576         * icall.c: use memmove in BlockCopyInternal when the source and
7577         destination arrays are the same.
7578
7579 2004-11-09  Martin Baulig  <martin@ximian.com>
7580
7581         * class-internals.h (MonoGenericContainer): Removed `method' and
7582         `signature', replaced them with `is_method' and `is_signature'
7583         flags.  Added `context'.
7584
7585         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
7586         instead of a `MonoGenericContainer *'.
7587
7588         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
7589         for dynamic type parameters.
7590         (mono_metadata_load_generic_params): Setup `container->context'.
7591
7592         * reflection.c (mono_reflection_setup_generic_class): Setup
7593         `tb->generic_container->context'.
7594         (do_mono_reflection_bind_generic_parameters): Use
7595         mono_class_inflate_generic_type() to correctly inflate types,
7596         rather than using our own hack just for MONO_TYPE_VAR.
7597
7598 2004-11-09  Martin Baulig  <martin@ximian.com>
7599
7600         * class.c (mono_class_inflate_generic_method): Small fix; don't
7601         crash here.
7602
7603         * icall.c
7604         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
7605         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
7606         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
7607         (ves_icall_Type_BindGenericParameters): Likewise.
7608         (ves_icall_Type_get_IsGenericInstance): Likewise.
7609         (ves_icall_Type_GetGenericParameterPosition): Likewise.
7610         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
7611         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
7612         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
7613
7614 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
7615
7616         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
7617         assembly versions and public key tokens. Fixes #69113.
7618
7619 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
7620
7621         * metadata.c: fix bug introduced with the type cache changes
7622         on 2004-11-06.
7623
7624 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
7625
7626         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
7627         the MonoClass pointer instead of the token in exception clauses.
7628         * reflection.c: updates for the above and make the code not depend
7629         on the structure of MonoExceptionClause.
7630
7631 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
7632
7633         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
7634         Add support for dynamic assemblies. Fixes #69114.
7635
7636         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
7637
7638 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
7639
7640         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
7641         since most only those methods use it. the code member of
7642         MonoMethodPInvoke was dead, so that can be removed too. Also,
7643         remove inline_count (again, not used), and move slot so that it
7644         can share bits with some other flags. This saves 8 bytes in the
7645         structure and gives us about 50 kb back for mcs helloworld.cs
7646
7647         * *.[ch]: Do naming changes for the above.
7648
7649         * loader.c (mono_method_get_header): Lazily init the header
7650         on first access.
7651         (mono_get_method_from_token): don't init the header here
7652         (mono_free_method): the header may never be allocated
7653
7654         Overall, this saves 150 kb of unmanaged allocations
7655         for mcs helloworld.cs. That accounts for 10% of the unmanaged
7656         memory at runtime.
7657         
7658         * loader.c, loader.h (mono_method_get_header): new accessor.
7659
7660         * *.[ch]: use the above method. Prepares us to lazily load
7661         the header.
7662
7663         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
7664         three warnings, which are actual bugs (see 69206).
7665
7666         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
7667         unused. Saves a cool 4 bytes / method.
7668
7669 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
7670
7671         * metadata.c (builtin_types): Add types for System.Object here.
7672         (mono_metadata_parse_type_full): Cache MonoType*'s that are
7673         for a class or valuetype from klass->this_arg or klass->byval_arg.
7674
7675         On mcs for a hello world, this gets us down from 21836 MonoType's
7676         to 14560.
7677
7678         (mono_metadata_free_type): Account for the above change.
7679
7680 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
7681
7682         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
7683         exception instead of asserting if name is null.
7684         (ves_icall_System_AppDomain_GetData): Ditto.
7685
7686 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
7687
7688         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
7689         EnumBuilder.
7690
7691         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
7692         Return NULL when the domain does not have entry_assembly set.
7693
7694         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
7695         Add a 'resource_modules' argument.
7696         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
7697
7698         * reflection.c (mono_reflection_create_runtime_class): Move setting
7699         of wastypebuilder here, so mono_get_type_object () returns a MonoType
7700         for enums too.
7701
7702         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
7703         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
7704         Throw an ArgumentNullException if 'ptr' is null.
7705
7706         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
7707         assemblies here. Fixes #69020.
7708
7709 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
7710
7711         * reflection.c (build_compressed_metadata): Fix the previous patch for
7712         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
7713         the stack.
7714
7715 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
7716
7717         * assembly.c (mono_assembly_names_equal): Allow a match if one of
7718         the cultures is false. Fixes #69090.
7719
7720         * reflection.c (build_compressed_metadata): Fix invalid memory read 
7721         detected by valgrind.
7722         
7723         * reflection.c (mono_reflection_get_type): Avoid triggering a 
7724         TypeResolve multiple times for the same type. Fixes #65577.
7725
7726 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
7727
7728         * marshal.c: Avoid using ldftn to call managed functions. It is
7729         much slower than just a call.
7730
7731         * reflection.c (mono_module_get_object): free the basename we
7732         allocate here from glib.
7733         
7734         * reflection.c (ensure_runtime_vtable): make sure to free
7735         overrides.  Also, we were allocating an array of MonoMethod not an
7736         array of MonoMethod*.
7737
7738         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
7739
7740         * image.c (mono_image_close): free image->guid here.
7741
7742 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
7743
7744         * reflection.c: Fix some spec conformance issues with the PE file
7745         structures so mcs compiled apps run on the Net 2.0 beta.
7746
7747 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
7748
7749         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
7750         Implement this. Fixes #67264.
7751
7752         * debug-helpers.h debug-helpers.c marshal.c: Move 
7753         mono_find_method_by_name to debug-helpers.c.
7754
7755 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
7756
7757         * object.c (mono_release_type_locks): type_initialization_hash is
7758         a GHashTable.
7759
7760         * reflection.c object.c object-internals.h: Fix warnings.
7761
7762         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
7763         without accessors. Fixes #61561.
7764
7765         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
7766         application base from the root domain if not set. Fixes #65641.
7767         (mono_runtime_init): Fix warning.
7768
7769 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7770
7771         * appdomain.c: call mono_thread_pool_init.
7772         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
7773         of worker threads based on the number of CPUs and the environment
7774         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
7775         for non-windows (windows) systems.
7776
7777 2004-10-27  Chris Toshok  <toshok@ximian.com>
7778
7779         * mono-debug-debugger.c (write_class): don't call mono_class_init
7780         here, as even with the check for (!klass->init_pending), we get
7781         into a situation where we're hitting cycles in class
7782         initialization.  Fixes #68816.
7783
7784 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
7785
7786         * image.c: Avoid overwriting values in the loaded_images_hash when an
7787         assembly is loaded multiple times. Fixes #61152.
7788
7789         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
7790         so multiple satellite assemblies for the same name can be loaded.
7791         Fixes #68259.
7792
7793         * mono_domain_assembly_preload: Actually return the loaded assembly, 
7794         not NULL.
7795
7796         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
7797         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
7798
7799         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
7800         pending finalizers are not invoked after the appdomain has been 
7801         unloaded. Fixes #67862.
7802
7803 2004-10-22  Martin Baulig  <martin@ximian.com>
7804
7805         * mono-debug-debugger.c
7806         (mono_debugger_runtime_invoke): Don't box valuetypes.
7807
7808 2004-10-22  Chris Toshok  <toshok@ximian.com>
7809
7810         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
7811         don't hide private methods.
7812
7813 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
7814
7815         * icall.c: Allows the runtime to "share" (when known) the public key
7816         token of an assembly. This avoid the need to recalculate the token 
7817         (from the public key) in managed code.
7818
7819 2004-10-21  Chris Toshok  <toshok@ximian.com>
7820
7821         * debug-helpers.c (append_class_name): argh, revert last patch.
7822         
7823 2004-10-21  Chris Toshok  <toshok@ximian.com>
7824
7825         * debug-helpers.c (append_class_name): use '+' as the delimiter,
7826         not '/', so that it matches what the debugger uses to look up
7827         methods.
7828
7829 2004-10-21  Martin Baulig  <martin@ximian.com>
7830
7831         * mono-debug-debugger.c (mono_debugger_throw_exception): New
7832         public method; this is called each time an exception is thrown and
7833         allows the debugger to use exception catch points.
7834
7835 2004-10-21  Martin Baulig  <martin@ximian.com>
7836
7837         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
7838         the stack pointer and the exception object in some struct and pass
7839         that to the debugger.
7840
7841 2004-10-21  Chris Toshok  <toshok@ximian.com>
7842
7843         * mono-debug-debugger.c (do_write_class): add instance/static
7844         event support.  We don't expose "raise" or "other" yet.
7845         (event_is_static): new method.
7846
7847 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
7848
7849         * mono-debug-debugger.c
7850         (mono_debugger_handle_exception): Remove
7851         bogus return value for fussy compilers.
7852
7853 2004-10-20  Martin Baulig  <martin@ximian.com>
7854
7855         * mono-debug-debugger.c
7856         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
7857         (mono_debugger_handled_exception): Likewise.
7858
7859 2004-10-20  Martin Baulig  <martin@ximian.com>
7860
7861         * mono-debug-debugger.h (MonoDebuggerEvent): Added
7862         MONO_DEBUGGER_EVENT_EXCEPTION.
7863
7864         * mono-debug-debugger.c (mono_debugger_handle_exception): New
7865         public function to send the debugger a notification for an
7866         exception and inform it about a catch/finally clause.
7867
7868 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
7869
7870         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
7871         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
7872         fix 2.95 build. 
7873
7874         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
7875
7876 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
7877
7878         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
7879         marshalled as [In,Out]. Fixes #58325.
7880
7881 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
7882
7883         * reflection.c (mono_method_body_get_object): Implement some fields.
7884
7885 2004-10-12  Martin Baulig  <martin@ximian.com>
7886
7887         * reflection.c (mono_reflection_bind_generic_parameters): Small
7888         fix, correctly retrieve our parent from a generic instance.
7889
7890 2004-10-12  Martin Baulig  <martin@ximian.com>
7891
7892         * metadata.c (mono_metadata_generic_param_equal): We always have
7893         an owner.
7894
7895         * class.c
7896         (mono_class_from_generic_parameter): We need to have an owner.
7897         (my_mono_class_from_generic_parameter): Likewise.
7898
7899         * reflection.c (mono_reflection_setup_generic_class): Renamed to
7900         mono_reflection_create_generic_class() and added a new
7901         mono_reflection_setup_generic_class().  
7902         (mono_reflection_initialize_generic_param): If we're a nested
7903         generic type and inherited from the containing class, set our
7904         owner to the outer class.
7905
7906 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
7907
7908         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
7909
7910         * reflection.c (mono_method_body_get_object): New function to create
7911         a MethodBody object.
7912
7913         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
7914
7915 2004-10-11  Martin Baulig  <martin@ximian.com>
7916
7917         * metadata.c (_mono_metadata_type_equal): Renamed to
7918         do_mono_metadata_type_equal() and made static.
7919
7920 2004-10-11  Martin Baulig  <martin@ximian.com>
7921
7922         * appdomain.c: Bump corlib version number to 28.
7923
7924 2004-10-10  Martin Baulig  <martin@ximian.com>
7925
7926         * class-internals.h
7927         (MonoGenericInst): Added `MonoGenericContainer *container'.
7928         (MonoGenericMethod): Likewise.
7929         (MonoGenericContext): Likewise.
7930         (MonoGenericParam): Added `MonoGenericContainer *owner'.
7931
7932         * metadata.c
7933         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
7934         (do_mono_metadata_parse_generic_inst): Likewise.
7935         (mono_metadata_parse_type_full): New public method.  This is the actual
7936         mono_metadata_parse_type() implementation - with an additional
7937         `MonoGenericContainer *' argument.
7938         (mono_metadata_parse_array_full): Likewise.
7939         (mono_metadata_parse_signature_full): Likewise.
7940         (mono_metadata_parse_method_signature_full): Likewise.
7941         (mono_metadata_parse_mh_full): Likewise.
7942         (mono_type_create_from_typespec): Likewise.
7943         (mono_metadata_interfaces_from_typedef_full): New public method;
7944         this is similar to the other _full() methods, but we take a
7945         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
7946         (mono_metadata_parse_generic_param): Take an additional
7947         `MonoGenericContainer *' argument and lookup the MonoGenericParam
7948         from that container.
7949         (mono_metadata_generic_param_equal): New static method to compare
7950         two type parameters.
7951         (_mono_metadata_type_equal): New static method; takes an
7952         additional `gboolean signature_only' argument - if true, we don't
7953         compare the owners of generic parameters.
7954         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
7955         with a TRUE argument - do a signature-only comparision.
7956
7957         * loader.c: Use the new _full() methods and pass the
7958         MonoGenericContainer to them.
7959
7960         * object-internals.h (MonoReflectionTypeBuilder): Added
7961         `MonoGenericContainer *generic_container' field.
7962         (MonoReflectionMethodBuilder): Likewise.
7963
7964 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
7965
7966         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
7967         case initial images of dynamic assemblies.
7968
7969         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
7970
7971         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
7972
7973         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
7974         length of event->other array.
7975         (typebuilder_setup_events): Ditto.
7976
7977         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
7978         'assembly_by_name' and add an 'assemblies' list.
7979
7980         * assembly.h assembly.c: Add a new search hook for determining whenever
7981         an assembly is already loaded. Use this instead of searching in the
7982         loaded_assemblies list.
7983
7984         * domain.c appdomain.c: Implement the new search hook so loaded 
7985         assemblies are now scoped by appdomain. Fixes #67727.
7986
7987 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
7988
7989         * threads.c (mono_thread_attach): Initialize synch_lock field so
7990         mono_thread_detach works again.
7991
7992         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
7993         'lib' too. Fixes #63130.
7994
7995 2004-10-06  Jackson Harper  <jackson@ximian.com>
7996
7997         * culture-info-tables.h: regenerated.
7998
7999 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
8000
8001         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
8002         implemented by other interfaces in the result. Fixes #65764.
8003         
8004         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
8005         Handle unloadable modules without crashing.
8006
8007         * image.c (load_modules): Revert the previous patch since modules must
8008         have a fixed index inside the array.
8009         
8010         * image.c (load_modules): Don't include native modules in the modules
8011         array.
8012
8013 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
8014
8015         * reflection.h: Add param_defaults field.
8016
8017         * reflection.c: Add support for parameter defaults in dynamic methods.
8018         Fixes #64595.
8019
8020         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
8021         an empty string when a type has no namespace. Fixes #64230.
8022
8023 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
8024
8025         * tabledefs.h: Added "internal" security actions to support non-CAS
8026         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
8027         Note: they do not seems to be used anymore in 2.0 (new metadata format)
8028
8029 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
8030
8031         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
8032         constructor of abstract class. Fixes #61689.
8033
8034 2004-10-04  Martin Baulig  <martin@ximian.com>
8035
8036         * class-internals.h (MonoGenericContainer): New type.
8037         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
8038         `MonoGenericContainer *generic_container'.
8039         (MonoClass): Replaced `gen_params' and `num_gen_params' with
8040         `MonoGenericContainer *generic_container'.
8041
8042         * metadata.c (mono_metadata_load_generic_params): Return a
8043         `MonoGenericContainer *' instead of a `MonoGenericParam *';
8044         removed the `num' argument.
8045
8046 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
8047
8048         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
8049         for dynamic images.
8050
8051         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
8052         machine fields.
8053
8054         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
8055
8056         * reflection.c: Save pe_kind and machine values into the generated
8057         image file.
8058
8059         * appdomain.c: Bump corlib version number.
8060
8061         * object-internals.h: Reorganize layout of LocalBuilder.
8062
8063         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
8064         New helper function.
8065
8066         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
8067         created MonoType for dynamic types. Fixes #66180.
8068
8069 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
8070
8071         * threadpool.c: the ares hashtable needs a critical section around it.
8072         this prevents some nasty segfaults
8073
8074 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
8075
8076         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
8077         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
8078         bug 67324).
8079         
8080 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
8081
8082         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
8083         
8084 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
8085
8086         * image.c: Always canonicalize image file names, to avoid loading
8087         the same assembly twice when referenced using a relative path.
8088
8089 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
8090
8091         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
8092
8093         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
8094
8095         * marshal.c: Fix warnings.
8096
8097 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
8098
8099         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
8100         attempting to marshal the delegate_trampoline as the method_addr.
8101         This patch has a static hashtable of marshalled delegates so that 
8102         we can map delegate_trampoline addresses back to delegates.  This
8103         allows a delegate passed to managed code to be passed back into native
8104         code.  Fixes #67039
8105
8106 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
8107
8108         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
8109
8110         * reflection.c (method_encode_code): Align method headers properly.
8111         Fixes #66025.
8112
8113 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
8114
8115         * marshal.c: In the runtime invoke wrapper, reset the abort
8116         exception if it is cached. This avoids the automatic rethrowal of 
8117         the exception after the catch of the wrapper. Also check for pending
8118         interruptions before calling the managed method. This is done using
8119         the new method emit_thread_force_interrupt_checkpoint, since the
8120         normal checkpoint method is ignored when running the invoke wrapper.
8121         * object.c: If the abort exception is rethrown, set the abort_exc
8122         field of the thread, so it will be rethrown aftere every catch.
8123         * threadpool.c: Only run an interruption checkpoint if what has been
8124         requested is a stop of the thread (aborts will be ignored).
8125         * threads.c: By default, a thread will now never be interrumped while
8126         running the runtime invoke wrapper (this ensures that runtime_invoke
8127         will always return to the caller if an exception pointer is provided).
8128         There is a new special method mono_thread_force_interruption_checkpoint()
8129         to force an interruption checkpoint even if running a protected
8130         wrapper, which is used by the same runtime invoke wrapper to do a check
8131         at a safe point.
8132
8133 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
8134
8135         * object.c, object-internals.h: Implemented mono_release_type_locks,
8136         which releases the cctor locks held by a thread.
8137         * threads.c, threads.h: In thread_cleanup, release cctor locks held
8138         by a thread. Added mono_thread_exit() method to be used to safely stop
8139         a thread.
8140
8141 2004-09-28  Raja R Harinath  <rharinath@novell.com>
8142
8143         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
8144         Move null check before dereference.  Avoid indexing beyond the end
8145         of the 'modules' array.
8146
8147 2004-09-28  Raja R Harinath  <rharinath@novell.com>
8148
8149         * metadata-internals.h (MonoImage): Add module_count field.
8150         * image.c (load_modules): Set image->module_count.
8151         (mono_image_load_file_for_image): Use image->module_count.
8152         * reflection.c (mono_image_load_module): Append to image->modules array 
8153         of dynamic assembly.
8154         (mono_module_get_object): Fix loop to actually increment index.
8155         Use image->module_count.
8156         * assembly.c (mono_assembly_load_references): Use image->module_count.
8157         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8158         Likewise.
8159
8160 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
8161
8162         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
8163         Avoid assert on generic types.
8164
8165 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
8166
8167         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
8168
8169         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
8170
8171         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
8172         function to convert a MarshalSpec structure to its managed counterpart.
8173
8174         * reflection.c: Fix warnings.
8175         
8176         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
8177         field.
8178
8179         * icall.c (mono_create_icall_signature): Fix build.
8180
8181 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
8182
8183         * icall.c: Add MakePointType icall.
8184
8185         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
8186         warnings.
8187
8188 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8189
8190         * threadpool.c: reuse allocated slots in the queue.
8191
8192 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
8193
8194         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
8195
8196         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
8197
8198         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
8199         previous change.
8200
8201         * tabledefs.h: Add constants for pinvoke attributes BestFit and
8202         ThrowOnUnmappableChar.
8203
8204         * icall.c (ves_icall_Type_GetPacking): New icall.
8205
8206 2004-09-24  Martin Baulig  <martin@ximian.com>
8207
8208         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
8209
8210 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8211
8212         * appdomain.c:
8213         (mono_domain_set): allow setting a domain that is being unloaded.
8214         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
8215         being unloaded.
8216
8217 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
8218
8219         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
8220         the GetCustomAttributes icall.
8221
8222 2004-09-23  Martin Baulig  <martin@ximian.com>
8223
8224         * object-internals.h (MonoReflectionGenericParam): Replaced
8225         'has_ctor_constraint', `has_reference_type' and `has_value_type'
8226         with `guint32 attrs'.
8227
8228 2004-09-23  Martin Baulig  <martin@ximian.com>
8229
8230         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
8231
8232 2004-09-23  Martin Baulig  <martin@ximian.com>
8233
8234         * object-internals.h (GenericParameterAttributes): New enum.
8235
8236 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
8237
8238         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
8239         
8240         * class.c (init_events): Fill out event->other field.
8241
8242         * class.c: Fix warnings.
8243
8244         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
8245
8246 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
8247
8248         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
8249         walk which doesn't supply the IL offset.
8250
8251 2004-09-22  Martin Baulig  <martin@ximian.com>
8252
8253         * reflection.c (mono_reflection_setup_internal_class): If we're
8254         System.ValueType, System.Object or System.Enum, set
8255         `klass->instance_size' and create the vtable.
8256         (mono_reflection_create_internal_class): If we're an enum type,
8257         get the base class from our current corlib.
8258
8259 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
8260
8261         * reflection.h (MonoResolveTokenError): New type.
8262
8263         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
8264         icall.
8265
8266         * icall.c: Add an 'error' argument to the ResolveToken icalls.
8267
8268 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
8269
8270         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
8271         Support also calling constructors, but only for already allocated objects.
8272
8273 2004-09-17  Geoff Norton <gnorton@customerdna.com>
8274
8275         * reflection.c (type_get_qualified_name): If the klass is null
8276         return the typename to avoid a NullRefEx.
8277         (encode_cattr_value): Get the qualified name of the boxed type,
8278         not the underlying enumtype.  Fixes #62984.
8279
8280 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
8281
8282         * marshal.c: Fix problems with previous checkin.
8283
8284 2004-09-21    <vargaz@freemail.hu>
8285
8286         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
8287         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
8288
8289         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
8290
8291 2004-09-21  Geoff Norton <gnorton@customerdna.com>
8292
8293         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
8294         should only return a type for pointers, arrays, and passbyref types.
8295         Fixes bug #63841.
8296
8297 2004-09-21  Martin Baulig  <martin@ximian.com>
8298
8299         * domain.c (mono_debugger_check_runtime_version): New public
8300         function.
8301
8302         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
8303
8304 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
8305
8306         * reflection.c: Added missing sort to the declarative security 
8307         attributes table. MS implementation stops seeing the attributes if the
8308         token number regress in the table (as shown by ildasm and permview).
8309
8310 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
8311
8312         * object-internals.h (MonoReflectionModule): Add 'token' field.
8313         
8314         * reflection.c (mono_reflection_get_token): Add support for Module
8315         and Assembly.
8316         (mono_module_get_object): Set 'token' field.
8317         (mono_module_file_get_object): Set 'token' field.
8318
8319         * icall.c: Add new Assembly and Module icalls.
8320
8321         * appdomain.c: Bump corlib version.
8322
8323 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
8324
8325         * loader.h loader.c class.h class.c: Add helper functions for obtaining
8326         tokens of metadata objects.
8327
8328         * reflection.h reflection.c (mono_reflection_get_token): New function
8329         to obtain the token of a metadata object.
8330
8331         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
8332
8333 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
8334
8335         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
8336         
8337         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
8338
8339 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
8340
8341         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
8342         * object-internals.h: Added 3 MonoArray* members to MonoReflection
8343         AssemblyBuilder to access the permissions set in the class lib.
8344         * reflection.c: Added security attributes encoding step in 
8345         mono_image_build_metadata.
8346         * tabledefs.h: Added new security actions defined in 2.0:
8347         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
8348
8349 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
8350
8351         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
8352         macro parameter.
8353
8354 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
8355  
8356         * locales.c: nullify the ICU_collator member of CompareInfo when it is
8357           finalized. There where random SIGSEVs at program termination, when
8358           an object being finalized was trying to do a string comparison and
8359           the current culture was already finalized.
8360  
8361 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8362
8363         * threads.c: call thread_cleanup before finishing the thread if we get
8364         there.
8365
8366 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
8367
8368         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
8369         assemblies from the parent. Fixes #65665.
8370
8371 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
8372
8373         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
8374         modifiers.
8375
8376 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
8377
8378         * reflection.h: add prototype for mono_get_dbnull_object
8379         * reflection.c: add prototypes for get_default_param_value_blobs 
8380         and mono_get_object_from_blob for fussier compilers
8381
8382 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
8383  
8384         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
8385         false deadlock checks in class initialization.
8386  
8387 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
8388
8389         * image.c (mono_image_addref): Fix comment.
8390
8391         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
8392         possible.
8393
8394 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
8395
8396         * reflection.c (mono_param_get_objects): Modified to return
8397         ParameterInfo.DefaultValue object.
8398
8399         (get_default_param_value_blobs):
8400         (mono_get_object_from_blob):
8401         (mono_get_dbnull_object): New helper routines. 
8402
8403         * object.c (mono_get_constant_value_from_blob): New helper routine
8404         carved out from get_default_field_value ()
8405
8406         * object-internals.h (mono_get_constant_value_from_blob): Added
8407         function declaration.
8408
8409 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
8410
8411         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
8412         referenced assemblies. Fixes #62135.
8413
8414         * exception.h exception.c (mono_get_exception_file_not_found2): New
8415         helper function.
8416
8417 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
8418
8419         * class.h class.c: Add mono_type_get_underlying_type ().
8420
8421 2004-09-09  Geoff Norton <gnorton@customerndna.com>
8422
8423         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
8424         Fix GetTypes() to support dynamically created assemblies.
8425
8426 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
8427
8428         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
8429         
8430         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
8431         previous patch.
8432
8433         * reflection.h reflection.c loader.c: Allow dynamic construction of
8434         pinvoke methods. Fixes #65571.
8435         
8436         * reflection.c (mono_reflection_get_type): Revert previous change since
8437         it causes regressions.
8438
8439 2004-09-08  Martin Baulig  <martin@ximian.com>
8440
8441         * class.c (class_compute_field_layout): Don't call
8442         mono_class_layout_fields() for open generic instances.
8443
8444 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
8445         * threads.c appdomain.c: fix typo in GC macro
8446
8447 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8448
8449         * threads.c: don't call mono_thread_detach() in start_wrapper(),
8450         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
8451
8452 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
8453
8454         * image.c (mono_image_close): Applied patch from 
8455         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
8456         assembly is loaded multiple times from data.
8457         
8458         * image.c (mono_image_open): Fix warning.
8459
8460 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8461
8462         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8463         once. Fixes #58334.
8464         
8465         * reflection.c (mono_reflection_create_runtime_class): Initialize
8466         klass->nested_classes. Fixes #61224.
8467
8468 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8469
8470         * threads.c: sched_yield() on exit, to allow threads to quit.
8471
8472 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8473
8474         * object.c (mono_unhandled_exception): Remove leftover debug code.
8475
8476 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
8477
8478         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8479
8480 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8481
8482         * marshal.c (emit_marshal_array): Really null terminate string arrays.
8483         
8484         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8485
8486 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8487
8488         * marshal.c (emit_marshal_array): Null terminate string arrays.
8489         
8490         * marshal.c (raise_auto_layout_exception): Fix warning.
8491
8492         * reflection.c (mono_param_get_objects): Initialize the default value
8493         with DBNull.Value, not null. Fixes #62123.
8494
8495 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
8496
8497         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8498         throw an exception with a cute explanation.
8499
8500 2004-09-06  Dick Porter  <dick@ximian.com>
8501
8502         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8503         Close the new process's thread handle, as we don't use it.  The
8504         handle stays around forever otherwise.
8505
8506 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8507
8508         * object.c (arith_overflow): Fix warning.
8509
8510         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8511         calling conventions in method refs. Fixes #65352.
8512
8513         * reflection.c: Fix warnings.
8514
8515 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8516
8517         * icall.c: Add a new icall for Array.Clear
8518
8519 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8520
8521         * object.c: When allocating an array, we have to throw
8522         an overflow exception if any of the lengths are < 0.
8523
8524 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8525
8526         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
8527         properly. Also move implementation of string array marshalling to 
8528         managed code. Fixes #42316.
8529
8530 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8531
8532         * assembly.c: provide more information when loading an assembly fails.
8533
8534 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8535
8536         * filewatcher.c: don't expect the development fam package to be
8537         installed.
8538
8539 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
8540
8541         * marshal.c: Make a copy of the signature cookie since it will be
8542         freed by the caller.
8543         
8544         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
8545
8546         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
8547
8548         * metadata.c (mono_metadata_free_marshal_spec): New function to free
8549         marshal specs.
8550
8551         * marshal.c: More refactoring.
8552         
8553         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
8554         smaller functions.
8555
8556 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
8557
8558         * object.c: In mono_message_invoke, fill the output parameter array after
8559           calling the managed method (it was done before the call). This fixes
8560           bug #59299.
8561
8562 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8563
8564         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
8565         as well.
8566
8567 2004-09-02  Martin Baulig  <martin@ximian.com>
8568
8569         * class.c (mono_class_instance_size): Don't allow generic type
8570         definitions or open generic instances.
8571         (mono_class_array_element_size): If we're a value type, call
8572         mono_class_instance_size() on the original class.
8573
8574         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
8575         handle generic instances.
8576
8577         * mono-debug-debugger.c (write_type): Handle generic instances
8578         like classes.
8579
8580 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
8581
8582         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
8583         the allocation request fails. Fixes #65089.
8584
8585         * object.c (mono_runtime_free_method): Do not call mono_free_method.
8586         
8587         * object.c (mono_runtime_free_method): New function to free a dynamic
8588         method.
8589
8590         * marshal.c (mono_delegate_free_ftnptr): New function to free the
8591         delegate trampoline.
8592
8593         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
8594         with hasthis as dynamic,
8595
8596         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
8597
8598         * domain.c (mono_jit_info_table_remove): New function to remove an
8599         entry from the jit info table.
8600
8601         * class-internals.h (MonoMethod): Add 'dynamic' field.
8602
8603         * loader.c: Fix warnings.
8604
8605 2004-09-01  Martin Baulig  <martin@ximian.com>
8606
8607         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
8608         instead of mono_debugger_lock() because the latter one is a no-op
8609         unless running in the debugger.
8610
8611 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8612
8613         * class.c (class_compute_field_layout): Classes with auto-layout or
8614         reference fields are not blittable.
8615         
8616 2004-09-01  Dick Porter  <dick@ximian.com>
8617
8618         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
8619         mono_image_get_filename() to get the assembly location.
8620
8621         * icall.c:
8622         * metadata.h: Fix compile warnings
8623
8624 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
8625
8626         * class.c (class_compute_field_layout): System.Object is blittable.
8627
8628         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
8629         as in/out. Fixes #59909.
8630
8631 2004-09-01  Martin Baulig  <martin@ximian.com>
8632
8633         * metadata.h (MONO_TYPE_ISREFERENCE): Call
8634         mono_metadata_generic_inst_is_valuetype() if we're a generic
8635         instance to check whether our underlying type is a reference type.
8636
8637 2004-09-01  Martin Baulig  <martin@ximian.com>
8638
8639         * metadata.c (mono_type_size): If we're a generic instance, call
8640         mono_class_value_size() for value types.
8641
8642 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
8643
8644         * marshal.c: Implement more custom marshalling functionality. Fixes
8645         #64915.
8646
8647 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8648
8649         * mono-debug.c, debug-mono-symfile.c: add some locking love.
8650
8651 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
8652
8653         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
8654
8655         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
8656
8657         * icall.c: Fix some warnings.
8658
8659         * threads.c (abort_appdomain_thread): Fix unref errors.
8660         (mono_thread_current): Fix THREAD_DEBUG define.
8661
8662 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
8663
8664         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
8665
8666         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
8667
8668 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
8669
8670         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
8671         string arrays.
8672
8673 2004-08-28  Martin Baulig  <martin@ximian.com>
8674
8675         * metadata.c
8676         (mono_metadata_generic_inst_is_valuetype): New public function.
8677
8678         * metadata.h (MONO_TYPE_ISSTRUCT): Call
8679         mono_metadata_generic_inst_is_valuetype() if we're a generic
8680         instance to check whether our underlying type is a valuetype.
8681
8682 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
8683
8684         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
8685         #63768.
8686
8687 2004-08-25  Martin Baulig  <martin@ximian.com>
8688
8689         * loader.c (mono_get_method_from_token): Abstract methods can also
8690         be generic and thus have type parameters.
8691
8692         * metadata-internals.h
8693         (MonoDynamicImage): Added `GPtrArray *gen_params'.
8694
8695         * reflection.c (mono_image_get_generic_param_info): Don't create a
8696         metadata row, just add an entry to the `gen_params' array.
8697         (build_compressed_metadata): Sort the `gen_params' array and then
8698         actually create the metadata.
8699
8700 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8701
8702         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
8703
8704 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
8705
8706         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
8707
8708 2004-08-24  Martin Baulig  <martin@ximian.com>
8709
8710         * class.cs (mono_class_is_subclass_of): Like an interface, a
8711         generic instance also derives from System.Object.
8712
8713 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
8714
8715         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
8716         custom modifiers to be in any order. Fixes #61990.
8717
8718 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
8719
8720         * object.c: Register mono_object_new_fast icall.
8721         
8722         * object.c (mono_class_get_allocation_ftn): Return to calling
8723         mono_object_new_fast, since it seems faster to compute the object 
8724         size in unmanaged code than passing it as a parameter.
8725
8726         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
8727
8728         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
8729         this function with Boehm as the oom handler, so we don't have to check
8730         the result of GC_malloc.
8731
8732         * object.c: Remove checks for oom.
8733
8734         * object.h object.c (mono_class_get_allocation_ftn): New function to
8735         return the icall which can be used to allocate an instance of a given
8736         class. 
8737
8738         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
8739
8740         * class-internals.h: Add 'enabled' field.
8741
8742 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
8743
8744         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
8745
8746 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
8747         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
8748         value 0x0010.
8749
8750 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
8751
8752         * appdomain.c: use the Tls function for appdomain too,
8753         at Zoltan's request. Actually return in mono_context_get
8754
8755         * appdomain.c, profiler.c, threads.c: use __thread
8756
8757 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
8758
8759         * appdomain.c threads.c: Call GC_CreateThread on windows.
8760
8761         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
8762         multiple libraries since this don't work on windows.
8763
8764 2004-08-18  Martin Baulig  <martin@ximian.com>
8765
8766         * class-internals.h
8767         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
8768         MonoMethodHeader.
8769
8770         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
8771         MonoMethodNormal since we also need it for abstract and interface
8772         methods.
8773
8774         * reflection.c
8775         (build_compressed_metadata): Sort the GenericParam table.
8776         (mono_image_create_token): Added `gboolean create_methodspec'
8777         argument; this is false when generating a MethodImpl token.
8778         (reflection_methodbuilder_to_mono_method): Abstract and interface
8779         methods may also have generic parameters.
8780
8781 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8782
8783         * appdomain.c: thread local alloc
8784
8785 2004-08-17  Martin Baulig  <martin@ximian.com>
8786
8787         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
8788
8789         * icall.c
8790         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
8791         argument.
8792
8793         * class.c (mono_type_get_full_name): New public function.
8794         (mono_type_get_name): Don't include the type arguments.
8795
8796 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
8797
8798         * Makefile.am: Build static versions of libmetadata and libmonoruntime
8799         for inclusion into the mono executable.
8800
8801 2004-08-16  Martin Baulig  <martin@ximian.com>
8802
8803         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
8804         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
8805
8806 2004-08-14  Martin Baulig  <martin@ximian.com>
8807
8808         * class.c (dup_type): Also copy the `byref' field.
8809
8810 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
8811
8812         * reflection.c (create_dynamic_mono_image): Revert the last change 
8813         since it breaks bootstrap.
8814
8815 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8816
8817         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
8818
8819         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
8820         not free them with g_free.
8821
8822 2004-08-11  Martin Baulig  <martin@ximian.com>
8823
8824         * reflection.c (mono_reflection_setup_internal_class): Also call
8825         mono_class_setup_mono_type() if we already have a `tb->type.type'.
8826
8827 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
8828
8829         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
8830         called during default (first) AppDomain creation. Keep track of
8831         Evidence when loading assemblies.
8832
8833 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8834
8835         * opcodes.c, opcodes.h: reduce runtime relocations.
8836
8837 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8838
8839         * culture-info.h, locales.c: fixes and chages to sue the new
8840         optimized format of the locale data.
8841         * culture-info-tables.h: regenerated.
8842
8843 2004-08-06  Geoff Norton <gnorton@customerdna.com>
8844         
8845         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
8846
8847 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
8848
8849         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
8850         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
8851         * domain-internals.h: icall declaration.
8852         * icall.c: icall registration.
8853         * object-internals.h: New fields in MonoAssembly for CAS.
8854
8855 2004-08-05  Duncan Mak  <duncan@ximian.com>
8856
8857         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8858         CEE_LDELEM_ANY.
8859
8860 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8861
8862         * reflection.c: fix to deal with object[] arrays in custom ctors
8863         (bug #62550).
8864
8865 2004-08-05  Martin Baulig  <martin@ximian.com>
8866
8867         * class.c (mono_class_array_element_size): Added support for
8868         generic instances and correctly handle "recursive" types.
8869
8870 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8871
8872         * assembly.c: Fix warnings.
8873
8874 2004-08-04  Martin Baulig  <martin@ximian.com>
8875
8876         * class.c
8877         (mono_type_get_name_recurse): Added `gboolean include_arity'
8878         argument specifying whether or not we should include the generic
8879         arity in the type name.
8880         (_mono_type_get_name): New static function.
8881         (mono_class_setup_vtable): If we're a generic instance, don't
8882         include the generic arity in the names of explicit method
8883         implementations.        
8884
8885 2004-08-03  Martin Baulig  <martin@ximian.com>
8886
8887         * class.c (mono_type_get_name_recurse): Enclose the generic type
8888         arguments in `<', '>'.
8889
8890 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8891
8892         * gc.c: make GC warning messages use the trace API, they are just
8893         noise to most of the users.
8894
8895 2004-08-03  Martin Baulig  <martin@ximian.com>
8896
8897         * debug-mono-symfile.c (read_string): Correctly read the string.
8898
8899 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8900
8901         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
8902         
8903         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
8904         icalls.
8905         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
8906
8907 2004-07-30  Martin Baulig  <martin@ximian.com>
8908
8909         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
8910         Reflect latest symbol writer changes.   
8911
8912 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8913
8914         * object.c: always create an object if null is passed
8915         to Invoke() where a valuetype is expected.
8916
8917 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
8918
8919         * marshal.c (mono_marshal_init): make managed
8920         signatures match native ones better for 64bits.
8921
8922 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8923
8924         * appdomain.c: hack to build correctly the private bin path on windows.
8925         Fixes bug #61991.
8926
8927 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
8928
8929         * assembly.c: Load mscorlib from the correct framework directory
8930           (mono/<version>/mscorlib.dll).
8931         * appdomain.h: Added prototypes for new functions.
8932         * internals.h: Added some prototypes.
8933         * domain.c: When initializing the runtime, get from the executable and
8934           the configuration files the runtime version that the app supports.
8935           Added support methods for reading app.exe.config. Added list of versions
8936           supported by the JIT. Added two new methods: mono_init_from_assembly,
8937           which initializes the runtime and determines the required version from
8938           the provided exe file, and mono_init_version, which initializes
8939           the runtime using the provided version.
8940         * icall.c: Get machine.config from version-specific directory.
8941         * reflection.c: When generating an image, embed the version number
8942           of the current runtime.
8943
8944 2004-07-28  Dick Porter  <dick@ximian.com>
8945
8946         * socket-io.c
8947         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
8948         returned sockaddr size before creating the remote address object.
8949         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
8950         61608.
8951
8952 2004-07-28  Dick Porter  <dick@ximian.com>
8953
8954         * locales.c (string_invariant_compare_char): Fix invariant char
8955         compares between upper and lower cases.  Fixes bug 61458.
8956
8957 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
8958         
8959         * marshal.c: actually cache stelem.ref wrappers.
8960         
8961 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8962
8963         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
8964         sections and remove the mono_cli_rva_map () function.
8965
8966 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8967
8968         * debug-mono-symfile.c: fix one more endianess issue, from a patch
8969         by Geoff Norton (<gnorton@customerdna.com>).
8970
8971 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
8972
8973         * class.c: fix class loads for pointer types (typeof(int) !=
8974         typeof(int*)).
8975
8976 2004-07-27  Martin Baulig  <martin@ximian.com>
8977
8978         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
8979         reading the debugging information from an external ".mdb" file.
8980
8981 2004-07-24  Martin Baulig  <martin@ximian.com>
8982
8983         * reflection.c (mono_image_get_type_info): Only write a class
8984         layout entry if we actually have a size or a packing size.
8985
8986 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8987
8988         * reflection.c (type_get_fully_qualified_name): 
8989         insert cast to get type checking of ?: with non-gcc compilers
8990
8991 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
8992
8993         * rand.c: use g_getenv for both lookups of
8994         MONO_EGD_SOCKET
8995
8996 2004-07-17  Martin Baulig  <martin@ximian.com>
8997
8998         * reflection.c (mono_reflection_bind_generic_method_parameters):
8999         Set `gmethod->reflection_info'.
9000
9001 2004-07-17  Martin Baulig  <martin@ximian.com>
9002
9003         * class.c (mono_class_create_from_typedef): Insert the newly
9004         created class into the hash table before computing the interfaces
9005         since we could be called recursively.
9006
9007 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
9008
9009         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
9010         function to implement stelem.ref in managed code
9011         * class-internals.h, debug-helpers.c: a new wrapper type
9012         for the above.
9013
9014 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
9015
9016         * gc.c: allow GC handles to work even when no GC is compiled in.
9017         Fix part of bug #61134 (GetAddrOfPinnedObject).
9018
9019 2004-07-13  Peter Williams  <peter@newton.cx>
9020  
9021         * process.c (complete_path): Make sure we don't attempt to execute
9022         directories.
9023  
9024 2004-07-12  Geoff Norton <gnorton@customerdna.com>
9025
9026         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
9027           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
9028           and will add/subtract the hour if needed
9029
9030 2004-07-12  Martin Baulig  <martin@ximian.com>
9031
9032         * reflection.c (mono_field_get_object): If we have
9033         `field->generic_info', take the attributes from
9034         `field->generic_info->generic_type'.    
9035
9036 2004-07-12  Martin Baulig  <martin@ximian.com>
9037
9038         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
9039         This function must be called before initializing the runtime.
9040         (mono_debug_init_1): New function; call this after initializing
9041         the runtime, but before loading the assembly.  It tells the
9042         debugger to load corlib and the builtin types.
9043
9044         * mono-debug-debugger.c: Did some larger changes in the debugging
9045         code; support recursive class declarations, make sure we actually
9046         add all classes.
9047
9048 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9049
9050         * debug-helpers.c: undo my previous patch and fixed the real issue in
9051         ../mini/exceptions-x86.c
9052
9053 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9054
9055         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
9056         when no HOME env. variable was set and a NullRef was thrown in a .cctor
9057         called from other .cctors.
9058
9059 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
9060
9061         * loader.c: Removed the mono_loader_wine_init hack now that we are
9062         doing a managed version of Windows.Forms.
9063
9064 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
9065
9066         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
9067         threadpool.c, threads.c: remove static data from rootset.
9068
9069 2004-07-09  Dick Porter  <dick@ximian.com>
9070
9071         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
9072         Don't do any more processing if the matched length was 0.  It was
9073         increasing the size of the string before.  Fixes bug 61167.
9074
9075 2004-07-09  Dick Porter  <dick@ximian.com>
9076
9077         * socket-io.h:
9078         * socket-io.c
9079         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9080         Add support for SO_PEERCRED if its available.
9081
9082 2004-07-09  Peter Bartok <pbartok@novell.com>
9083         * loader.c: winelib.exe.so error message is now only displayed if
9084         MONO_DEBUG is set. To help us avoid questions when people are trying
9085         out the new Managed.Windows.Forms.
9086
9087 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
9088
9089         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
9090         for isinst and castclass wrappers.
9091
9092         * class-internals.h icall.c: Move registration and lookup of JIT icalls
9093         to libmetadata from the JIT, so they could be used by the marshalling
9094         code and the interpreter.
9095
9096         * marshal.c: Register marshalling related JIT icalls here instead of
9097         in mini.c. Use CEE_MONO_ICALL instead of the family of 
9098         CEE_MONO_PROC<x> opcodes to call marshalling functions.
9099
9100         * metadata.h: Remove unneeded marshalling conversions.
9101
9102         * opcodes.c: Update for new opcodes.
9103         
9104 2004-07-08  Martin Baulig  <martin@ximian.com>
9105
9106         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
9107         (mono_debug_get_domain_data): Make this function static.
9108
9109 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9110
9111         * gc.c, object.h: add nice GC handle API for embedders.
9112
9113 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
9114
9115         * reflection.c: more changes for the new api
9116
9117         * object.c: When we reflect on a field w/ a constant value, it
9118         will not have a memory location, so we must access metadata. Also,
9119         allow easier reading of strings so that we can read them from
9120         the constant data.
9121
9122         * class.c (mono_class_layout_fields): no need for literal fields here.
9123
9124         * class-internals.h: api changes for const fields
9125
9126         * icall.c (ves_icall_get_enum_info): use new apis for const fields
9127
9128 2004-07-06  Martin Baulig  <martin@ximian.com>
9129
9130         * mono-debug.h: Increment version number to 44.
9131
9132         * mono-debug.c (mono_debug_add_wrapper): The second argument is
9133         now a gpointer, rewrote this whole method.
9134
9135         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
9136         function.  Add information about the wrapper in a new "misc table".
9137
9138         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
9139         for the new misc table.
9140
9141 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
9142
9143         * metadata-internals.h image.c: Add a cache for helper signatures.
9144
9145         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
9146
9147 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
9148
9149         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
9150         delegates from a delegate. Fixes #61033.
9151         
9152         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
9153         marshalling of stringbuilder arrays. Fixes #59900.
9154
9155 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
9156
9157         * icall.c: Add EnumBuilder:setup_enum_type icall.
9158
9159 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
9160
9161         * icall.c: Added a new icall for the property version of
9162         OffsetOfStringData.
9163
9164 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
9165
9166         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
9167         it has a constant size across platforms.
9168
9169         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
9170         stack trace.
9171
9172 2004-06-29  Martin Baulig  <martin@ximian.com>
9173
9174         * mono-debug.c (mono_debug_add_method): Protect the whole function
9175         in mono_debugger_lock(), not just parts of it.
9176
9177 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9178
9179         * reflection.c: make sure padding bytes in heaps are zeroed.
9180
9181 2004-06-24  David Waite  <mass@akuma.org>
9182
9183         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
9184         image.c, loader.c, locales.c, marshal.c, metadata.c,
9185         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
9186         string-icalls.c, threads.c: change to C90-style comments from C99 /
9187         C++ -style
9188
9189 2004-06-24  Dick Porter  <dick@ximian.com>
9190
9191         * threads.c
9192         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
9193         return createdNew.  Fixes bug 60412.
9194
9195         * threads-types.h: 
9196         * icall.c: Add createdNew parameter to CreateMutex icall
9197
9198 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9199
9200         * reflection.c, object-internals.h: save default value in params.
9201
9202 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9203
9204         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
9205         no need to build a new path combining that with the application base.
9206         Fixes bug #60442.
9207
9208 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
9209
9210         * reflection.c: fixed minor standard compliance issues.
9211
9212 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9213
9214         * reflection.c: fixed issue with encoding some custom attributes
9215         (arrays in properties and fields, bug #60411).
9216
9217 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9218
9219         * reflection.c: fix start address when copying the public key token.
9220
9221 2004-06-23  Martin Baulig  <martin@ximian.com>
9222
9223         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
9224         the `exc' object in a static object to put it into the GC's root set.
9225
9226 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
9227
9228         * reflection.c: make mono_reflection_setup_internal_class ()
9229         callable a second time to setup a new parent class.
9230
9231 2004-06-23  Dick Porter  <dick@ximian.com>
9232
9233         * threads.c: Check for WAIT_IO_COMPLETION return values.
9234
9235 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
9236
9237         * appdomain.c: Removed the g_free on the public key token. Now copy 
9238         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
9239         * assembly.c: Added public key token string value when loading 
9240         assemblies. Fix bug #60439.
9241         * icall.c: Added missing informations (like public key) in 
9242         GetReferencedAssemblies. Fix #60519.
9243         * image.h: Changed definition for public key token from const char*
9244         public_tok_value to guchar public_key_token [17];
9245         * reflection.c: Updated for changes to public key token.
9246
9247 2004-06-22  Lluis Sanchez Gual
9248
9249         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
9250         for the field in base classes.
9251
9252 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9253
9254         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
9255         mark headers as not supported, they are installed only for use by the
9256         debugger.
9257
9258 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
9259
9260         * *.c, *.h: avoid namespace pollution in public headers.
9261
9262 2004-06-21  Martin Baulig  <martin@ximian.com>
9263
9264         * exception.c (mono_get_exception_security): It's in
9265         "System.Security", not in "System".
9266
9267         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
9268         the exception classes.
9269
9270 2004-06-21  Martin Baulig  <martin@ximian.com>
9271
9272         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
9273         Protect the exception object from being finalized.
9274
9275 2004-06-21  Martin Baulig  <martin@ximian.com>
9276
9277         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
9278         public function.
9279
9280 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
9281
9282         * reflection.c: Load the assembly in mono_reflection_type_from_name,
9283         if it was not loaded before. Fix parts of #60439.
9284
9285 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
9286
9287         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
9288         code that was broken since Ben's change: wrappers are now
9289         dependent on the method signature only again.
9290
9291 2004-06-21  Martin Baulig  <martin@ximian.com>
9292
9293         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
9294         added interface support.
9295
9296 2004-06-21  Martin Baulig  <martin@ximian.com>
9297
9298         * class.c (mono_vtable_get_static_field_data): New public method.
9299
9300 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
9301
9302         * filewatcher.c : Windows build fix to be compliant with API changes.
9303
9304 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9305
9306         * class.h, class.c: more accessors.
9307         * metadata.h, metadata.c: prepare for hiding MonoType and
9308         MonoMethodSignature: people should use the accessors from now on
9309         outside of the tree.
9310
9311 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9312
9313         * *.c, *.h: more API cleanups.
9314
9315 2004-06-18  Jackson Harper  <jackson@ximian.com>
9316
9317         * assembly.c: Trace loading assemblies.
9318         * loader.c: Trace loading native libraries.
9319         * mono-config.c: Trace loading config files.
9320         
9321 2004-06-18  Dick Porter  <dick@ximian.com>
9322
9323         * locales.c: Tell ICU the lengths of strings, it can cope with
9324         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
9325
9326 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9327
9328         * image.c: swapped name/filename;
9329
9330 2004-06-18  Martin Baulig  <martin@ximian.com>
9331
9332         * mono-debug-debugger.c (write_class): Write the parent class at
9333         the end of the header.
9334
9335 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9336
9337         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
9338
9339 2004-06-17  Raja R Harinath  <rharinath@novell.com>
9340
9341         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
9342         (bundle_obj): New conditional define.
9343         (BUILT_SOURCES): Remove.
9344         ($(bundle_srcs)): Make parallel-make safe.
9345         (libmonoruntime_la_LIBADD): Make unconditional.
9346         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
9347         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
9348
9349 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
9350
9351         * culture-info-tables.h: It was inconsistent with the latest
9352           supp info files.
9353
9354 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
9355
9356         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
9357         be loaded.
9358
9359         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
9360         with gcc 2.95.
9361
9362 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9363
9364         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
9365         cleaned up public header threads.h.
9366
9367 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9368
9369         * Makefile.am, *.c, *.h: more API cleanups.
9370
9371 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9372
9373         * Makefile.am: removed monosn from compilation.
9374         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
9375         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
9376         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
9377         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
9378         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
9379         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
9380
9381 2004-06-15  Jackson Harper  <jackson@ximian.com>
9382
9383         * assembly.c: Make locales lower case when searching the GAC for
9384         assemblies. gacutil will always make locales lowercase when
9385         installing so this effectively makes them case insensitive.
9386         
9387 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
9388
9389         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
9390         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
9391           parameter which allows to choose whether the wait can be interrupted or 
9392           not. Also added the method mono_monitor_enter(), which locks the monitor
9393           using an infinite wait and without allowing interruption.
9394           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
9395           interrupted.
9396         * object.h: Added new fields in MonoThread. suspend_event holds the event
9397           used to susped/resume the thread. synch_lock is the lock object to use for
9398           modifying the thread state.
9399         * threads.c: Use the new synch_lock object for locking, instead of "this",
9400           which can generate deadlocks.
9401           Moved thread state change in Thread.Sleep and Thread.Join from managed
9402           to unmanaged code. This avoids a deadlock when the thread was suspended
9403           just after acquiring the thread lock.
9404           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
9405           Implemented Thread.Suspend using an event instead of ThreadSuspend,
9406           which is not fully implemented in the io-layer.
9407         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
9408
9409 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
9410
9411         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
9412         threads-types.h: more API cleanups.
9413
9414 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9415
9416         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
9417         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
9418         threadpool.c, threads.c: first pass at the exported API cleanup.
9419
9420 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9421
9422         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
9423
9424 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9425
9426         * icall.c: added internalGetHome.
9427
9428 2004-06-14  Dick Porter  <dick@ximian.com>
9429
9430         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
9431         possible to return successfully when '.' or '..' were the only
9432         entries in a directory, but were skipped.  The MonoIOStat was not
9433         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
9434         Fixes bug 59574.
9435
9436 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9437
9438         * reflection.c: make binaries run on .Net 1.1 by default.
9439
9440 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9441
9442         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
9443
9444 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
9445
9446         * marshal.c: keep track of struct size with explicit layout
9447         (bug #59979).
9448
9449 2004-06-12  Martin Baulig  <martin@ximian.com>
9450
9451         * mono-debug-debugger.c: Comment out a debugging g_message().
9452
9453 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9454
9455         * reflection.c, reflection.h: do not free custom attrs that are cached.
9456         * icall.c: use braces to make code clearer.
9457
9458 2004-06-11  Martin Baulig  <martin@ximian.com>
9459
9460         * class.h (MonoInflatedField): New type.
9461         (MonoClassField): Replaced `MonoType *generic_type' with
9462         `MonoInflatedField *generic_info'.
9463
9464         * icall.c
9465         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9466
9467 2004-06-11  Martin Baulig  <martin@ximian.com>
9468
9469         * reflection.c (mono_image_create_method_token): Correctly encode
9470         varargs methods.
9471
9472 2004-06-11  Martin Baulig  <martin@ximian.com>
9473
9474         * metadata.c (mono_metadata_parse_method_signature): When parsing
9475         a MethodDef which has VarArgs, also set sentinelpos if we don't
9476         have any parameters.
9477
9478 2004-06-11  Martin Baulig  <martin@ximian.com>
9479
9480         * verify.c (mono_method_verify): In CEE_CALL, use
9481         mono_method_get_signature() to get the method's signature, unless
9482         we're a PInvoke method.
9483
9484 2004-06-10  Jackson Harper  <jackson@ximian.com>
9485
9486         * assembly.c: Use <path>/lib/mono/gac for the extra paths
9487         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9488         logical name as the supplied path is just a prefix to the gac not
9489         the direct path to it.
9490         
9491 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9492
9493         * reflection.c: make the token for a created method match
9494         the token of the MethodBuilder it was created from
9495         (IKVM requires this behaviour now).
9496
9497 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9498
9499         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9500         reflection.c, socket-io.c: leak fixes.
9501
9502 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9503
9504         * icall.c: handle sentinel pos in vararg methods in position different
9505         from 0.
9506
9507 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9508
9509         * culture-info-tables.h: freshly generated.
9510
9511 2004-06-09  Martin Baulig  <martin@ximian.com>
9512
9513         * loader.c (mono_get_method_constrained): Call `mono_class_init
9514         (constrained_class)'.   
9515
9516 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
9517
9518         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
9519         any methods. Fixes #59629.
9520
9521 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9522
9523         * culture-info-tables.h: reflecting locale-builder updates.
9524
9525 2004-06-08  Dick Porter  <dick@ximian.com>
9526
9527         * object.h:
9528         * locales.c: Fixed compile warnings, including a real bug in
9529         CompareInfo_internal_compare.
9530         
9531 2004-06-08  Dick Porter  <dick@ximian.com>
9532
9533         * locales.c
9534         (ves_icall_System_Globalization_CompareInfo_internal_index):
9535         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9536         Double-check the resuls of usearches, because ICU currently
9537         ignores most of the collator settings here.  Fixes bug 59720.
9538         
9539 2004-06-08  Dick Porter  <dick@ximian.com>
9540
9541         * locales.c
9542         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
9543         Fix memory leak and segfault-causing typo.  No idea how this one
9544         lasted so long without being noticed.
9545
9546 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
9547
9548         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
9549         any methods. Fixes #59629.
9550
9551 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9552
9553         * assembly.c:
9554         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
9555         own the critical section before). Removed dead code (that's done
9556         in the preload hook).
9557
9558         (mono_assembly_load_with_partial_name): call the preload hook.
9559
9560 2004-06-08  Martin Baulig  <martin@ximian.com>
9561
9562         * metadata.c (mono_metadata_signature_alloc): Default
9563         `sentinelpos' to -1.
9564
9565         * reflection.c (mono_image_get_array_token): Likewise.
9566
9567 2004-06-08  Martin Baulig  <martin@ximian.com>
9568
9569         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
9570
9571         * metadata.c (mono_metadata_parse_method_signature): When parsing
9572         a MethodDef which has VarArgs, set sentinelpos.
9573
9574         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
9575         `gint16' since we're using -1 for non-varargs methods.
9576
9577         * reflection.c
9578         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
9579         (method_encode_signature): Added varargs support.
9580         (method_builder_encode_signature): Likewise.
9581         (mono_image_get_varargs_method_token): New static method.
9582         (mono_image_create_method_token): New public method; this is
9583         called via an icall instead of mono_image_create_token() when
9584         calling a varargs method.       
9585
9586 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
9587
9588         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
9589
9590 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9591
9592         * culture-info-tables.h : Reflecting the latest locale-builder that
9593           fixed empty array representation ({} to {0}).
9594
9595 2004-06-07  Jackson Harper  <jackson@ximian.com>
9596
9597         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
9598         looking up extra gac paths. This allows MONO_GAC_PATH to act
9599         exactly like a prefix.
9600         
9601 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9602
9603         * reflection.c (mono_reflection_type_from_name): Make a copy of the
9604         type name before modifying it. Fixes #59405.
9605
9606 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
9607
9608         * culture-info.h: added fields for "all datetime patterns".
9609         * locales.c: (  ves_icall_System_Globalization_CultureInfo
9610           _construct_datetime_format ()): fill xxx_patterns fields.
9611         * object.h: added fields for "all datetime patterns" to
9612           MonoDateTimeFormatInfo.
9613         * culture-info-tables.h: reflecting locale-builder updates.
9614
9615 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
9616
9617         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
9618         the event has no add and remove methods. Fixes #59629.
9619
9620 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
9621
9622         * object.c: Fixed possible integer overflow when allocating large
9623         strings.
9624
9625 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9626
9627         * culture-info-tables.h: reflecting locale-builder updates.
9628
9629 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
9630
9631         * culture-info-tables.h: reflecting locale-builder updates.
9632
9633 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
9634
9635         * culture-info-tables.h: reflecting locale-builder updates.
9636
9637 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
9638
9639         * threads.c: Made Thread.Sleep abortable.
9640
9641 2004-06-02  Martin Baulig  <martin@ximian.com>
9642
9643         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
9644
9645         * debug-mono-symfile.h: Bumped symbol file version number to 37.
9646
9647 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
9648
9649         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
9650
9651 2004-05-30  Jackson Harper  <jackson@ximian.com>
9652
9653         * reflection.c: Do not hardcode assembly versions or public key
9654         tokens anymore. All of this except the corlib section was dead
9655         code anyways.
9656         
9657 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
9658
9659         * object.c (mono_runtime_invoke_array): Automatically create boxed
9660         objects for byref valuetypes if needed. Fixes #59300.
9661         
9662         * object.c (mono_method_return_message_restore): Handle 
9663         MONO_TYPE_OBJECT as well.
9664
9665 2004-05-28  Jackson Harper  <jackson@ximian.com>
9666
9667         * reflection.c: The modified type encoding was causing build
9668         problems. Reverted for now.
9669         
9670 2004-05-28  Jackson Harper  <jackson@ximian.com>
9671
9672         * reflection.c/h: Take an assembly ref so that we dont create
9673         fully qualified names when encoding types in the same assembly as
9674         the custom attribute being emitted.
9675         * appdomain.c: Increment version number.
9676         
9677 2004-05-26  Duncan Mak  <duncan@ximian.com>
9678
9679         * icall.c
9680         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9681         Set the full version number (major, minor, build, revision).
9682
9683 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
9684
9685         * marshal.c (emit_struct_conv): increment src/dst after blit
9686         (mono_marshal_get_managed_wrapper,
9687         mono_marshal_get_native_wrapper): make sure we have marshalling
9688         info before marshalling params (info computation affects
9689         blittable)
9690
9691         * class.c (class_compute_field_layout): correctly deal with
9692         blittable
9693         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
9694         value types (as per what windows dows by default)
9695         (mono_class_setup_mono_type): System.ValueType is blittable
9696         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
9697         blittable
9698
9699         * marshal.c (mono_marshal_load_type_info): flag types  as
9700         non-blittable if the native layout doesn't match the managed
9701         layout
9702
9703 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9704
9705         * appdomain.c: don't add stuff in the private search path that is
9706         above the application base. If application base is not set, there's
9707         no private search path.
9708
9709 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
9710
9711         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
9712         byref struct arguments in native->managed marshalling.
9713
9714 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
9715
9716         * marshal.c (mono_marshal_get_runtime_invoke): correctly
9717         cache methods using signature (special case for methods
9718         that are value type or string class)
9719         
9720         * image.c (mono_image_close): clean up allocated GSList's
9721         in runtime_invoke_cache.
9722
9723 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9724
9725         * mono-config.c: set the correct path for mono_cfg_dir on windows when
9726         there's no MONO_CFG_DIR environment variable defined.
9727
9728 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9729
9730         * threads.c: windows version must be >= 0x0500 to include OpenThread.
9731
9732 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
9733
9734         * threadpool.c: Really wait for 500ms after the async call, even if the wait
9735           is interrumped.
9736         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
9737           before waiting for it, and call CloseHandle after the wait to unref it.
9738           This will make sure that handles are not disposed too early.
9739
9740 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9741
9742         * appdomain.c:
9743         * appdomain.h:
9744         * icall.c: removed
9745         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
9746         needed now.
9747
9748         * object.c: se the application_base only for the domain that runs
9749         Main. Fixes bug #59216,
9750
9751 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9752
9753         * appdomain.c:
9754         * object.c: only the domain in which Main is run have
9755         SetupInformation.ConfigurationFile set, so moved a few lines from
9756         appdomain.c to object.c.
9757
9758 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9759
9760         * appdomain.c: we tried to load [name].(dll|exe), but according
9761         to bug #57710, we must also try [culture]/[name].(dll|exe) and
9762         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
9763         There's a test case attached to bug #58922.
9764
9765 2004-05-27  Dick Porter  <dick@ximian.com>
9766
9767         * icall.c:
9768         * file-io.c: Implemented icalls for locking and unlocking regions
9769         in a file.
9770         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
9771         FALSE on error (fixes both compiler warning and real bug.)
9772
9773 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
9774
9775         * culture-info-tables.h: reflecting locale-builder updates.
9776
9777           (Added missing ChangeLog entry for 05/26)
9778
9779 2004-05-27  Jackson Harper  <jackson@ximian.com>
9780
9781         * locales.c: Fix some cut and paste errors.
9782         
9783 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9784
9785         * mono-config.c: set the correct path for config. directory on windows.
9786
9787 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9788
9789         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
9790           on win32.
9791
9792 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9793
9794         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
9795         from pinvoke functions.
9796         
9797         * marshal.c (mono_ftnptr_to_delegate): Implement this.
9798
9799 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
9800
9801         * culture-info-tables.h: reflecting locale-builder updates.
9802
9803 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
9804
9805         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
9806         #59086.
9807
9808 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
9809
9810         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
9811         * icall.c: Modified icalls for RNG.
9812         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
9813         Windows (CryptoAPI).
9814
9815 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9816
9817         * locales.c: Fix build.
9818
9819 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
9820
9821         * culture-info-tables.h: reflecting locale-builder updates.
9822
9823 2004-05-25  Jackson Harper  <jackson@ximian.com>
9824
9825         * locales.c: When creating the current culture use the $LANGs
9826         specific culture. So DateTimeFormat and NumberFormat entries are created.
9827         
9828 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
9829
9830         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
9831         a char array as parameter.
9832
9833 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
9834
9835         * image.c: In mono_image_open(), always use an absolute path name to
9836           look for already loaded images.
9837
9838 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
9839
9840         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
9841         missing in the windows build (like older cygwin include files).
9842
9843 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
9844
9845         * icall.c: Fixed check for possible integer overflow in Buffer_
9846         BlockCopy icall. Replaced comments style // by /* */.
9847
9848 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
9849
9850         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
9851         
9852         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
9853         check after MONO_VTADDR. Fixes pinvoke2.exe.
9854
9855         * marshal.h marshal.c metadata.h: Add beginnings of support for
9856         ftnptr -> delegate marshalling.
9857
9858 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
9859
9860         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
9861         * threads.c: Fix warnings.
9862
9863 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
9864
9865         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
9866         * icall.c: Registered icalls for Suspend and Resume.
9867         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
9868           Thread.Abort.
9869         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
9870         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
9871         * process.c: Use WaitForSingleObjectEx.
9872         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
9873           checkpoints.
9874         * threads.c, threads.h: Make use of new Ex wait methods. Improved
9875           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
9876           for Suspend and Resume. Added new mono_thread_stop, used for stoping
9877           background threads. Added basic support for Abort in Windows.
9878           Start new threads using a managed delegate invoke wrapper. This wrapper
9879           has an interruption checkpoint that is needed since an interruption
9880           can be requested before the thread leaves the unmanaged code that starts 
9881           the thread.
9882         * marshal.c: Added interruption checkpoint after every native call, and
9883           also before managed calls for wrappers called from unmanaged code to
9884           go into managed code.
9885         * object.h: Added new field in MonoThread to keep track of interruption
9886           requests.
9887
9888 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
9889
9890         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
9891         calls.
9892
9893 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9894
9895         * appdomain.c:
9896         * assembly.c:
9897         * gc.c:
9898         * locales.c:
9899         * mono-config.c:
9900         * rand.c: getenv -> g_getenv (windows!)
9901
9902         * process.c: complete_path is also used on non-windows platforms.
9903
9904 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9905
9906         * icall.c: new signature for Process_Start.
9907
9908         * process.[ch]: new signature for Process_Start. If we're on windows
9909         and UseShellExecute is false, we have to search for the program by
9910         ourselves if we don't get a full path.
9911
9912 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
9913
9914         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
9915         marshalling and call CleanUpNativeData if needed. Fixes #58646.
9916
9917 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9918
9919         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
9920         Fixes bug #58373.
9921
9922 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9923
9924         * process.c: use double quotes to quote program name and arguments on
9925         windows. Fixes bug #58575.
9926
9927 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9928
9929         * file-io.c: don't return "." and ".." when using windows Find*File.
9930
9931 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
9932
9933         * marshal.c: Don't pass wrappers to message init because method 
9934         addressed used to lookup metadata. part of remoting[2|3] fix.
9935
9936 2004-05-15  Jackson Harper  <jackson@ximian.com>
9937
9938         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
9939         path is essentially the same as MONO_PATH except that it points to
9940         GACs instead of lib directories.
9941         * loader.h: The user gac is gone so we dont need function to
9942         enable/disable it.
9943         * mono-config.c: user gac option is now gone.
9944         
9945 2004-05-15  Jackson Harper  <jackson@ximian.com>
9946
9947         * culture-info.h: Make defines more consistent, add calendar data
9948         to the culture info table.
9949         * culture-info-tables.h: Add basic calendar data. Basically
9950         everyone gets default gregorian until all the data is
9951         updated.
9952         * locales.c: Use the new consistent defines. Set calendar data for
9953         culture info objects.
9954         * object.h: add a field for calendar data to CultureInfo
9955         
9956 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
9957
9958         * image.c: image->runtime_invoke_cache is keyed on signatures now.
9959         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
9960         a signature.
9961         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
9962         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
9963         an extra param that is the pointer of the method to invoke. The IL for
9964         the invoke method is no longer specific to the method, but to the
9965         signature of the method. Thus, we can share the same code for multiple
9966         methods. This reduces the number of methods that have to be compiled.
9967
9968 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
9969
9970         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
9971
9972         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9973
9974         * icall.c: Optimize Buffer.BlockCopy.
9975
9976 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9977
9978         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
9979         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
9980         quote). Changed them to "MMMM yyyy".
9981
9982 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
9983
9984         * rand.c
9985         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
9986
9987 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
9988
9989         * reflection.h: Updated after changes to managed structures.
9990
9991         * appdomain.c: Bump corlib version.
9992
9993 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9994
9995         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
9996         windows.
9997
9998 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9999
10000         * Makefile.am: link to ../os/libmonoos.la on windows.
10001
10002         * assembly.c:
10003                 -If MONO_DEBUG, warn about non-existing directories in
10004                 MONO_PATH.
10005                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
10006                 compile time variable.
10007                 -Removed init_default_path and call mono_set_rootdir from
10008                 libmonoos.a instead (windows only).
10009
10010         * assembly.h: declare mono_assembly_getrootdir().
10011
10012         * domain.c:
10013         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
10014
10015         * loader.c: s/getenv/g_getenv/
10016
10017 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10018
10019         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
10020
10021         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
10022
10023         * metadata.h: Add new marshalling conversions.
10024
10025         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
10026         function.
10027
10028         * reflection.c (mono_reflection_get_type): Lookup the type in all
10029         modules of a multi-module assembly. Fixes #58291.
10030
10031 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10032
10033         * threads.c: Before aborting a background, set the StopRequested
10034         state.  This avoids throwing the Abort exception.
10035         In mono_thread_manage, don't continue with the shutdown until all
10036         aborted threads have actually stopped.
10037
10038 2004-05-10  Jackson Harper  <jackson@ximian.com>
10039
10040         * locales.c: Remove the modifier from culture names.
10041         
10042 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10043
10044         * Makefile.am: monosn is not installed any more. It has been deprecated
10045         in favor of sn.
10046
10047 2004-05-07  Jackson Harper  <jackson@ximian.com>
10048
10049         * locales.c
10050         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
10051         Fix array construction, add bailout if the length is 0.
10052
10053 2004-05-07  Dick Porter  <dick@ximian.com>
10054
10055         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
10056         machine doesn't have a DNS entry.  Patch by Urs Muff
10057         (umuff@quark.com), fixes bug 57928.
10058
10059 2004-05-06  Jackson Harper  <jackson@ximian.com>
10060
10061         * reflection.c: Handle null PublicTokens properly. alloc mem for
10062         assembly names culture so we dont crash when freeing it.
10063         
10064 2004-05-06  Jackson Harper  <jackson@ximian.com>
10065
10066         * assembly.c: Check the usergac when loading with partial names.
10067         
10068 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
10069
10070         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
10071         does nothing for now (not required for Linux/Windows) but the class
10072         library can call it (and a newer or modified runtime could need it).
10073         * icall.c: Registred icall.
10074
10075 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10076
10077         * loader.c: prints a message on module loading error we set MONO_DEBUG
10078         environment variable.
10079
10080 2004-05-05  Jackson Harper  <jackson@ximian.com>
10081
10082         * appdomain.c: Handle PublicKeyToken=null properly.
10083         
10084 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
10085
10086         * environment.c|h: Added icall ves_icall_System_Environment_
10087         GetOSVersionString to get the current OS version as a string.
10088         * icall.c: Registred icall.
10089
10090 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
10091
10092         * object.c: in mono_object_get_virtual_method(), take into account that
10093         non-virtual methods don't have a slot in the vtable. Check needed when
10094         the object is a proxy.
10095
10096 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10097
10098         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
10099         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
10100
10101         * object.c (mono_class_compute_gc_descriptor): Fix warning.
10102
10103         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
10104         passed when a valuetype is expected.
10105
10106         * object.c (mono_unhandled_exception): Only set the exit code if the
10107         exception happens in the main thread. Fixes thread5.exe.
10108
10109         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
10110         invalid names. Fixes #58047.
10111
10112 2004-05-03  Jackson Harper  <jackson@ximian.com>
10113
10114         * assembly.c: This line was committed accidently and is unneeded.
10115         
10116 2004-05-03  Jackson Harper  <jackson@ximian.com>
10117
10118         * icall.c: Add new icall for Assembly::LoadWithPartialName
10119         * assembly.c/.h: new function that probes the GAC to load partial
10120         assembly names by Paolo Molaro.
10121         
10122 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10123
10124         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
10125         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
10126         (type_get_fully_qualified_name): Added PublicKeyToken when building a
10127         full type name.
10128
10129 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10130
10131         * appdomain.c: fixed check for 'neutral' culture and removed warning.
10132         * reflection.c: fix bug when parsing a full type name and Version is not
10133         the last thing in the string.
10134
10135 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
10136
10137         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
10138         crashes when it is freed.
10139
10140 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10141
10142         * assembly.c: print the compat warning to stderr.
10143
10144 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
10145
10146         * assembly.c (mono_assembly_load_references): Add a compatibility
10147         hack to run old applications that might be still referencing the
10148         3300-based assemblies, only do this for System.xxx.
10149
10150 2004-05-01  Jackson Harper  <jackson@ximian.com>
10151
10152         * appdomain.c: If the culture is neutral we set it to "".
10153         
10154 2004-04-29  Jackson Harper  <jackson@ximian.com>
10155
10156         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
10157
10158 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
10159  
10160         * string-icalls.c: added low overhead function for copying chars
10161         * icall.c: added needed icall for the above function
10162  
10163 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10164
10165         * icall.c: fix return value of get_global_assembly_cache.  Implemented
10166         Environment.GetLogicalDrives.
10167
10168 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
10169
10170         * rand.c: try and talk to egd or prngd
10171         for random bytes if opening devices fail.
10172
10173 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
10174
10175         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
10176         alignment for the type using the native alignment of its members 
10177         instead of using klass->min_align.
10178
10179         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
10180
10181 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10182
10183         * file-io.c:
10184         * socket-io.c: added check for sys/aio.h.
10185
10186 2004-04-28  Dick Porter  <dick@ximian.com>
10187
10188         * threads.c: Don't abort a thread thats already aborting, when
10189         terminating everything.
10190
10191 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10192
10193         * icall.c: added 2 new async calls for Socket.
10194
10195         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
10196         IO on *nix systems.
10197
10198         * threadpool.c: removed unused variable.
10199
10200 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
10201
10202         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
10203
10204 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10205
10206         * locales.c: put back string_invariant_tolower () and
10207         string_invariant_toupper ().
10208
10209 2004-04-26 David Waite <mass@akuma.org>
10210
10211         * file-io.h:
10212         * socket-io.h:
10213         * threads.h:
10214         * unicode.h: remove comma from end of enumeration declarations
10215
10216 2004-04-26 David Waite <mass@akuma.org>
10217
10218         * debug-mono-symfile.h:
10219         * decimal.c:
10220         * mono_debug.h:
10221         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
10222
10223
10224 2004-04-26  Jackson Harper  <jackson@ximian.com>
10225
10226         * appdomain.c: Increment version number.
10227         
10228 2004-04-26  Jackson Harper  <jackson@ximian.com>
10229
10230         * appdomain.c: Set assembly references public token value when
10231         PublicKeyToken is specified, not the hash_value. Free public token
10232         values when free assembly name data. Previously the public key
10233         token was hex decoded, however we are using hex encoded public key
10234         tokens, so this is not neccasary.
10235         * assembly.c: Lookup assemblies in the gac if their public token
10236         value is set. Add function to allow enabling user gac
10237         lookups. Specify whether or not the assembly was loaded from the
10238         GAC. Compare full assembly names when checking the cache for
10239         assemblies (Temporarily disabled see comment in code). Remove
10240         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
10241         specifies trace-loader they get extra info to stdout on the
10242         loading of assemblies.
10243         * image.h: Add a field for an assembly references public token
10244         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
10245         whether an assembly has been loaded from the GAC.
10246         * image.c: Remove a corlib -> mscorlib name mapping.
10247         * loader.h: Add function to enable/disable the user gac.
10248         * mono-config.c: Check if the usergac is enabled in the config
10249         file.
10250         * icall.c: New icall to determine whether or not an assembly has
10251         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
10252         * tabldefs.h: Add constant for assemblyref flag that specifies a
10253         full public key is used instead of a public token.
10254         * reflection.c: Remove mscorlib -> corlib mappings. Set
10255         PublicTokenValue instead of hash value. This value is a hex
10256         string so it does not need to be expanded.
10257
10258 2004-04-26  Martin Baulig  <martin@ximian.com>
10259
10260         * mono-debug-debugger.c (mono_debugger_initialize): Set
10261         `mono_debugger_initialized' before calling mono_debug_lock().
10262
10263 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
10264
10265         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
10266           InternalToUpper/InternalToLower.
10267         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
10268           removed invariant culture shortcut.  This is now done in managed code.
10269         * locales.c: (string_invariant_toupper/tolower) removed.
10270
10271 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10272
10273         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
10274         Added Poll internal call.
10275
10276         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
10277         call for Poll. Select was too heavy for polling a single socket.
10278
10279         * threadpool.[ch]: added mono_threadpool_cleanup.
10280         * threads.c: use it. Don't use Thread_Abort on windows.
10281
10282 2004-04-23  Martin Baulig  <martin@ximian.com>
10283
10284         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
10285
10286 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
10287
10288         * icall.c: Registred new icalls for key pair protection and added an
10289         icall for Environment.GetFolderPath on Windows.
10290         * security.c|h: Added new icalls for key pair protection.
10291
10292 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10293
10294         * socket-io.c: don't display the non-supported family warning for known
10295         families. Now this is not displayed on windows when checking support
10296         for IPv4/IPv6.
10297
10298 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10299
10300         * class.c: don't display the layout warning for static fields.
10301
10302 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
10303
10304         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
10305         * locales.c, locales.h: Added new icalls for culture-specific
10306         Char.ToLower and Char.ToUpper.
10307
10308 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10309
10310         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
10311         by David Waite.
10312
10313 2004-04-20  Martin Baulig  <martin@ximian.com>
10314
10315         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
10316         of the type name before passing it to mono_reflection_type_from_name().
10317
10318 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
10319
10320         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
10321         encodings here. Fixes #56965.
10322
10323 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
10324
10325         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10326         fix test on strstr result not that I can see anything that
10327         relies on the result.
10328
10329 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
10330
10331         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
10332         Fixes #57081.
10333
10334         * marshal.c (mono_marshal_get_string_encoding): New helper function.
10335
10336         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
10337         function to determine which marshalling to use for strings. Fixes
10338         #56965.
10339
10340         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
10341
10342         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
10343
10344 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
10345
10346         * icall.c: #include mono-config.h
10347
10348 2004-04-15  Jackson Harper  <jackson@ximian.com>
10349
10350         * culture-info-tables.h: Fix date formats for en-US culture.
10351         
10352 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
10353
10354         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
10355         ThreadPool.SetMinThreads.
10356         * threadpool.c: Implemented ThreadPool.GetMinThreads and
10357         ThreadPool.SetMinThreads.
10358
10359 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10360
10361         * mono-config.c: also load the .config file in the directory
10362         where the assembly was found.
10363
10364 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10365
10366         * assembly.c: load per-assembly config files.
10367         * icall.c: decrapified code to get the config dir and moved to
10368         mono-config.c.
10369         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
10370         per-assembly config files. When doing a dll map lookup give precedence
10371         to the per-assembly data.
10372
10373 2004-04-14  Martin Baulig  <martin@ximian.com>
10374
10375         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
10376         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
10377         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
10378
10379         * mono-debugger-debugger.c: While the debugger is locked, remember
10380         whether the symbol tables have changes and send one single
10381         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
10382
10383 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
10384
10385         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
10386
10387         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
10388         function.
10389
10390         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
10391         account when marshalling string arrays. Fixes #56965.
10392
10393 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
10394
10395         * icall.c: Add new icalls mapping for security.
10396         * security.c|h: Add internal calls for WindowsIdentity,
10397         WindowsImpersonationContext and WindowsPrincipal.
10398
10399 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
10400
10401         * class.c: Added comment to ensure the System.MonoDummy class
10402         is removed when no longer necessary
10403
10404 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
10405
10406         * appdomain.c: Pass arguments to the bootstraping exceptions to
10407         minimize JITed methods at boot
10408
10409         * metadata.c (mono_exception_from_name_two_strings): Allow for the
10410         second string to be null.
10411
10412         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10413         Change the protocol to minimize the JIT methods at startup.  Now
10414         it Returns the internal codepage, if the value of "int_code_page"
10415         is 1 at entry, and we can not compute a suitable code page
10416         number, returns the code page as a string.
10417
10418 2004-04-13  Jackson Harper  <jackson@ximian.com>
10419
10420         * culture-info-tables.h: Fix number of decimal digits for all
10421         english locales.
10422
10423 2004-04-13  Jackson Harper  <jackson@ximian.com>
10424
10425         * icall.c: Clairfy out of sync error message. It is not always
10426         your corlib that is out of sync.
10427
10428 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
10429
10430         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
10431         properties when only the set accessor is overriden. Fixes #55874.
10432
10433 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
10434
10435         * assembly.c (mono_assembly_load_references): Make this thread safe.
10436         Fixes #56327.
10437
10438 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
10439
10440         * monosn.c: Add missing initialization calls.
10441
10442 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
10443
10444         * locales.c:
10445         ves_icall_System_Globalization_CultureInfo_construct_number_format
10446         Fix g_assert so it compiles on fussier compilers re int/ptr
10447         mismatch
10448
10449 2004-04-08  Dick Porter  <dick@ximian.com>
10450
10451         * socket-io.h:
10452         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
10453         53992.  Also rearrange the code so that the internal calls return
10454         an error value and exceptions are thrown from managed code.
10455
10456         * icall.c: Add type info to the socket icalls.
10457
10458 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10459
10460         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10461         owes me a beer.
10462
10463 2004-04-07  Martin Baulig  <martin@ximian.com>
10464
10465         * class.c (mono_class_from_generic_parameter): Don't default
10466         `klass->parent' to `mono_defaults.object_type'.
10467
10468 2004-04-07  Martin Baulig  <martin@ximian.com>
10469
10470         * reflection.c (mono_reflection_initialize_generic_parameter): Set
10471         `param->pklass->reflection_info'.       
10472
10473 2004-04-07  Jackson Harper  <jackson@ximian.com>
10474
10475         * culture-info-tables.h: Fix date separator symbol.
10476         
10477 2004-04-07  Martin Baulig  <martin@ximian.com>
10478
10479         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10480         from System.Type to System.MonoType.
10481
10482 2004-04-07  Martin Baulig  <martin@ximian.com>
10483
10484         * reflection.h
10485         (MonoReflectionGenericParam): Added `has_reference_type' and
10486         `has_value_type' fields.
10487
10488         * reflection.c (mono_image_get_generic_param_info): Encode the
10489         correct flags if we have the `class' or `struct' constraint.
10490
10491 2004-04-07  Martin Baulig  <martin@ximian.com>
10492
10493         * reflection.h
10494         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10495
10496 2004-04-07  Jackson Harper  <jackson@ximian.com>
10497
10498         * appdomain.c: Revert extra patches, just wanted to bump the
10499         version number.
10500         
10501 2004-04-07  Jackson Harper  <jackson@ximian.com>
10502
10503         * Makefile.am: Add culture-info private headers.
10504         * icall.c: Add new icalls for contructing locales.
10505         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10506         * locales.h: Declare new culture info construction methods.
10507         * object.h: Add new fields used to avoid the CultureMap to
10508         MonoCultureInfo.
10509         * culture-info.h: Definition of structs used in the culture info
10510         tables.
10511         * culture-info-tables.h: Autogenerated tables that contain culture
10512         info data. This file was generated with the locale-builder tool.
10513         * appdomain.c: Incement corlib version number.
10514         
10515 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
10516
10517         * appdomain.c: (mono_runtime_init) move mono_thread_init
10518         to before mono_object_new calls so critical sections
10519         are initialized before use.
10520
10521 2004-04-07  Martin Baulig  <martin@ximian.com>
10522
10523         * icall.c
10524         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
10525         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
10526         (ves_icall_MonoGenericParam_initialize): Removed.
10527         (monogenericparam_icalls): Removed.
10528         (generictypeparambuilder_icalls): Added new table for
10529         System.Reflection.Emit.GenericTypeParameterBuilder.
10530
10531         * reflection.c
10532         (mono_reflection_define_generic_parameter): Removed.
10533         (mono_reflection_initialize_generic_parameter): This is now called
10534         from GenericTypeParameterBuilder's .ctor.
10535
10536 2004-04-06  Martin Baulig  <martin@ximian.com>
10537
10538         * class.c (mono_class_init): Don't inflate nested classes in a
10539         generic instance.
10540         (mono_type_get_name_recurse): Include the generic arguments for
10541         generic instances and generic type declarations.
10542         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
10543         (_mono_class_get_instantiation_name): Removed.
10544         (mono_class_create_generic): Always use `gklass->name' as our name.
10545
10546         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
10547
10548         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
10549         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
10550         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
10551         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
10552         closed generic methods here.
10553
10554         * reflection.c
10555         (mono_reflection_generic_inst_get_nested_types): Removed.
10556         (inflate_mono_method): Copy the generic parameters from the
10557         MonoMethodHeader into out MonoGenericMethod.
10558
10559 2004-04-06  Martin Baulig  <martin@ximian.com>
10560
10561         * row-indexes.h
10562         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
10563
10564         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
10565
10566         * reflection.c (build_compressed_metadata): If we have any entries
10567         in the GenericParam, MethodSpec or GenericParamConstraint tables,
10568         set the header version to 1.1.
10569
10570 2004-04-06  Martin Baulig  <martin@ximian.com>
10571
10572         * class.c (mono_class_init): If we're a generic instance,
10573         initialize our nested classes, too.
10574         (_mono_class_get_instantiation_name): Deal with the new `!%d'
10575         suffix. 
10576
10577 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10578
10579         * process.c: quote the argument passed to the shell on windows.
10580
10581 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
10582
10583         * threads.c (mono_alloc_special_static_data): Allow this to be
10584         called during startup.
10585
10586 2004-04-02  Martin Baulig  <martin@ximian.com>
10587
10588         * icall.c
10589         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
10590
10591 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
10592
10593         * icall.c: Fix build.
10594
10595 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
10596
10597         * Makefile.am: Added security.c|h.
10598         * icall.c: Added icall for get_UserName;
10599         * security.c: New file for security related icalls. Added function
10600         get_UserName for System.Environment (fix #56144).
10601         * security.h: New. Header file for security.c
10602
10603 2004-04-02  Dick Porter  <dick@ximian.com>
10604
10605         * icall.c: Deleted the icalls that were obsoleted some time ago
10606         by the ICU string code, and which were mixed into the icall
10607         rearranging.  Fixes bug 55969.
10608
10609         * string-icalls.h: 
10610         * string-icalls.c: Deleted the code that those icalls reference.
10611
10612 2004-04-01  Martin Baulig  <martin@ximian.com>
10613
10614         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
10615
10616         * class.c (mono_class_from_generic_parameter): Don't set 
10617         TYPE_ATTRIBUTE_INTERFACE.
10618         (my_mono_class_from_generic_parameter): Likewise.
10619
10620 2004-04-01  Martin Baulig  <martin@ximian.com>
10621
10622         * loader.c (find_method): Added an optional `MonoClass *ic'
10623         argument to search in a specific interface.
10624         (mono_get_method_constrained): New public function.
10625
10626 2004-04-01  Martin Baulig  <martin@ximian.com>
10627
10628         * reflection.c (mono_image_get_generic_field_token): Use the
10629         `handleref' cache here.
10630
10631 2004-04-01  Martin Baulig  <martin@ximian.com>
10632
10633         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
10634
10635         * reflection.c (create_generic_typespec): Use the `typespec' hash
10636         here, not the `typeref' one.    
10637
10638 2004-04-01  Martin Baulig  <martin@ximian.com>
10639
10640         * class.c (mono_class_inflate_generic_type): Moved the
10641         functionality into a new static inflate_generic_type() which
10642         returns NULL if it didn't do anything.  Only increment the
10643         `mono_stats.inflated_type_count' if we actually inflated
10644         something.
10645         (mono_class_get_full): Check the classes type to see whether we
10646         need to inflate it; also inflate MONO_TYPE_(M)VAR.
10647
10648 2004-04-01  Jackson Harper  <jackson@ximian.com>
10649
10650         * reflection.c: Set culture for assembly references.
10651         
10652 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
10653
10654         * reflection.[ch], icall.[ch], Fix support for pinning variables.
10655
10656 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10657
10658         * assembly.c:
10659         (do_mono_assembly_open): the critical section also covers
10660         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
10661
10662 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10663
10664         * threads.c:
10665         (mono_manage_threads): abort the background threads when finishing.
10666         Fixes bug #47232.
10667
10668 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10669
10670         * gc.c: only close the done_event handle if there was no timeout.
10671         C-ified comments.
10672
10673 2004-03-30  Martin Baulig  <martin@ximian.com>
10674
10675         * icall.c (icall_entries): It's called "System.Activator", not
10676         "System.Activation".    
10677
10678 2004-03-30  Martin Baulig  <martin@ximian.com>
10679
10680         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
10681         (mono_class_create_from_typespec): Likewise.
10682
10683 2004-03-30  Martin Baulig  <martin@ximian.com>
10684
10685         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
10686         `has_ctor_constraint' and `initialized'.
10687
10688 2004-03-30  Martin Baulig  <martin@ximian.com>
10689
10690         * reflection.c (encode_new_constraint): New static function to add
10691         the constructor constraint attribute to a type parameter.
10692         (encode_constraints): Call encode_new_constraint() if necessary.
10693
10694         * reflection.h
10695         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
10696
10697         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
10698         
10699 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
10700
10701         * reflection.c, icall.c: add support for pinning variables. 
10702
10703 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
10704
10705         * marshal.c (mono_marshal_get_managed_wrapper):
10706         init bool local with zero rather than null.
10707
10708 2004-03-29  Martin Baulig  <martin@ximian.com>
10709
10710         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
10711         the "official" behavior here.
10712         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
10713
10714 2004-03-29  Martin Baulig  <martin@ximian.com>
10715
10716         * icall.c: Reflect latest API changes.
10717
10718 2004-03-29  Martin Baulig  <martin@ximian.com>
10719
10720         * loader.c (mono_get_method_from_token): Also call
10721         mono_metadata_load_generic_params () for abstract and interface
10722         methods; replace the type arguments in the method signature with
10723         the ones which are loaded from the metadata.
10724
10725 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
10726
10727         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
10728         of the lock is not the current thread. MS.NET don't do it, in spite of
10729         what the documentation says. See bug #56157.
10730
10731 2004-03-28  Martin Baulig  <martin@ximian.com>
10732
10733         * class.c (mono_class_init): Don't call init_properties() and
10734         init_events() for generic instances; set `prop->parent' when
10735         inflating properties.
10736
10737         * reflection.c (mono_generic_inst_get_object): Call
10738         `mono_class_init (ginst->klass)'.
10739         (mono_type_get_object): Only create a MonoGenericInst if your
10740         generic type is a TypeBuilder.
10741         (do_mono_reflection_bind_generic_parameters): Only set
10742         `ginst->is_dynamic' if our generic type is a TypeBuilder.
10743
10744 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
10745
10746         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
10747         Fixes #56091.
10748
10749 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10750
10751         * icall.c: added Kill_internal icall.
10752         * process.[ch]: added Kill_internal icall.
10753
10754 2004-03-25  Martin Baulig  <martin@ximian.com>
10755
10756         * class.h (MonoStats): Added `generic_instance_count',
10757         `inflated_method_count', `inflated_type_count' and
10758         `generics_metadata_size'.       
10759
10760 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10761
10762         * reflection.c: no warnings now.
10763
10764 2004-03-25  Martin Baulig  <martin@ximian.com>
10765
10766         * class.c (mono_class_get_full): New public function; does a
10767         mono_class_get(), but also takes a `MonoGenericContext *'.
10768
10769         * loader.c (mono_field_from_memberref): Renamed to
10770         `field_from_memberref', made static and added `MonoGenericContext *'
10771         argument.
10772         (mono_field_from_token): Added `MonoGenericInst *' argument.
10773         (method_from_memberef): Likewise.
10774         (mono_get_method_from_token): Likewise.
10775         (mono_get_method_full): New public function; does a
10776         mono_get_method(), but also takes a `MonoGenericContext *'.
10777
10778         * verify.c (mono_method_verify): Get the method's generic context
10779         and pass it to mono_field_from_token(), mono_get_method_full() and
10780         mono_class_get_full().
10781
10782 2004-03-25  Martin Baulig  <martin@ximian.com>
10783
10784         * class.c (mono_class_inflate_generic_type): Take a
10785         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
10786         `MonoGenericMethod *'.
10787
10788 2004-03-25  Martin Baulig  <martin@ximian.com>
10789
10790         * loader.h (MonoMethodInflated): Store the MonoGenericContext
10791         instead of the MonoGenericMethod here.
10792
10793 2004-03-25  Martin Baulig  <martin@ximian.com>
10794
10795         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
10796         each time we create a new MonoGenericInst, we also create a new
10797         context which points back to us.
10798
10799         * class.c (inflate_method): Use `ginst->context' instead of
10800         creating a new context.
10801
10802         * loader.c (method_from_memberref): Use
10803         `klass->generic_inst->context' instead of creating a new context.
10804
10805 2004-03-25  Martin Baulig  <martin@ximian.com>
10806
10807         * class.h (MonoGenericContext): New struct.
10808         (MonoGenericMethod): Removed `generic_inst'.
10809
10810         * class.c (mono_class_inflate_generic_method): Take a
10811         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
10812
10813 2004-03-25  Martin Baulig  <martin@ximian.com>
10814
10815         * loader.h (MonoMethodInflated): New typedef.
10816
10817         * metadata.h (MonoMethodSignature): Removed `gen_method', make
10818         `generic_param_count' consume just 30 bits, added `is_inflated'
10819         and `has_type_parameters' flags (one bit each).
10820
10821         * class.c (mono_class_inflate_generic_method): Create a
10822         MonoMethodInflated instead of a MonoMethodNormal and set
10823         `is_inflated' in the method signature.
10824
10825         * class.h (MonoGenericMethod): Removed `generic_method'.
10826
10827 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
10828
10829         * image.c: Make sure the name of a MonoImage is always an absolute path.
10830           This fixes bug #54415.
10831
10832 2004-03-24  Martin Baulig  <martin@ximian.com>
10833
10834         * class.c (mono_class_setup_vtable): If we're a generic instance,
10835         use our generic type's vtable size.
10836
10837 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
10838
10839         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
10840         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
10841         problems.
10842
10843 2004-03-23  Martin Baulig  <martin@ximian.com>
10844
10845         * class.h (MonoDynamicGenericInst): Added `int count_events' and
10846         `MonoEvent *events'.
10847
10848         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
10849         (typebuilder_icalls): Added "get_event_info"; calls
10850         mono_reflection_event_builder_get_event_info(). 
10851
10852         * reflection.c (mono_reflection_generic_inst_initialize): Added
10853         `MonoArray *events'.
10854         (mono_reflection_event_builder_get_event_info): New function.
10855
10856 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
10857
10858         * object.h: add mono_type_initialization_init
10859
10860         * object.c (mono_runtime_class_init): 
10861         implement class constructor synchronization rules
10862         to cope with threading issues.  
10863         add mono_type_initialization_init
10864
10865         * appdomain.c (mono_runtime_init): call 
10866         mono_type_initialization_init
10867
10868         * class.h: removing initializing field from MonoVTable
10869
10870 2004-03-23  Martin Baulig  <martin@ximian.com>
10871
10872         * class.c (my_mono_class_from_generic_parameter): Use
10873         `param->name' if it's not NULL. 
10874
10875 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
10876
10877         * class.c: do not insert non-virtual methods in the vtable.
10878         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
10879         that means the method is non-virtual. This never would have
10880         happened before.
10881
10882 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
10883
10884         * profiler.c: Added lock for accessing coverage_hash.
10885
10886 2004-03-22  Martin Baulig  <martin@ximian.com>
10887
10888         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
10889         `method->method->signature->generic_param_count != 0' to make it
10890         work for interface methods.
10891
10892 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10893
10894         * process.c: quote the string passed to the shell using g_shell_quote.
10895
10896 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10897
10898         * threads.c:
10899         (mono_threads_manage): don't remove the finalizer thread and self
10900         from the threads hash table so that mono_thread_manage can be called
10901         more than once.
10902
10903 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10904
10905         * process.c: quote the arguments when UseShellExecute is true. Fixes
10906         bug #55790.
10907
10908 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10909
10910         * threads.c: set mono_thread_detach as a cleanup routine for every
10911         thread. This way it's always executed upon thread termination, either
10912         aborted or finished normally. No more xsp hangs!
10913
10914 2004-03-17  Martin Baulig  <martin@ximian.com>
10915
10916         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
10917         `int count_nested' and a `MonoType **nested'.
10918
10919         * reflection.c (mono_reflection_bind_generic_parameters): Moved
10920         most of the functionality into a new static
10921         do_mono_reflection_bind_generic_parameters() and don't take a
10922         `MonoType *nested_in' argument any more.  Don't compute nested
10923         types here.
10924         (mono_reflection_generic_inst_get_nested_types): New public method
10925         to get nested types.
10926
10927         * class.c (mono_class_create_generic): Set `klass->nested_in' if
10928         we're a nested class.
10929
10930         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
10931         mono_reflection_generic_inst_get_nested_types() to compute the
10932         nested types.
10933
10934 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10935
10936         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
10937         descriptive error message under windows.
10938         
10939 2004-03-17  Martin Baulig  <martin@ximian.com>
10940
10941         * class.c (dup_type): Added `const MonoType *original' argument;
10942         copy the attrs from the original type.
10943
10944 2004-03-17  Martin Baulig  <martin@ximian.com>
10945
10946         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
10947         `m->generic_inst_cache' here.
10948
10949 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
10950
10951         * exception.h exception.c: Add stack_overflow_exception.
10952
10953 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10954
10955         * threadpool.c:
10956         (overlapped_callback): call SetEvent *after* invoking the callback.
10957         No need to call CloseHandle.
10958
10959 2004-03-16  Martin Baulig  <martin@ximian.com>
10960
10961         * reflection.c (mono_image_get_fieldref_token): Take a
10962         `MonoReflectionField *' instead of a `MonoClassField *' and a
10963         `MonoClass *'; store the `MonoReflectionField *' in the hash.
10964
10965 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10966
10967         * appdomain.c: don't add the culture to the filename we're looking for
10968         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
10969
10970 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10971
10972         * locales.c: don't ignore symbols when doing case insensitive compares.
10973         Thanks Dick! Fixes bug #54046.
10974
10975         * threads.c: surround 'threads' usage with enter/leave in
10976         mono_thread_manage.
10977
10978 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
10979
10980         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
10981         implicitly marshalled as [Out]. Fixes #55450.
10982
10983         (mono_marshal_get_runtime_invoke): Zero out the result if there is
10984         an exception.
10985
10986 2004-03-16  Martin Baulig  <martin@ximian.com>
10987
10988         * class.c (mono_class_from_generic_parameter): Use the actual
10989         parameter name. 
10990
10991 2004-03-16  Martin Baulig  <martin@ximian.com>
10992
10993         * reflection.c (type_get_signature_size): New static function.
10994         Compues the size of the type in a method signature.
10995         (method_get_signature_size): New static function; calls
10996         type_get_signature_size() to compute the actual size of the
10997         method's signature.
10998         (method_encode_signature): Use method_get_signature_size() to get
10999         the signature's size rather than using `nparams * 10'.
11000
11001 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11002
11003         * file-io.h: define here WapiOverlapped on windows. I don't want the
11004         regular OVERLAPPED one.
11005
11006         * file-io.c:
11007         * threadpool.c: somehow, BindIoCompletionCallback is not found.
11008         Disabling AIO on windows.
11009
11010 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11011
11012         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
11013         bug #55385.
11014
11015 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11016
11017         * appdomain.c: upgraded corlib version.
11018
11019         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
11020         and BeginWrite. Allow opening files for asynchrnous operations.
11021
11022         * file-io.h: new struct that maps FileStreamAsyncResult.
11023         * icall.c: added new icalls.
11024         * process.[ch]: support setting child process environment variables
11025         and use the SHELL or COMSPEC when UseShellExecute is true.
11026
11027         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
11028         callback for async. IO is here and also BindHandle.
11029
11030         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
11031         from here.
11032
11033 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11034
11035         * reflection.c (create_custom_attr): Allow len == 0.
11036
11037         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
11038         computation on big-endian machines.
11039
11040 2004-03-13  Martin Baulig  <martin@ximian.com>
11041
11042         * class.h (MonoGenericInst): Added `int count_ifaces'.
11043
11044         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
11045         `ginst->count_ifaces' instead `klass->interface_count' since we
11046         may get called before the vtable is created.
11047
11048         * loader.c (mono_method_get_param_names): If we're a generic
11049         instance, return and don't initialize the class.
11050
11051         * reflection.c (mono_reflection_setup_generic_class): Don't call
11052         ensure_runtime_vtable().
11053         (mono_reflection_bind_generic_parameters): Set
11054         `ginst->count_ifaces'.
11055
11056 2004-03-11  Jackson Harper <jackson@ximian.com>
11057
11058         * icall.c:
11059         * unicode.c:
11060         * unicode.h: Remove unused System.Char icalls.
11061         
11062 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
11063
11064         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
11065         code when we P/Invoke the first library in Windows.Forms, instead
11066         of when we first open the assembly.
11067
11068         * assembly.c: Drop the lookup from here.
11069
11070 2004-03-10  Martin Baulig  <martin@ximian.com>
11071
11072         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
11073         class for properties, fields and events.  Finally fixes #54945.
11074
11075 2004-03-10  Martin Baulig  <martin@ximian.com>
11076
11077         * metadata.c (mono_metadata_class_equal): New static function;
11078         checks whether two generic instances or two generic parameters are
11079         equal.
11080         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
11081         compare classes.        
11082
11083 2004-03-10  Martin Baulig  <martin@ximian.com>
11084
11085         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
11086
11087         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
11088         argument and write it into the `reflection_info' field.
11089
11090         * icall.c
11091         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
11092         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
11093
11094 2004-03-09  Jackson Harper  <jackson@ximian.com>
11095
11096         * char-conversions.h: use 8 bits for numeric data its all we need
11097         * icall.c: numeric data is only 8 bits now.
11098
11099 2004-03-09  Martin Baulig  <martin@ximian.com>
11100
11101         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
11102
11103         * class.c (init_properties, init_events): Initialize the new
11104         `parent' field.
11105
11106         * reflection.c (typebuilder_setup_properties): Likewise.
11107         (typebuilder_setup_events): Likewise.
11108
11109         * reflection.h (MonoEventInfo): Replaced `parent with
11110         `declaring_type' and `reflected_type'.
11111
11112         * icall.c (ves_icall_get_property_info): Distinguish between
11113         declaring and reflected type.
11114         (ves_icall_get_event_info): Likewise.
11115
11116 2004-03-09  Martin Baulig  <martin@ximian.com>
11117
11118         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
11119         (ves_icall_Type_GetField): Correctly set field->klass.
11120
11121 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11122
11123         * loader.h: Fix warning.
11124
11125 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
11126
11127         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
11128         library routine if present.  Notice that it will still continue
11129         executing even if its missing, for those working on the Gtk#
11130         edition of Windows.Forms.
11131
11132         * assembly.c (do_mono_assembly_open): If loading the
11133         System.Windows.Forms call mono_loader_wini_init.
11134
11135 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11136
11137         * class.h: Added MonoRemoteClass struct.
11138         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
11139         function for MonoStrings.
11140         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
11141         Added internal call for getting the proxy type.
11142         * marshal.c: Get the type of transparent proxies from its remote_class.
11143         Added methods that generate the IL for type checks and casts:
11144         mono_marshal_get_isinst, mono_marshal_get_castclass, 
11145         mono_marshal_get_proxy_cancast.
11146         * marshal.h: Declaration of the previous new methods.
11147         * object.c: Added new moethods for creating and updating MonoRemoteClass
11148         instances: mono_remote_class, mono_upgrade_remote_class, 
11149         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
11150         * verify.c: FIx transparent_proxy_fields layout.
11151         * appdomain.c: Bump corlib version.
11152
11153 2004-03-04  Jackson Harper  <jackson@ximian.com>
11154
11155         * icall.c: Add icall to access char conversion tables.
11156         * char-conversions.h: Character conversion tables.
11157         * Makefile.am: Add char-conversions.h private header file.
11158         
11159 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
11160
11161         * appdomain.c (unload_thread_main): Increase unloading timeout to
11162         10 sec as a temporary workaround for Nant problems.
11163
11164 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
11165
11166         * gc.c: Add checks for GC_enable and GC_disable.
11167
11168         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
11169         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
11170         (bug #54988).
11171         
11172 2004-02-27  Martin Baulig  <martin@ximian.com>
11173
11174         * reflection.c (mono_reflection_bind_generic_parameters): Take a
11175         `MonoReflectionType *' instead of a `MonoType *'.
11176
11177 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11178
11179         * gc.c (run_finalize): Avoid finalizing the object representing the
11180         finalizer thread.
11181         (finalizer_thread): Fix warning.
11182
11183 2004-02-25  Martin Baulig  <martin@ximian.com>
11184
11185         * class.c (_mono_class_get_instantiation_name): Added `int offset'
11186         argument for nested types.
11187         (mono_class_create_generic): Added support for nested generictypes.
11188
11189         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
11190         `GList *nested'.
11191
11192         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
11193
11194         * reflection.c (method_encode_signature): Increase the minimum
11195         value of `size' from 10 to 11.
11196         (mono_reflection_bind_generic_parameters): Take `int type_argc'
11197         and `MonoType **types' arguments instead of the `MonoArray
11198         *types'; added `MonoType *nested_in'.  Recursively instantiate
11199         nested classes. 
11200
11201 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11202
11203         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
11204         stack_overflow_ex members which are used by exception handling.
11205
11206         * appdomain.c (mono_runtime_init): Initialize the new members.
11207
11208         * gc.c (mono_gc_enable): New helper function.
11209         * gc.c (mono_gc_disable): New helper function.
11210
11211 2004-02-23  Martin Baulig  <martin@ximian.com>
11212
11213         * icall.c: I must have been really stupid - make it actually work
11214         this time ;-)
11215
11216 2004-02-23  Martin Baulig  <martin@ximian.com>
11217
11218         * loader.c (method_from_memberref): Only inflate the method if
11219         it's in another klass.
11220
11221 2004-02-23  Martin Baulig  <martin@ximian.com>
11222
11223         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
11224         (mono_class_init): If we're a generic instance and an interface,
11225         compute `class->interface_id'; also create `class->interfaces'
11226         here and inflate them.
11227
11228         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
11229         `ginst->is_open'.
11230         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
11231
11232         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
11233
11234 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
11235
11236         * reflection.c (method_encode_code): Improved the error message
11237         generated by the exception.
11238
11239 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11240
11241         * icall.c: Martin did not do what he said in the ChangeLog for
11242         2004-02-18, but put back the changes for properties and events.
11243         Commenting those changes out again and adding comment to bug #54518.
11244         
11245         * process.c: removed warning.
11246
11247 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
11248
11249         * marshal.c (emit_struct_conv): Print an error message instead of
11250         asserting when a type does not have the StructLayout attribute.
11251
11252 2004-02-20  Martin Baulig  <martin@ximian.com>
11253
11254         * reflection.c (mono_type_get_object): Also use the cache for
11255         generic instances.
11256         (mono_reflection_bind_generic_parameters): Always compute
11257         `ginst->ifaces'.        
11258
11259 2004-02-20  Martin Baulig  <martin@ximian.com>
11260
11261         * class.h (MonoGenericMethod): Removed `klass'.
11262
11263         * class.c (mono_class_inflate_generic_method): Added `MonoClass
11264         *klass' argument.
11265
11266 2004-02-20  Martin Baulig  <martin@ximian.com>
11267
11268         * reflection.c (method_encode_methodspec): Actually use the
11269         uninflated signature for the memberref.
11270
11271 2004-02-20  Martin Baulig  <martin@ximian.com>
11272
11273         * class.h (MonoGenericMethod): Removed `declaring'.
11274
11275         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
11276         is NULL, compute it here.
11277
11278 2004-02-20  Martin Baulig  <martin@ximian.com>
11279
11280         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
11281
11282         * metadata.c (mono_metadata_generic_inst_hash): New method.
11283         (mono_metadata_generic_inst_equal): New method.
11284
11285         * reflection.c (mono_reflection_bind_generic_parameters): Use the
11286         `klass->image->generic_inst_cache' cache to avoid creating
11287         duplicate MonoGenericInst's.
11288
11289         * class.c (mono_class_inflate_generic_type): Use the cache.
11290
11291 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11292
11293         * object.c: fixed gc descriptor calculation for embedded valuetypes.
11294
11295 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11296
11297         * icall.c: added Socket.WSAIoctl icall.
11298
11299         * socket-io.[ch]: implemented
11300         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
11301
11302 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
11303
11304         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
11305
11306 2004-02-18  Urs C Muff  <umuff@quark.com>
11307
11308         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
11309         this work on PPC and other big-endian architectures.
11310
11311         * debug-mono-symfile.h: Prepended the names of all the `guint32'
11312         fields with an underscore to make sure they're only accessed by
11313         the read32() macro.
11314
11315 2004-02-18  Martin Baulig  <martin@ximian.com>
11316
11317         * icall.c: Put the klass->refclass changes back for methods and
11318         fields, but not for properties and events.  We're currently not
11319         distinguishing between DeclaringType and ReflectedType for
11320         properties and events, that's what caused the regressions.
11321
11322 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11323
11324         * object.c:
11325         (mono_async_result_new): the handle can be NULL.
11326
11327         * threadpool.c: Use an event instead of a semaphore, don't initialize
11328         it until needed. This saves quite a few semaphores from being created
11329         when using the threadpool.
11330
11331 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
11332
11333         * object.c (mono_string_is_interned_lookup): Fix interning of long
11334         strings. Fixes #54473.
11335
11336         * domain.c (ldstr_equal): Optimize if the two strings are equal.
11337
11338         * icall.c: Revert the klass->refclass changes since they introduce
11339         regressions (bug #54518).
11340
11341 2004-02-18  Martin Baulig  <martin@ximian.com>
11342
11343         * class.c (mono_class_init): If we're a generic instance and don't
11344         come from a TypeBuilder, inflate our members here.
11345         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
11346         (mono_class_create_generic): New public method.
11347         (mono_class_initialize_generic): Removed.
11348         (get_instantiation_name): Renamed to
11349         _mono_class_get_instantiation_name() and made it public.
11350
11351 2004-02-18  Martin Baulig  <martin@ximian.com>
11352
11353         * class.c (mono_class_inflate_generic_type): Clear the new
11354         instance's `nginst->klass' when inflating a generic instance.
11355         (mono_class_is_subclass_of): Added (basic) support for generic
11356         instances.
11357
11358 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
11359
11360         * appdomain.h, domain.c: use a MonoCodeManager instead of a
11361         MonoMempool to hold compiled native code.
11362
11363 2004-02-17  Martin Baulig  <martin@ximian.com>
11364
11365         * class.h (MonoDynamicGenericInst): Added `count_properties' and
11366         `properties'.
11367
11368         * reflection.c (mono_reflection_generic_inst_initialize): Added
11369         `MonoArray *properties' argument.
11370
11371         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
11372
11373 2004-02-17  Martin Baulig  <martin@ximian.com>
11374
11375         * icall.c (ves_icall_Type_GetFields): Renamed to
11376         ves_icall_Type_GetFields_internal() and added a
11377         `MonoReflectionType *rtype' argument; pass it to
11378         mono_field_get_object() to set the field's "reflected" type.
11379         (ves_icall_Type_GetConstructors): Likewise.
11380         (ves_icall_Type_GetEvents): Likewise.
11381         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
11382         argument; pass it to mono_method_get_object() to set the method's
11383         "reflected" type.       
11384
11385 2004-02-17  Martin Baulig  <martin@ximian.com>
11386
11387         * class.h (MonoDynamicGenericInst): New type.
11388         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
11389
11390         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
11391         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
11392         (ves_icall_MonoGenericInst_GetFields): New interncall.
11393
11394         * class.c (mono_class_from_generic): Don't call
11395         mono_class_initialize_generic() if this is a dynamic instance;
11396         ie. it's being created from a TypeBuilder.
11397         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
11398         `class->byval_arg.type'.
11399
11400         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
11401         to `inflate_method' and made static.
11402         (mono_reflection_inflate_field): Removed.
11403         (mono_reflection_generic_inst_initialize): New public method.
11404
11405         * reflection.h (MonoReflectionGenericInst): Removed `methods',
11406         `ctors' and `fields'; added `initialized'.
11407
11408 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11409
11410         * debug-helpers.c (mono_method_full_name): Fix output for empty
11411         namespaces.
11412
11413 2004-02-12  Martin Baulig  <martin@ximian.com>
11414
11415         * class.h (MonoClassField): Added `MonoType *generic_type'.
11416
11417         * reflection.c (mono_image_get_fieldref_token): Added support for
11418         instantiated generic types.
11419         (field_encode_inflated_field): Removed.
11420         (mono_image_get_inflated_field_token): Removed.
11421         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
11422
11423         * reflection.h (MonoReflectionInflatedField): Removed.
11424
11425 2004-02-12  Martin Baulig  <martin@ximian.com>
11426
11427         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
11428         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
11429
11430         * reflection.c (mono_image_get_methodspec_token): Take a
11431         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
11432         (mono_image_create_token): Check whether we have a
11433         `method->signature->gen_method' and call
11434         mono_image_get_methodspec_token() if appropriate.
11435         (inflated_method_get_object): Removed.
11436         (mono_reflection_bind_generic_method_parameters): Return a
11437         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
11438         (mono_reflection_inflate_method_or_ctor): Likewise.
11439
11440         * reflection.h (MonoReflectionInflatedMethod): Removed.
11441
11442 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
11443
11444         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
11445         for custom valuetype marshalling.
11446
11447         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
11448
11449 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11450
11451         * icall.c: fixed WSAGetLastError_internal name.
11452
11453 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11454
11455         * threads.c (mono_thread_attach): Allow this to be called multiple
11456         times for a thread.
11457         
11458         * threads.c (build_wait_tids): Do not wait for ourselves.
11459
11460         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
11461         appdomain list is empty.
11462
11463         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11464         memory returned by mono_string_builder_to_utf16, since it points into
11465         managed memory. Thanks to Bernie Solomon for noticing this.
11466
11467         * icall.c: Add AppDomainSetup icalls.
11468
11469         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11470
11471         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11472         types.
11473
11474         * reflection.c (reflection_methodbuilder_to_mono_method): Save
11475         custom attributes to the method_aux struct. Also fix array indexes etc.
11476
11477         * loader.c (mono_method_get_param_names): Make dynamic case work again.
11478         
11479 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11480
11481         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11482         (both static and runtime) and reduce startup time.
11483
11484 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11485
11486         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11487         AsAny marshalling conversion instead of crashing.
11488
11489         * marshal.c: Fix warnings.
11490
11491 2004-02-09  Martin Baulig  <martin@ximian.com>
11492
11493         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11494
11495         * reflection.h (MonoReflectionInflatedMethod): Removed the
11496         `declaring' field, it's now in the unmanaged MonoGenericMethod.
11497
11498         * reflection.c (method_encode_methodspec): Removed the `method'
11499         argument; we get it from `gmethod->declaring'.
11500         (inflated_method_get_object): Removed the `declaring' argument.
11501
11502 2004-02-09  Martin Baulig  <martin@ximian.com>
11503
11504         * class.h (MonoGenericMethod): New type.
11505         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11506         `generic_method'.
11507
11508         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11509         a `MonoGenericMethod *gen_method' one.
11510
11511         * class.c (mono_class_inflate_generic_type): Take an additional
11512         `MonoGenericMethod * argument.  This is only non-NULL if we're
11513         inflating types for a generic method.   
11514         (mono_class_inflate_generic_signature): Renamed to
11515         inflate_generic_signature() and made static; take a
11516         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11517         (inflate_generic_header): Take a `MonoGenericMethod *' argument
11518         instead of a `MonoGenericInst *' one.
11519         (mono_class_inflate_generic_method): Likewise.
11520
11521         * reflection.c (encode_generic_method_sig): Take a
11522         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
11523         (method_encode_methodspec): Likewise.
11524         (inflated_method_get_object): Likewise. 
11525
11526         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
11527         field with a `MonoGenericMethod *gmethod' one.  
11528
11529 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
11530
11531         * class.h (mono_class_has_parent): add parens to expansion
11532         so you can ! this.
11533
11534 2004-02-08  Martin Baulig  <martin@ximian.com>
11535
11536         * image.h (MonoImage): Removed `generics_cache'.
11537
11538         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
11539         instead of a `MonoType *' argument; removed the `inflate_methods'
11540         argument.  Don't inflate methods here.
11541
11542         * loader.c (find_method): If it's a generic instance, call
11543         mono_class_init() on the `sclass->generic_inst->generic_type'.
11544
11545         * metadata.c (mono_type_size): Make this work on uninitialized
11546         generic instances; call it on the `ginst->generic_type's class.
11547
11548         * reflection.c (mono_reflection_bind_generic_parameters): Call
11549         mono_class_from_generic() to create the `ginst->klass'.
11550
11551 2004-02-08  Martin Baulig  <martin@ximian.com>
11552
11553         * class.h (MonoClass): Changed type of `generic_inst' from
11554         `MonoType *' to `MonoGenericInst *'.
11555
11556 2004-02-08  Martin Baulig  <martin@ximian.com>
11557
11558         * icall.c (ves_icall_Type_BindGenericParameters): Just call
11559         mono_type_get_object(), this is now creating a `MonoGenericInst'
11560         for MONO_TYPE_GENERICINST.
11561         (ves_icall_MonoGenericInst_GetParentType): Likewise.
11562         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
11563
11564         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
11565         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
11566         (inflated_method_get_object): Added `MonoClass *refclass' argument.
11567         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
11568         and reflected type.
11569
11570         * reflection.h (MonoReflectionInflatedMethod): Removed
11571         `declaring_type' and `reflected_type'.
11572
11573 2004-02-08  Martin Baulig  <martin@ximian.com>
11574
11575         * class.h (MonoGenericInst): Added `MonoType *parent' and
11576         `MonoType **ifaces'.
11577
11578         * reflection.h (MonoReflectionGenericInst): Removed `klass',
11579         `parent' and `interfaces'.
11580
11581         * reflection.c (mono_reflection_bind_generic_parameters): Take a
11582         `MonoType *' argument and return a `MonoType *'.
11583
11584         * icall.c
11585         (ves_icall_MonoGenericInst_GetParentType): New interncall.
11586         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
11587
11588 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
11591         valuetype marshalling.
11592
11593 2004-02-06  Martin Baulig  <martin@ximian.com>
11594
11595         * class.c
11596         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
11597         (my_mono_class_from_generic_parameter): Likewise.
11598
11599 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
11600
11601         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
11602         contents of the symbol files lazily.
11603
11604         * object.h (MonoThread): Add 'name' and 'name_len' fields.
11605
11606         * threads.h threads.c icall.c: New icalls for getting and setting the
11607         threads name.
11608
11609 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
11610
11611         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
11612         Raise an exception when the domain is not found.
11613
11614 2004-02-03  Martin Baulig  <martin@ximian.com>
11615
11616         * reflection.c (mono_image_get_methodspec_token): Use the
11617         uninflated signature; fixes gen-33.
11618
11619 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
11620
11621         * gc.c threads.c: Make the finalizer thread a normal managed thread so
11622         the finalizer code can use thread functionality.
11623
11624         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
11625         the finalizer thread.
11626
11627         * threads.c: Make some functions more robust.
11628
11629         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
11630
11631         * metadata.h: Add new marshalling conventions.
11632
11633         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
11634         stringbuilder marshalling. Fixes #53700.
11635
11636         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
11637
11638         * reflection.c (mono_image_get_type_info): Save declarative security
11639         info.
11640
11641         * reflection.c (mono_image_get_field_info): Handle uninitialized 
11642         unmanaged fields as well.
11643
11644         * appdomain.c: Bump corlib version.
11645
11646 2004-02-01  Martin Baulig  <martin@ximian.com>
11647
11648         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
11649         method type arguments.  
11650
11651 2004-01-30  Duncan Mak  <duncan@ximian.com>
11652
11653         * marshal.h: Add prototype for
11654         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
11655         and
11656         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
11657         fix the build.
11658
11659 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
11660
11661         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
11662         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
11663
11664 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11665
11666         * marshal.c (mono_marshal_get_native_wrapper): Add support for
11667         custom marshalling of valuetypes.
11668
11669         * marshal.c: Fix some warnings.
11670
11671 2004-01-29  Martin Baulig  <martin@ximian.com>
11672
11673         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
11674         for generic method parameters.
11675
11676         * reflection.c (method_encode_methodspec): Write the uninflated
11677         signature into the methodspec table.
11678         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
11679         is always the uninflated method.
11680         (reflection_methodbuilder_to_mono_method): Copy the generic
11681         parameters from the MethodBuilder into `header->gen_params'.
11682
11683 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
11684
11685         * class.c (mono_class_from_generic_parameter): Fix warning.
11686
11687 2004-01-27  Martin Baulig  <martin@ximian.com>
11688
11689         * class.c (mono_class_from_generic_parameter): Don't create
11690         `klass->methods' here.  
11691
11692 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
11693
11694         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
11695         extension since it does not work with libraries named lib<FOO>.dll.so.
11696
11697 2004-01-25  Martin Baulig  <martin@ximian.com>
11698
11699         * class.c (mono_class_inflate_generic_type): Added support for
11700         MONO_TYPE_GENERICINST.
11701
11702         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
11703         inflate methods on open constructed types.      
11704
11705 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11706
11707         * object.c: fire ProcessExit event in the root AppDomain after running
11708         Main. Fixes bug #53299.
11709
11710 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
11711
11712         * socket-io.c: include the new socket-wrappers.h header.
11713         Use the wrappers instead of the unix socket functions to make the code
11714         more clear.
11715
11716 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
11717
11718         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
11719
11720         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11721         Fixes #22532.
11722
11723 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
11724
11725         * reflection.c (mono_image_create_pefile): Handle the case when the
11726         entry point is not a MethodBuilder.
11727
11728         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11729         field to ReflectionMethod since it is not allways a builder.
11730
11731         * reflection.c (type_get_fully_qualified_name): New helper function to
11732         return the fully qualified name of a type.
11733
11734         * reflection.c (encode_marshal_blob): Always emit the fully qualified
11735         type name for custom marshallers.
11736
11737         * reflection.c (mono_marshal_spec_from_builder): Ditto.
11738
11739         * class.c (mono_class_setup_vtable): If a parent class already 
11740         implements an interface, use the implementing methods from that class.
11741         Fixes #53148.
11742
11743 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11744
11745         * threadpool.c: just return instead of ExitThread to allow for thread
11746         clean up earlier.
11747
11748 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
11749
11750         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
11751         when closing resource modules.
11752
11753         * reflection.c (mono_image_create_pefile): Handle the case when the
11754         entry point is not a MethodBuilder.
11755
11756         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
11757         field to ReflectionMethod since it is not allways a builder.
11758
11759 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
11760
11761         * marshal.c (mono_marshal_get_managed_wrapper): 
11762         mono_marshal_alloc takes native int so CONV_I
11763         the arg for 64bits.
11764
11765 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
11766
11767         * reflection.c (fixup_cattrs): New function to fixup the methoddef
11768         tokens in the cattr table. Fixes #53108.
11769
11770 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11771
11772         * loader.c: don't trim ".dll" before looking up in the config file.
11773         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
11774
11775 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
11776
11777         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
11778         Return the module which contains the resource as well.
11779         (ves_icall_System_Reflection_Module_Close): New icall.
11780
11781         * appdomain.c: Bump corlib version number.
11782
11783         * image.c (mono_image_addref): New public function.
11784
11785         * assembly.c: Call mono_image_addref.
11786
11787         * reflection.c (mono_module_get_object): Increase reference count of 
11788         the image.
11789
11790         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
11791         Fixes #22532.
11792
11793         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
11794         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
11795         proper exceptions on DllImport problems.
11796
11797 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
11798
11799         * class.c, metadata.c: eliminate CSIZE macro.
11800
11801 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
11802
11803         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
11804         * object.h: Added async_callback field in MonoAsyncResult.
11805         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
11806         * verify.c: Added async_callback in MonoAsyncResult layout.
11807
11808 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
11809
11810         * reflection.c (mono_reflection_get_custom_attrs): Add support
11811         for Modules.
11812
11813 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11814
11815         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
11816         marshalling.
11817         (mono_marshal_method_from_wrapper): Add null pointer check.
11818
11819 2004-01-16  Martin Baulig  <martin@ximian.com>
11820
11821         * debug-mono-symfile.h: Set version number to 36 and reflect
11822         latest symbol writer changes.
11823
11824 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
11825
11826         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
11827         multi-dimensional arrays.
11828         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
11829         (mono_class_from_mono_type): Use bounded_array_class_get.
11830         
11831         * class.c (mono_bounded_array_class_get): New function which takes
11832         a 'bounded' bool argument to distinguish vectors from one dimensional
11833         arrays.
11834
11835         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
11836         bounded_array_class_get if the array has bounds.
11837
11838         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
11839         Search modules loaded using AssemblyBuilder:AddModule as well.
11840
11841 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11842
11843         * appdomain.c: increased corlib version.
11844         * filewatcher.c: removed g_print.
11845         * icall.c:
11846         (get_property_info): only allocate what is actually requested.
11847         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
11848
11849 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11850
11851         * Makefile.am: added filewatcher.[ch]
11852         * filewatcher.[ch]: FileSystemWatcher runtime support.
11853         * icall.c: added new FSW icalls.
11854
11855 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11856
11857         * string-icalls.c: fix stringbuilder regression as suggested by
11858         Iain McCoy <iain@mccoy.id.au>.
11859
11860 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
11861
11862         * process.c (process_read_stringtable_block): Recognize '007f' as
11863         a language neutral stringtable block.
11864
11865 2004-01-12  Patrik Torstensson
11866
11867         * object.h (MonoStringBuilder) : Changed layout to support our
11868         new stringbuilder class.
11869         * marshal.c: Change marshalling to support the new layout of 
11870         string builder.
11871         * appdomain.c: increased version number because new layout of
11872         string builder.
11873
11874 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
11875
11876         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
11877         assembly name as an string instead of an AssemblyName, since it is
11878         easier to extract info from it.
11879
11880         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
11881         the culture subdirectories too. Fixes #52231.
11882
11883 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11884
11885         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
11886         It takes 2 new parameters with an optional name for the method to look
11887         for and case ignoring info.
11888
11889         * threadpool.c: removed unused variable.
11890
11891 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11892
11893         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
11894         It takes 2 new parameters with an optional name for the property to look
11895         for and case ignoring info.
11896         Fixes bug #52753.
11897
11898 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
11899
11900         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
11901         Fix #52451.
11902
11903 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11904
11905         * appdomain.c:
11906         * assembly.c: escape the uri before passing it to g_filename_from_uri.
11907         Fixes bug #52630.
11908
11909 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
11910
11911         * reflection.c: Add support for more than one unmanaged resource.
11912
11913         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
11914         in field->def_value, as done in all other cases.
11915
11916         * reflection.c (mono_reflection_get_custom_attrs): Add support for
11917         TypeBuilders.
11918
11919         * reflection.c (mono_reflection_create_runtime_class): Remove 
11920         errorneous assignment to klass->element_class, since it is already
11921         done in mono_reflection_setup_internal_class.
11922
11923 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11924
11925         * gc.c: added missing LeaveCriticalSection.
11926         * icall.c: indented a couple of lines.
11927         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
11928         if we call EndInvoke inside a callback. Fixes bug #52601.
11929
11930 2004-01-07  Martin Baulig  <martin@ximian.com>
11931
11932         * mono-debug-debugger.h
11933         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
11934
11935 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
11936
11937         * appdomain.c: Use messages in NotImplementedException.
11938
11939         * exception.c (mono_get_exception_not_implemented): Now this takes
11940         a message argument.
11941
11942         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
11943         exception instead of g_asserting an aborting when something is not
11944         implemented.
11945
11946         Add some inline docs.
11947
11948 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
11949
11950         * reflection.h: Update after changes to object layout.
11951
11952         * reflection.c: Implement saving of unmanaged aka win32 resources.
11953
11954         * appdomain.c: Bump version number.
11955
11956         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
11957         Handle missing domains gracefully.
11958
11959 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
11960
11961         * file-io.c : On Windows, there are much more invalid_path_chars.
11962
11963 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
11964
11965         * class.h, object.c: prepare for GetType () speedup.
11966
11967 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
11968
11969         * profiler.c: workaround for --profile null reference exception on
11970           cygwin. Patch by Patrik Torstensson.
11971
11972 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
11973
11974         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
11975         make work for unaligned access.
11976
11977 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
11978
11979         * class.c: small cleanup (class->fields [i] -> field).
11980         * image.c: check address of metadata is valid.
11981
11982 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
11983
11984         * assembly.h assembly.c (mono_assembly_loaded): New public function to
11985         search the list of loaded assemblies.
11986
11987         * reflection.c (mono_reflection_type_from_name): Use 
11988         mono_assembly_loaded instead of mono_image_loaded.
11989
11990         * reflection.c: Fix warnings.
11991
11992 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
11993
11994         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
11995         is dynamic. This is needed since an assembly can contain both dynamic and
11996         non-dynamic images.
11997
11998         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
11999         assembly->dynamic.
12000
12001         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
12002
12003         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
12004         to store modules loaded using AddModule.
12005
12006         * reflection.c (mono_image_fill_file_table): Generalize this so it works
12007         on Modules.
12008
12009         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
12010
12011         * reflection.c (mono_image_fill_export_table_from_module): New function to
12012         fill out the EXPORTEDTYPES table from a module.
12013
12014         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
12015         into a separate function. Also handle loaded non-dynamic modules.
12016
12017         * reflection.c (mono_image_basic_init): Fix memory allocation.
12018
12019         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12020
12021         * assembly.c (mono_assembly_load_references): Make this public.
12022
12023 2003-12-19  Martin Baulig  <martin@ximian.com>
12024
12025         * class.c (mono_class_initialize_generic): Made this static, take
12026         a `MonoGenericInst *' instead of a `MonoClass *'.
12027         (mono_class_from_generic): Call mono_class_initialize_generic()
12028         unless we're already initialized or being called from
12029         do_mono_metadata_parse_generic_inst().
12030
12031         * class.h (MonoGenericInst): Added `initialized' and
12032         `init_pending' flags.
12033
12034         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
12035         `mono_class_init (gklass)' or mono_class_initialize_generic()
12036         here; set `generic_inst->init_pending' while parsing the
12037         `type_argv'.
12038
12039 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
12040
12041         * locales.c: include string.h for memxxx prototypes
12042
12043 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12044
12045         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
12046         constructor when accessing literal fields.
12047
12048 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
12049
12050         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12051
12052         * reflection.c (assembly_add_resource_manifest): New function to fill
12053         the MANIFESTRESOURCE table.
12054
12055         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
12056
12057         * reflection.h: Update to changes in class layout.
12058
12059         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
12060         Reenable call to mono_runtime_is_shutting_down ().
12061
12062         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
12063         determine if the runtime is shutting down.
12064
12065 2003-12-16  Jackson Harper <jackson@ximian.com>
12066
12067         * icall.c: comment out call to mono_runtime_is_shutting_down to
12068         fix build.
12069         
12070 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
12071
12072         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
12073         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
12074
12075 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
12076
12077         * reflection.c: move definition of swap_with_size
12078         to before its first call
12079
12080 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
12081
12082         * appdomain.c (mono_runtime_is_shutting_down): New public function.
12083
12084         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
12085         icall.
12086
12087         * object.c: Fix warnings.
12088
12089         * icall.c (ves_icall_Type_Get...): Only consider inherited static
12090         members if FlattenHierarchy is set.
12091
12092         * reflection.c (mono_image_add_decl_security): New function to emit
12093         declarative security.
12094
12095         * reflection.h reflection.c: Add support for declarative security.
12096
12097         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12098         
12099 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12100
12101         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12102         
12103         * appdomain.c verify.c: Moved corlib version checking into its own
12104         function in appdomain.c since it needs to create vtables etc.
12105
12106 2003-12-13  Patrik Torstensson <p@rxc.se>
12107
12108         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
12109         instead of unwrapped server.
12110
12111 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
12112
12113         * verify.c (check_corlib): Fix field index.
12114
12115 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
12116
12117         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
12118         GetGacPath icall.
12119
12120 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
12121
12122         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
12123         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
12124         cope with sizeof(size_t) != sizeof(guint32).
12125
12126 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12127
12128         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
12129         in case of failure.
12130
12131 2003-12-10  Mark Crichton <crichton@gimp.org>
12132
12133         * icall.c: removed the GetNonZeroBytes.  We now handle this case
12134         in managed code.
12135
12136         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
12137
12138 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
12139
12140         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
12141         marked as deleted.
12142
12143 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12144
12145         * verify.c (check_corlib): Handle the case when the version field is 
12146         initialized by a static constructor.
12147
12148 2003-12-08  Patrik Torstensson  <p@rxc.se>
12149
12150     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
12151
12152 2003-12-08  Martin Baulig  <martin@ximian.com>
12153
12154         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
12155         a MonoReflectionGenericParameter, also take the parameter index
12156         and name as arguments.
12157         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12158         (ves_icall_MonoGenericParam_initialize): New interncall.
12159         (ves_icall_Type_make_byref_type): New interncall.
12160
12161         * reflection.h (MonoReflectionGenericParam): Derive from
12162         MonoReflectionType, not just from MonoObject.  Added `refobj' and
12163         `index' fields.
12164
12165         * reflection.c (mono_reflection_define_generic_parameter): Create
12166         and return a new MonoReflectionGenericParam; don't initialize the
12167         constraints here.
12168         (mono_reflection_initialize_generic_parameter): New public method;
12169         initializes the constraints and creates the `param->pklass'.
12170
12171 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12172
12173         * reflection.h reflection.c: Use the new fields 'num_types', 
12174         'num_fields' and 'num_methods' to track the number of types etc.
12175
12176         * verify.c (check_corlib): Check corlib version number.
12177
12178 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
12179
12180         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
12181         function works on all methods.
12182
12183 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12184
12185         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
12186         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
12187         the custom_type_info flag of the transparent proxy.
12188         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
12189         objects that supports IRemotingTypeInfo.
12190         * object.h: Added custom_type_info field in transparent proxy.
12191
12192 2003-12-06  Martin Baulig  <martin@ximian.com>
12193
12194         * class.c (mono_class_create_from_generic): Removed.
12195         (mono_class_from_generic): Check `ginst->klass' before doing
12196         anything else.  This is important to fully support "recursive"
12197         generic types.
12198
12199         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
12200         empty `generic_inst->klass' before doing anything else.
12201
12202 2003-12-06  Dick Porter  <dick@ximian.com>
12203
12204         * verify.c: 
12205         * object.h:
12206         * icall.c:
12207         * locales.c: Use C structs to access class fields.  Don't do a
12208         conversion between MonoString and UChar because both are
12209         platform-endian UTF-16.  Compare now takes startindex and count
12210         parameters.  Add a char overload for IndexOf.  Speed up the
12211         invariant string IndexOf.
12212
12213 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
12214
12215         * Makefile.am (monosn_LDADD): Fix parallel build.
12216
12217 2003-12-04  Martin Baulig  <martin@ximian.com>
12218
12219         * icall.c
12220         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12221         (ves_icall_Type_make_array_type): New interncall.       
12222
12223 2003-12-04  Martin Baulig  <martin@ximian.com>
12224
12225         * locales.c: also change it in the !HAVE_ICU case.
12226
12227 2003-12-04  Dick Porter  <dick@ximian.com>
12228
12229         * icall.c:
12230         * locales.c: construct_compareinfo is now in CompareInfo, not
12231         CultureInfo.
12232
12233 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12234
12235         * image.c (mono_image_load_file_for_image): Cache loaded images in the
12236         image->files array.
12237
12238         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
12239         table as well.
12240
12241         * assembly.c (mono_assembly_load_references): Only load references
12242         once.
12243
12244         * class.c (mono_class_from_name): Avoid linear search of the 
12245         EXPORTEDTYPE table.
12246
12247         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
12248
12249 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12250
12251         * image.h (MonoImage): Add 'field_cache' field.
12252
12253         * loader.c (mono_field_from_token): Cache field lookups.
12254         
12255         * reflection.c (mono_module_get_object): Fix name property.
12256
12257         * icall.c (ves_icall_get_enum_info): Update after changes to 
12258         mono_metadata_get_constant_index ().
12259
12260         * icall.c: Get rid of get_type_info icall, use a separate icall for
12261         each type property to avoid needless memory allocations. Fixes #51514.
12262
12263         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
12264         to avoid needless binary searches.
12265
12266         * class.c (class_compute_field_layout): Move the initialization of
12267         field->def_value to mono_class_vtable ().
12268
12269         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
12270         non-corlib types.
12271
12272         * object.c (mono_object_allocate): Make it inline.
12273
12274         * object.c (mono_object_allocate_spec): Make it inline.
12275         
12276 2003-12-02  Dick Porter  <dick@ximian.com>
12277
12278         * locales.c (create_NumberFormat): NumberFormatInfo construction.
12279         Patch by Mohammad DAMT (mdamt@cdl2000.com).
12280
12281 2003-12-01  Dick Porter  <dick@ximian.com>
12282
12283         * threads.c: Fix signature and call in CreateMutex and
12284         CreateEvent.
12285
12286 2003-12-01  Dick Porter  <dick@ximian.com>
12287
12288         * icall.c: 
12289         * locales.c: Implement string compares and searching
12290
12291         * object.h: Add extra Thread field
12292
12293 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
12294
12295         * reflection.c (fixup_method): Add support for MonoCMethod.
12296
12297 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
12298
12299         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
12300
12301         * reflection.c (assembly_name_to_aname): Allow extra characters in
12302         assembly names. Fixes #51468.
12303
12304 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12305
12306         * exception.c (mono_exception_from_name_domain): New helper function.
12307
12308         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
12309         exception object in the correct domain.
12310
12311         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
12312         formatting + make a copy a the input data.
12313
12314         * loader.c (mono_get_method_from_token): Methods which contain
12315         native code do not have entries in the ImplMap.
12316
12317         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
12318         Thanks to Gonzalo for spotting this.
12319         
12320         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
12321         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
12322
12323         * assembly.h (mono_assembly_load_from): Split the second part of 
12324         assembly loading into a new public function.
12325
12326         * exception.h (mono_get_exception_bad_image_format): New function.
12327
12328 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
12329
12330         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12331         Enumerate all modules inside a dynamic assembly. Fixes #51293.
12332         
12333         * icall.c: Add new icall for creating dynamic methods.
12334
12335         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
12336
12337         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
12338
12339         * reflection.c (mono_reflection_create_dynamic_method): New icall to
12340         create a dynamic method.
12341
12342         * reflection.c (resolve_object): New helper function.
12343
12344         * reflection.c: Generalize ReflectionMethodBuilder and the functions
12345         which manipulate it so they can also work on dynamic methods.
12346
12347         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
12348         creating the MonoReflectionMethodAux structure if it is not needed.
12349         
12350         * reflection.h verify.c: Update after changes to object layout.
12351
12352         * reflection.c (method_builder_encode_signature): Fix compilation on
12353         gcc 2.95.x.
12354
12355 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
12356
12357         * appdomain.h: Added support for context static fields. Added static_data
12358           field to MonoAppContext and renamed thread_static_fields to a more
12359           generic special_static_fields in MonoAppDomain, since it can now contain
12360           context static fields.
12361         * domain.c: Updated hashtable name.
12362         * object.c: Replaced field_is_thread_static() for a more generic
12363           field_is_special_static() which also checks for context static attribute.
12364           In mono_class_vtable(), added support for static context fields.
12365         * threads.c: Changed methods that manage thread static fields to more
12366           generic methods so they can be reused both for thread and context static
12367           data.
12368         * threads.h: Declared some new methods.
12369
12370 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
12371
12372         * reflection.h: Update after changes to the managed types.
12373
12374         * reflection.c (encode_custom_modifiers): New helper function.
12375
12376         * reflection.c (method_encode_signature): Emit custom modifiers.
12377
12378         * reflection.c (field_encode_signature): Emit custom modifiers.
12379
12380 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12381
12382         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
12383
12384         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
12385         implementation.
12386
12387         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
12388         icall.
12389
12390         * object.c (mono_field_get_value_object): New function.
12391
12392         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
12393         specific.
12394
12395 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12396
12397         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
12398         return a preallocated out-of-memory exception instance.
12399
12400         * object.c (out_of_memory): Use the new function.
12401
12402         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
12403         flag is before the custom modifiers. Fixes #49802.
12404
12405 2003-11-16  Martin Baulig  <martin@ximian.com>
12406
12407         * class.c (mono_class_is_open_constructed_type): Implemented the
12408         MONO_TYPE_GENERICINST case.
12409
12410 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12411
12412         * assembly.c (mono_assembly_fill_assembly_name): New function to
12413         fill out the MonoAssemblyName structure.
12414         (mono_assembly_open): Use the new function.
12415
12416         * icall.c (fill_reflection_assembly_name): New helper function.
12417
12418         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
12419         new function.
12420
12421         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
12422
12423 2003-11-15  Martin Baulig  <martin@ximian.com>
12424
12425         * class.c (mono_class_is_open_constructed_type): New public
12426         function; checks whether a type is an open constructed type,
12427         ie. whether it still contains type parameters.
12428         (mono_class_inflate_generic_type): If we're a type parameter and
12429         the inflated type is also a MONO_TYPE_(M)VAR, return the original
12430         type.
12431
12432         * class.h (MonoGenericInst): Added `guint32 is_open'.
12433
12434         * loader.c (method_from_methodspec): Check whether we're an open
12435         or closed constructed type and set `ginst->is_open'.
12436
12437         * reflection.c (mono_reflection_bind_generic_parameters): Check
12438         whether we're an open or closed constructed type and set
12439         `ginst->is_open'.
12440         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
12441         from open constructed types.
12442
12443 2003-11-15  Martin Baulig  <martin@ximian.com>
12444
12445         * reflection.c (mono_reflection_bind_generic_parameters): If we're
12446         a generic instance (instead of a generic type declaration) with
12447         unbound generic parameters, bind them to our actual types.
12448
12449 2003-11-14  Martin Baulig  <martin@ximian.com>
12450
12451         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
12452
12453         * reflection.c (mono_reflection_bind_generic_parameters): If we're
12454         an interface type, populate `res->interfaces' with instantiated
12455         versions of all the interfaces we inherit.
12456
12457 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
12458
12459         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12460         when MONO_PATH is set but doesn't contain the install dir.
12461
12462 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12463
12464         * icall.c:
12465         (ves_icall_Type_GetInterfaces): don't return an interface twice when
12466         it's also implemented in base classes. Fixes bug #50927.
12467
12468 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
12469
12470         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12471         if this method is called from a finalizer. Fixes #50913.
12472
12473 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
12474
12475         * threads.c: Implement VolatileRead/VolatileWrite
12476
12477         * icall.c: Add new icalls for VolatileRead/VolatileWrite
12478
12479 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12480
12481         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
12482         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12483         2.95.3.
12484
12485         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
12486         from Peter Ross (pro@missioncriticalit.com).
12487         
12488 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
12489
12490         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12491
12492 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12493
12494         * assembly.c (mono_assembly_load_references): Disable check because it
12495         triggers on older corlibs which lots of people have.
12496
12497 2003-11-12  Jackson Harper  <jackson@ximian.com>
12498
12499         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12500         load corlib.dll if mscorlib.dll is not found.
12501         * assembly.h: Remove corlib name define.
12502         * class.c:
12503         * domain.c:
12504         * image.c: Change corlib name to mscorlib.
12505         
12506 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12507
12508         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12509
12510 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
12511
12512         * appdomain.h: Added loader_optimization here to sync with the C#
12513         code, and add disallow_binding_redirects field.
12514
12515 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12516
12517         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
12518
12519         * reflection.c (mono_image_build_metadata): Fix crash on modules
12520         with no types.
12521
12522         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
12523
12524         * icall.c (ves_icall_get_method_info): Return callingConvention as
12525         well.
12526
12527         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
12528         namespaces from the EXPORTEDTYPE table as well.
12529
12530         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
12531         from all modules inside the assembly.
12532         
12533 2003-11-11  Martin Baulig  <martin@ximian.com>
12534
12535         * reflection.c (mono_reflection_bind_generic_parameters): Make
12536         this work for interfaces.
12537
12538 2003-11-11  Martin Baulig  <martin@ximian.com>
12539
12540         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
12541
12542 2003-11-11  Martin Baulig  <martin@ximian.com>
12543
12544         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
12545         "MonoInflatedMethod" and "MonoInflatedCtor".
12546
12547 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12548
12549         * reflection.c (resolution_scope_from_image): Use the assembly table
12550         from the manifest module, since other modules don't have it.
12551
12552         * debug-helpers.c (mono_type_full_name): New helper function.
12553
12554         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
12555
12556         * image.c (mono_image_load_file_for_image): New public function which
12557         is a replacement for the load_file_for_image in class.c.
12558
12559         * assembly.c (mono_assembly_load_module): A wrapper for the function
12560         above which does assembly association and reference loading too.
12561
12562         * class.c (mono_class_from_name): Call mono_assembly_load_module.
12563
12564 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12565
12566         * appdomain.c: not all of the attributes for the full assembly name
12567         are required and the order doesn't matter. Fixes bug #50787.
12568
12569 2003-11-10  Dick Porter  <dick@ximian.com>
12570
12571         * locales.c: Use platform-endian UTF16
12572
12573 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12574
12575         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12576         
12577 2003-11-10  Martin Baulig  <martin@ximian.com>
12578
12579         * metadata.c
12580         (mono_metadata_load_generic_params): Make this actually work.
12581
12582         * reflection.c (mono_reflection_bind_generic_parameters): If our
12583         parent is a generic instance, pass all the `types' to it, no
12584         matter whether it has the same number of type parameters or not.
12585
12586 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
12587
12588         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
12589
12590         * assembly.c (mono_assembly_load_references): Move the image<->assembly
12591         assignment code to this function so it gets called recursively for all
12592         modules.
12593
12594         * image.c (load_modules): Remove the assembly assignment since it is
12595         now done by mono_assembly_load_references.
12596         
12597         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12598         Add 'module' argument.
12599         (mono_module_get_types): New helper function.
12600         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
12601
12602 2003-11-08  Martin Baulig  <martin@ximian.com>
12603
12604         * class.c (mono_class_inflate_generic_method): Interface method
12605         don't have a header.
12606
12607         * reflection.c (mono_image_get_methodspec_token): Take an
12608         additional `MonoGenericInst *' argument instead of reading it from
12609         the header; this is necessary to support interfaces.
12610         (mono_image_create_token): Pass the `MonoGenericInst *' from the
12611         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
12612         (inflated_method_get_object): Take an additional `MonoGenericInst *'
12613         argument.
12614
12615         * reflection.h (MonoReflectionInflatedMethod): Added
12616         `MonoGenericInst *ginst'.
12617
12618 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
12619
12620         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
12621
12622 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
12623
12624         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
12625
12626 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
12627
12628         * reflection.c 
12629         (reflection_methodbuilder_from_method_builder):
12630         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
12631         initialize a ReflectionMethodBuilder structure.
12632         (mono_image_get_methodbuilder_token):
12633         (mono_image_get_ctorbuilder_token): New functions to emit memberref
12634         tokens which point to types in another module inside the same assembly.
12635
12636         * reflection.c: Use the new helper functions.
12637         
12638         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
12639
12640         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
12641         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
12642
12643         * reflection.c (resolution_scope_from_image): Emit a moduleref if
12644         neccesary.
12645
12646         * reflection.c (mono_image_build_metadata): Emit metadata only for the
12647         current module. Emit the manifest only for the main module.
12648
12649         * reflection.c (mono_image_create_token): Add assertion when a 
12650         memberref needs to be created.
12651
12652         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
12653
12654         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
12655         larger buffer for the custom attribute blob. Fixes #50637.
12656         
12657 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12658
12659         * threadpool.c: notify listener on async processing handles after
12660         invoking the async callback. Thanks to Zoltan.
12661
12662 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12663
12664         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
12665         avoid code duplication.
12666
12667         * reflection.h (MonoDynamicImage): New type which is currently unused,
12668         but will be used through the ref.emit code in place of 
12669         MonoDynamicAssembly.
12670
12671         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12672         object layout.
12673
12674         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
12675         a MonoDynamicImage instead of just a MonoImage.
12676         
12677         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
12678         icalls to ModuleBuilder but keep their semantics, so they will work
12679         with moduleb->assemblyb. This will change later.
12680         
12681 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12682
12683         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
12684         object layout.
12685
12686         * reflection.c (mono_image_build_metadata): Avoid creation of a default
12687         main module, since it is now done by the managed code.
12688
12689 2003-11-03  Martin Baulig  <martin@ximian.com>
12690
12691         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
12692         `ginst->klass' here.
12693         (method_encode_methodspec): Don't use the `ginst->generic_method's
12694         klass if it's a generic instance, use `ginst->klass' in this case.
12695
12696 2003-11-03  Martin Baulig  <martin@ximian.com>
12697
12698         * reflection.c (mono_image_get_generic_method_param_info):
12699         Removed, use mono_image_get_generic_param_info() instead.
12700         (mono_image_get_type_info): Write the GenericParam table before
12701         the Method table.  This is neccessary because in the GenericParam
12702         table, type parameters of the class (ie. '!0' etc.) must come
12703         before the ones from its generic methods (ie. '!!0' etc).
12704
12705 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
12706
12707         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
12708
12709 2003-11-02  Martin Baulig  <martin@ximian.com>
12710
12711         * reflection.c (create_generic_typespec): Take a
12712         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
12713         the generic parameters from it.
12714
12715 2003-11-02  Martin Baulig  <martin@ximian.com>
12716
12717         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
12718         instead of a `MonoClassField *' since we just need the type.
12719         (create_generic_typespec): New static function.  Creates a
12720         TypeSpec token for a generic type declaration.
12721         (mono_image_get_generic_field_token): New static function.
12722         (mono_image_create_token): If we're a FieldBuilder in a generic
12723         type declaration, call mono_image_get_generic_field_token() to get
12724         the token.
12725
12726 2003-11-02  Martin Baulig  <martin@ximian.com>
12727
12728         * reflection.h
12729         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
12730         `MonoReflectionGenericInst *declaring_type' and
12731         `MonoReflectionGenericInst *reflected_type' fields.
12732
12733         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
12734         `MonoReflectionGenericInst *declaring_type' and a
12735         `MonoReflectionGenericInst *reflected_type' argument instead of a
12736         single `MonoReflectionGenericInst *type' one.  Set
12737         `res->declaring_type' and `res->reflected_type' from them.
12738         (mono_reflection_inflate_field): Likewise.      
12739
12740 2003-11-02  Martin Baulig  <martin@ximian.com>
12741
12742         * class.c (mono_class_setup_vtable): Don't store generic methods
12743         in the vtable.  
12744
12745 2003-11-02  Martin Baulig  <martin@ximian.com>
12746
12747         * reflection.h (MonoReflectionGenericInst): Added
12748         `MonoReflectionType *declaring_type'.
12749
12750         * reflection.c (mono_reflection_bind_generic_parameters): Use
12751         `if (tb->parent)' instead of `klass->parent'.
12752
12753 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
12754
12755         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
12756         with an empty ASSEMBLY table.
12757
12758         * reflection.c (mono_image_build_metadata): Avoid using the same loop
12759         variable in the inner and outer loops.
12760
12761 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
12762
12763         * metadata.h (mono_metadata_make_token): Put parentheses around macro
12764         argument.
12765
12766         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
12767         
12768         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
12769         icalls. Instead, do everything in managed code. This is needed since
12770         it is hard to restore the original domain etc. in unmanaged code in the
12771         presence of undeniable exceptions.
12772
12773         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
12774         New icalls to push and pop appdomain refs.
12775
12776 2003-10-31  Martin Baulig  <martin@ximian.com>
12777
12778         * class.c (inflate_generic_type): Renamed to
12779         mono_class_inflate_generic_type() and made it public.
12780
12781         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
12782         New interncall.
12783
12784         * loader.c (mono_field_from_memberref): Also set the retklass for
12785         typespecs.
12786
12787         * fielder.c (mono_image_get_inflated_field_token): New static
12788         method; creates a metadata token for an inflated field.
12789         (mono_image_create_token, fixup_method): Added support for
12790         "MonoInflatedField".
12791         (fieldbuilder_to_mono_class_field): New static function.
12792         (mono_reflection_inflate_field): New public function.
12793
12794         * reflection.h
12795         (MonoReflectionGenericInst): Added `MonoArray *fields'.
12796         (MonoReflectionInflatedField): New typedef.     
12797
12798 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
12799
12800         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
12801         for Solaris and other platforms without s6_addr16
12802
12803 2003-10-30  Martin Baulig  <martin@ximian.com>
12804
12805         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
12806         argument instead of two.
12807         (mono_class_inflate_generic_signature): Likewise.
12808         (inflate_generic_header): Likewise.
12809         (mono_class_inflate_generic_method): Likewise.  In addition, if
12810         `ginst->klass' is set, it becomes the new `method->klass'.
12811
12812         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
12813         field.
12814
12815         * reflection.c (encode_generic_method_sig): Write a 0xa as the
12816         first byte. [FIXME]
12817         (method_encode_methodspec): If we have generic parameters, create
12818         a MethodSpec instead of a MethodRef.
12819         (fixup_method): Added support for "MonoInflatedMethod" and
12820         "MonoInflatedCtor".
12821         (mono_image_create_token): Added support for "MonoInflatedMethod"
12822         and "MonoInflatedCtor".
12823         (inflated_method_get_object): New static function; returns a
12824         managed "System.Reflection.MonoInflatedMethod" object.
12825         (mono_reflection_bind_generic_method_parameters): Return a
12826         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
12827         (mono_reflection_inflate_method_or_ctor): Likewise.
12828         (mono_image_get_generic_method_param_info): Initialize unused
12829         fields to zero.
12830         (mono_image_get_generic_param_info): Likewise.
12831
12832         * reflection.h (MonoReflectionInflatedMethod): New public
12833         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
12834         "S.R.MonoInflatedCtor" classes.
12835
12836         * loader.c (method_from_memberref): If we're a TypeSpec and it
12837         resolves to a generic instance, inflate the method.
12838
12839 2003-10-28  Dick Porter  <dick@ximian.com>
12840
12841         * object.c (mono_runtime_run_main): Convert command-line arguments
12842         into utf8, falling back to the user's locale encoding to do so.
12843
12844 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
12845
12846         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
12847         at this time.
12848
12849         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
12850
12851         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
12852         up icalls at method definition time. Partially fixes #33569.
12853
12854 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
12855
12856         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
12857         marshalling of arrays. Fixes #50116.
12858
12859         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
12860
12861         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
12862         points to a vtable in the dying appdomain.
12863
12864         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
12865         listeners into unmanaged code inside the lock.
12866
12867         * object.c (mono_class_vtable): Turn off typed allocation in non-root
12868         domains and add some comments.
12869
12870 2003-10-25  Martin Baulig  <martin@ximian.com>
12871
12872         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
12873
12874         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
12875
12876         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
12877         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
12878         currently parsing.  Create the generic class and store it in
12879         `generic_inst->klass' before parsing the type arguments.  This is
12880         required to support "recursive" definitions; see mcs/tests/gen-23.cs
12881         for an example.
12882         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
12883         to support recursive typespec entries.
12884
12885         * class.c (mono_class_setup_parent): If our parent is a generic
12886         instance, we may get called before it has its name set.
12887         (mono_class_from_generic): Splitted into
12888         mono_class_create_from_generic() and mono_class_initialize_generic().
12889
12890 2003-10-25  Martin Baulig  <martin@ximian.com>
12891
12892         * icall.c (ves_icall_Type_BindGenericParameters): Return a
12893         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
12894         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
12895         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
12896
12897         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
12898         (create_typespec): Likewise.
12899         (mono_reflection_bind_generic_parameters): Return a
12900         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
12901         (mono_reflection_inflate_method_or_ctor): New public function.
12902
12903         * reflection.h (MonoReflectionGenericInst): New typedef.        
12904
12905 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
12906
12907         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
12908         inside the domain lock. Fixes #49993.
12909         
12910         * object.c (mono_class_vtable): When typed allocation is used, 
12911         allocate vtables in the GC heap instead of in the mempool, since the
12912         vtables contain GC descriptors which are used by the collector even
12913         after the domain owning the mempool is unloaded.
12914
12915         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
12916
12917         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
12918         reflect what it does. Also invalidate mempools instead of freeing
12919         them if a define is set.
12920
12921         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
12922         of the appdomain.
12923         
12924         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
12925         hold the finalizable objects in this domain.
12926
12927         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
12928         appdomain.
12929
12930         * appdomain.c (mono_domain_set): New function to set the current
12931         appdomain, but only if it is not being unloaded.
12932
12933         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
12934         appdomain which is being unloaded.
12935         
12936         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
12937         unloading of the root appdomain.
12938
12939         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
12940         icall to execute a method in another appdomain. Intended as a 
12941         replacement for InternalSetDomain, which can confuse the code 
12942         generation in the JIT.
12943
12944         * appdomain.c (mono_domain_is_unloading): New function to determine
12945         whenever an appdomain is unloading.
12946
12947         * appdomain.c (mono_domain_unload): New function to correctly unload
12948         an appdomain.
12949
12950         * assembly.c (mono_assembly_load_references): Check that an assembly
12951         does not references itself.
12952
12953         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
12954         domain manually, it asks the finalizer thread to do it, then waits for
12955         the result. Also added a timeout.
12956
12957         * icall.c: Register the new icalls.
12958
12959         * threads.h threads.c: Export the mono_gc_stop_world and 
12960         mono_gc_start_world functions.
12961         
12962         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
12963         function to fill out the mempool with 0x2a.
12964
12965 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
12966
12967         * reflection.h (MonoReflectionMethodAux): New structure to store
12968         information which is rarely used, thus is not in the MonoMethod
12969         structure.
12970
12971         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
12972         store the aux info.
12973
12974         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
12975         and marshalling info into the aux structure.
12976
12977         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
12978         from the aux structure.
12979
12980         * loader.c (mono_method_get_param_names): Retrieve the param names from
12981         the aux structure.
12982         
12983 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
12984
12985         * exception.h exception.c: Add AppDomainUnloadedException && fix 
12986         warning.
12987
12988 2003-10-21  Dick Porter  <dick@ximian.com>
12989
12990         * socket-io.c
12991         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
12992         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
12993
12994 2003-10-21  Martin Baulig  <martin@ximian.com>
12995
12996         * reflection.c (mono_reflection_bind_generic_parameters):
12997         `klass->parent' is NULL for interfaces.
12998
12999 2003-10-21  Martin Baulig  <martin@ximian.com>
13000
13001         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13002
13003 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
13004
13005         * exception.c (mono_exception_from_name_msg): New helper function for
13006         creating exceptions and initializing their message field.
13007
13008         * exception.c: Simplify functions using the new helper.
13009
13010         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
13011         New function.
13012
13013         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
13014         mono_raise_exception, since otherwise gcc doesn't generate the function
13015         epilog for raise_exception, confusing the stack unwinding in the JIT.
13016         Fixes #45043.
13017
13018         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
13019         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
13020         Fixes #49499.
13021
13022 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13023
13024         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
13025         utf8.
13026
13027 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
13028
13029         * icall.c: Removed GetUninitializedObject method because
13030           AllocateUninitializedClassInstance does the same.
13031
13032 2003-10-18  Martin Baulig  <martin@ximian.com>
13033
13034         * class.c (inflate_generic_signature): Renamed to
13035         mono_class_inflate_generic_signature() and made it public.
13036         (my_mono_class_from_generic_parameter): New static function; if we
13037         don't already have the generic parameter's MonoClass, create a
13038         very simple one which is just used internally in the runtime and
13039         not passed back to managed code.
13040
13041         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
13042
13043         * metadata.h (MonoMethodSignature): Moved the
13044         `MonoGenericParam *gen_params' to the MonoMethodHeader.
13045         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
13046
13047         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
13048         ves_icall_MonoMethod_GetGenericArguments(); this is now an
13049         interncall on the MonoMethod class, not on MethodInfo.
13050         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
13051         calling mono_reflection_bind_generic_method_parameters() directly.
13052
13053         * loader.c (mono_method_get_signature): If this is a MethodSpec;
13054         return the already computed `method->signature'.
13055         (method_from_methodspec): New static function to load a method
13056         from a MethodSpec entry.
13057         (mono_get_method_from_token): Call the new method_from_methodspec()
13058         for MethodSpec tokens.  
13059         (mono_get_method_from_token): If we're a generic method, load the
13060         type parameters.
13061
13062         * reflection.c (mono_image_get_memberref_token): Allow
13063         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
13064         table.
13065         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
13066         (mono_image_create_token): First check whether it's a generic
13067         method (so we'd need to create a MethodSpec), then do the other
13068         two alternatives.
13069         (mono_reflection_bind_generic_method_parameters): Return a
13070         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
13071         called directly from the interncall.
13072
13073 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
13074
13075         * reflection.c (load_public_key): Move loading of the public key
13076         into managed code.
13077
13078         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
13079
13080         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
13081         fields.
13082
13083         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
13084         culture, hash_alg and public_key. Fixes #49555.
13085
13086 2003-10-17  Martin Baulig  <martin@ximian.com>
13087
13088         * class.h (MonoGenericInst): Moved this declaration here and added
13089         `MonoMethod *generic_method'.
13090
13091         * icall.c
13092         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
13093         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
13094
13095         * metadata.c (mono_metadata_type_equal): Two types of
13096         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
13097         index; ie. don't compare the address of the `MonoGenericParam'
13098         structure.
13099         (mono_metadata_load_generic_params): Removed the `MonoMethod
13100         *method' argument.
13101
13102         * metadata.h (MonoGenericInst): Moved declaration to class.h.
13103         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
13104
13105         * reflection.c (method_encode_signature): Encode the number of
13106         generic parameters.
13107         (encode_generic_method_sig): New static function.
13108         (method_encode_methodspec): New static function; creates an entry
13109         in the MethodSpec table for a generic method.
13110         (mono_image_get_methodspec_token): New static function.
13111         (mono_image_create_token): Call mono_image_get_methodspec_token()
13112         for generic methods.
13113         (mono_reflection_bind_generic_method_parameters): New public
13114         function.  Instantiates a generic method.
13115
13116 2003-10-16  Martin Baulig  <martin@ximian.com>
13117
13118         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
13119         *gen_params' here from MonoMethodHeader.
13120
13121         * metadata.c (mono_metadata_parse_method_signature): If we have
13122         generic parameters, initialize `method->gen_params' and then set
13123         the correct `type->data.generic_param' in all the parameters.
13124
13125 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
13126
13127         * threads.c (mono_threads_get_default_stacksize): New function to 
13128         return the default stacksize.
13129
13130         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
13131         termination of the finalizer thread, since the previous method had
13132         race conditions. Fixes #49628.
13133
13134         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
13135         as for the other managed threads.
13136
13137 2003-10-16  Martin Baulig  <martin@ximian.com>
13138
13139         * class.c (inflate_generic_signature): Copy `generic_param_count'
13140         and `gen_params'.
13141
13142         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
13143         New interncall.
13144
13145         * metadata.c (mono_metadata_parse_method_signature): Actually set
13146         the `method->generic_param_count' here.
13147         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
13148
13149 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
13150
13151         * object.h: Add a new field to TypedRef to simplify the implementation
13152         of the REFANY opcodes in the JIT.
13153
13154         * icall.c: Make use of the new field.
13155
13156         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
13157         dynamically.
13158
13159 2003-10-15  Martin Baulig  <martin@ximian.com>
13160
13161         * class.c (mono_class_from_gen_param): Renamed to
13162         mono_class_from_generic_parameter() and moved most of the
13163         functionality from mono_reflection_define_generic_parameter()
13164         here; ie. we create a "real" class here.
13165         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
13166         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
13167         previously been called.
13168
13169         * class.h (MonoGenericParam): Moved the declaration of this struct
13170         here from metadata.h and added `MonoMethod *method'.
13171
13172         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
13173         interncall.
13174
13175         * loader.c (mono_get_method_from_token): If we have any generic
13176         parameters, call mono_metadata_load_generic_params() to read them
13177         from the MONO_TABLE_GENERICPAR.
13178
13179         * metadata.c (mono_metadata_load_generic_params): Added
13180         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
13181
13182         * metadata.h (MonoMethodSignature): Replaced
13183         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
13184         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
13185
13186         * reflection.c (mono_reflection_define_generic_parameter): Moved
13187         most of the functionality into the new
13188         mono_class_from_generic_parameter(); set the `method' field if
13189         we're a method parameter.       
13190
13191 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
13192
13193         * marshal.c (emit_struct_conv): if native size is 0
13194         emit no code.
13195
13196 2003-10-14  Martin Baulig  <martin@ximian.com>
13197
13198         * icall.c: The generics API has changed in the spec since it was
13199         added to System.Type; these modifications make it match the spec
13200         again.
13201         (ves_icall_Type_GetGenericParameters): Renamed to
13202         `ves_icall_Type_GetGenericArguments'.
13203         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
13204         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
13205         `ves_icall_MonoType_get_HasGenericArguments'.
13206         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
13207         `ves_icall_MonoType_get_IsGenericParameter'.
13208         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
13209         this is no interncall anymore.
13210         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
13211         `ves_icall_TypeBuilder_get_IsGenericParameter'.
13212
13213 2003-10-14  Martin Baulig  <martin@ximian.com>
13214
13215         * reflection.c (mono_reflection_bind_generic_parameters): Also
13216         inflate generic methods if we're reading the class from IL.
13217
13218 2003-10-13  Martin Baulig  <martin@ximian.com>
13219
13220         * reflection.c (mono_reflection_define_generic_parameter): This
13221         method isn't called directly from the icall anymore; take a
13222         `MonoReflectionAssemblyBuilder *' so we can use this for type and
13223         method generic parameters.
13224         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
13225         (method_builder_encode_signature): Encode generic parameters.
13226         (mono_image_get_method_info): Write generic params to the
13227         MONO_TABLE_GENERICPARAM table.
13228
13229         * reflection.h (MonoReflectionMethodBuilder): Added
13230         `MonoArray *generic_params'.
13231
13232         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
13233
13234         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
13235         wrapper for mono_reflection_define_generic_parameter().
13236         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
13237
13238 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
13239
13240         * marshal.h: Add missing function to fix build.
13241
13242         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
13243         the SetLastError pinvoke attribute.
13244
13245         * marshal.c (mono_marshal_set_last_error): New helper function called
13246         by the generated code.
13247         
13248         * marshal.c (mono_mb_emit_branch): New helper function.
13249
13250         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
13251
13252         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13253         classes as parameters and return values of delegates. Fixes #29256. 
13254
13255 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
13256
13257         * locales.c: use gint32 in non HAVE_ICU case
13258
13259 2003-10-11  Martin Baulig  <martin@ximian.com>
13260
13261         * mono-debug.c (mono_debug_add_method): Added a workaround for
13262         bug #48591.
13263
13264 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
13265
13266         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
13267         delegates passed to native code must use the STDCALL calling 
13268         convention. Fixes #35987.
13269
13270 2003-10-10  Martin Baulig  <martin@ximian.com>
13271
13272         * class.c (inflate_generic_type): If we're inflating for a generic
13273         type instance (and not for a generic method), return
13274         MONO_TYPE_MVAR unchanged.
13275
13276 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13277
13278         * string-icalls.c: Join ignores null strings in the source array.
13279         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
13280         * threads.c: GetAvailableTheads is slightly more accurate.
13281
13282 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
13283
13284         * threads.h threads.c : add mono_threads_set_default_stacksize
13285         and pass default to CreateThread calls.
13286
13287 2003-10-09  Dick Porter  <dick@ximian.com>
13288
13289         * icall.c:
13290         * locales.h:
13291         * locales.c: Internal calls for constructing CultureInfo and
13292         related objects from libicu (if its available.)
13293
13294 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
13295
13296         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
13297
13298 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13299
13300         * threadpool.c: added an argument to async_invoke_thread that is the
13301         item to process, pass the MonoAsyncResult to the thread start function
13302         when creating a new thread. This way we don't need to acquire any lock
13303         when we're creating a new thread. Readded a semaphore for faster
13304         response times (instead of that Sleep i added).
13305
13306 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
13307
13308         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13309         get daylight change dates better on Windows, fix handling
13310         of platforms without tm_gmtoff.
13311
13312 2003-10-06  Martin Baulig  <martin@ximian.com>
13313
13314         * class.c (inflate_generic_method): Renamed to
13315         mono_class_inflate_generic_method() and made public.
13316         (mono_class_init): Don't inflate the generic methods here.
13317         (mono_class_from_generic): Added `gboolean inflate_methods'
13318         argument.  Inflate the methods here.
13319
13320         * loader.c (mono_method_get_param_names): Ignore instances of
13321         generic types for the moment.
13322
13323         * reflection.c (fixup_method): Added support for inflated methods.
13324         (mono_image_create_token): Use mono_image_get_methodref_token()
13325         for inflated methods.
13326         (mono_custom_attrs_from_param): Ignore instances of generic types
13327         for the moment.
13328         (mono_reflection_bind_generic_parameters): New public function.
13329         Moved all the functionality from
13330         ves_icall_Type_BindGenericParameters() here and added support for
13331         dynamic types.
13332         (mono_reflection_define_generic_parameter): Initialize
13333         `klass->methods' here.
13334
13335         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
13336         functionality into mono_reflection_define_generic_parameter().
13337         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
13338         TypeBuilder, return that TypeBuilder.
13339
13340 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13341
13342         * appdomain.c: removed mono_delegate_semaphore.
13343
13344         * threadpool.c:
13345         (mono_thread_pool_add): moved hash table creation inside and the thread 
13346         creation outside of the critical region.
13347         (mono_thread_pool_finish): removed obsolete code.
13348         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
13349         continue or exit the thread depending on the queue.
13350
13351 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
13352
13353         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
13354         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
13355         handle more bool marshalling options
13356
13357 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
13358
13359         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
13360         arrays of structs. Also add a more descriptive error message when
13361         a structure member is marshalled as LPArray.
13362
13363 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13364
13365         * marshal.c (mono_marshal_get_native_wrapper): Add support for
13366         marshalling arrays of complex types. Fixes #29098. Also remove an
13367         usused and incomplete function.
13368
13369 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13370
13371         * gc.c: report heap_size - free_bytes as total memory allocated
13372         (bug#49362).
13373
13374 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13375
13376         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
13377         fix timezone handling problems on Windows.
13378         
13379         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
13380         asserts when the year is outside the range handled by ms the functions.
13381
13382         * class.c (setup_interface_offsets): If the class is an interface,
13383         fill out its interface_offsets slot.
13384
13385 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13386
13387         * threadpool.c: mark threadpool threads as background.
13388
13389 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
13390
13391         * decimal.c - define DECINLINE to nothing if not using GCC
13392
13393 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13394
13395         * assembly.c: More refcount fixes.
13396
13397 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13398
13399         * string-icalls.c: if we're not trimming, return the same string.
13400         When not splitting, don't create a new string.
13401
13402 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13403
13404         * image.c:
13405         (mono_image_open): increment the ref_count inside the critical section.
13406
13407 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
13408
13409         * image.c (mono_image_open): Fix reference counting bug.
13410
13411 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
13412
13413         * marshal.c (mono_marshal_type_size) struct alignment changed for 
13414         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
13415         64bits. Avoid leak in mono_marshal_get_native_wrapper when
13416         mono_lookup_pinvoke_call throws.        
13417
13418 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13419
13420         * reflection.c (mono_reflection_parse_type): Fix #49114.
13421
13422         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
13423         temporary workaround for cygwin header problem.
13424
13425         * object.c (mono_object_isinst): Synchronize this with the code
13426         generated by the JIT for casts.
13427
13428 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13429
13430         * reflection.c (encode_type): Fix #38332.
13431
13432 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13433
13434         * marshal.c (mono_marshal_method_from_wrapper): New function to return
13435         the original method from the wrapper method.
13436
13437 2003-09-25  Martin Baulig  <martin@ximian.com>
13438
13439         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
13440         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
13441         (ves_icall_Type_get_IsGenericInstance): New interncall.
13442
13443 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
13444
13445         * object.c: fix cast warning in big endian code.
13446
13447 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
13448
13449         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
13450         
13451 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13452
13453         * assembly.c: don't call check_env from mono_assembly_load. It's
13454         already done once in mono_assemblies_init and may cause headaches when
13455         multiple threads are loading assemblies.
13456
13457 2003-09-19  Martin Baulig  <martin@ximian.com>
13458
13459         * reflection.c (mono_reflection_define_generic_parameter): Don't
13460         allocate `klass->methods', set `klass->flags' to
13461         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13462
13463 2003-09-18  Martin Baulig  <martin@ximian.com>
13464
13465         * class.c (mono_class_init): Don't create `class->methods' if it's
13466         already initialized.
13467
13468         * metadata.c (mono_metadata_load_generic_params): Make this
13469         actually work.
13470
13471         * reflection.c (mono_reflection_define_generic_parameter): Set
13472         parent class and interfaces from the constraints.
13473
13474         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13475         to keep this struct in sync with the declaration in TypeBuilder.cs.
13476
13477 2003-09-17  Martin Baulig  <martin@ximian.com>
13478
13479         * metadata.h (MonoType): Replaced the data's `int type_param'
13480         field with `MonoGenericParam *generic_param'.
13481         (MonoGenericParam): Added `MonoClass *klass'.
13482
13483         * class.c (mono_class_from_gen_param): Removed the
13484         `MonoImage *image' and `int type_num' arguments.
13485
13486         * metadata.c (mono_metadata_parse_generic_param): New static
13487         method; creates a MonoGenericParam which just contains the index.
13488         (do_mono_metadata_parse_type): Call
13489         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13490         MONO_TYPE_MVAR.
13491
13492         * reflection.c (mono_image_typedef_or_ref): Generic type
13493         parameters may be in the same assembly, but never use a typedef
13494         for them.
13495         (mono_reflection_define_generic_parameter): We're now creating a
13496         "real" class for the type parameter; it's now safe to call
13497         mono_class_from_mono_type() on the class'es type, it'll do the
13498         right thing.
13499
13500 2003-09-16  Martin Baulig  <martin@ximian.com>
13501
13502         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13503         `symfile->range_entry_size' and `symfile->class_entry_size' here;
13504         the `symfile' data structure must be fully initialized before it
13505         gets added to the table.
13506
13507 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13508
13509         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13510
13511         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13512         class init trampolines.
13513
13514 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13515
13516         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
13517         to the built-in profiler to turn off time and allocation profiling
13518         respectively.
13519
13520 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13521
13522         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
13523         g_direct_equal.
13524
13525         * debug-helpers.c (mono_method_full_name): Print the wrapper type
13526         in human readable form.
13527
13528 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13529
13530         * reflection.c icall.c: Fixed warnings.
13531
13532         * image.c (load_class_names): Use a temporary hash table to hold the
13533         namespaces in order to avoid doing many string comparisons.
13534
13535         * image.h: Fix typo.
13536
13537         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
13538         Pass NULL instead of g_direct_equal to the GHashTable constructor 
13539         since the NULL case is short-circuited inside g_hash_table_lookup, 
13540         leading to better performance.  
13541
13542         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
13543         obtain the first custom attribute for a given index. Depends on the
13544         CustomAttribute table being sorted by the parent field.
13545
13546         * reflection.c (mono_custom_attrs_from_index): Use the new function 
13547         for better performance.
13548
13549 2003-09-07  Martin Baulig  <martin@ximian.com>
13550
13551         * class.c (mono_class_init): If we're a generic instance, inflate
13552         all our methods instead of loading them from the image.
13553         (mono_class_from_generic): Set `class->methods = gklass->methods'.
13554
13555 2003-09-07  Martin Baulig  <martin@ximian.com>
13556
13557         * mono-debug-debugger.c: Added support for constructors.
13558
13559 2003-09-06  Martin Baulig  <martin@ximian.com>
13560
13561         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
13562         New interncall.
13563
13564         * reflection.c (mono_reflection_setup_generic_class): Call
13565         ensure_runtime_vtable() to create the vtable.
13566
13567 2003-09-05  Martin Baulig  <martin@ximian.com>
13568
13569         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
13570         MONO_TYPE_MVAR.
13571
13572 2003-09-04  Martin Baulig  <martin@ximian.com>
13573
13574         * reflection.c (mono_reflection_define_generic_parameter): Generic
13575         parameters start with zero.
13576
13577 2003-09-04  Martin Baulig  <martin@ximian.com>
13578
13579         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13580
13581         * reflection.h (MonoReflectionGenericParam): New typedef.
13582         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
13583         the generic parameters from the managed TypeBuilder.
13584
13585         * reflection.c (mono_reflection_define_generic_parameter): New function.
13586         (mono_reflection_create_runtime_class): Encode generic parameters.
13587         (mono_reflection_setup_generic_class): New function; this is
13588         called after adding adding all generic params to the TypeBuilder.
13589         (encode_type): Added MONO_TYPE_VAR.
13590
13591 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13592
13593         * class.h class.c (mono_class_needs_cctor_run): Moved this method
13594         here from the JIT.
13595
13596         * assembly.h assembly.c: Moved the AOT loading code into an assembly
13597         load hook.
13598
13599 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
13600
13601         * reflection.h reflection.c class.h class.c: Delete duplicate 
13602         definition of mono_type_get_name () from reflection.c and export the
13603         one in class.c.
13604
13605         * class.c: Class loading fixes from Bernie Solomon 
13606         (bernard@ugsolutions.com).
13607
13608         * reflection.c: Endianness fixes from Bernie Solomon 
13609         (bernard@ugsolutions.com).
13610         
13611 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13612
13613         * assembly.h assembly.c: Define a file format version for AOT
13614         libraries.
13615         
13616         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
13617
13618         * appdomain.h (MonoJitInfo): New field to determine whenever the
13619         code is domain neutral.
13620         
13621 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
13622
13623         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
13624
13625 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13626
13627         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
13628         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
13629         Avoid caching the result since strings must be domain specific. Fixes
13630         #48050.
13631
13632 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13633
13634         * marshal.c (mono_marshal_init): Make this callable multiple times
13635         since it is hard to find a correct place to call it.
13636
13637         * object.c (mono_runtime_class_init): Execute static constructors in
13638         the correct appdomain.
13639
13640         * image.c (build_guid_table): Handle the case when multiple images have
13641         the same GUID.
13642
13643 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13644
13645         * icall.c: added a couple of icalls for System.Web.
13646
13647 2003-08-28  Martin Baulig  <martin@ximian.com>
13648
13649         * icall.c (ves_icall_Type_BindGenericParameters): Use
13650         `klass->generic_inst' instead of `&klass->byval_arg' in the
13651         mono_type_get_object() call.  The returned type must be
13652         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
13653
13654 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13655
13656         * NOTES: New file.
13657
13658         * object.c (mono_class_proxy_vtable): Make it thread safe.
13659
13660         * pedump.c: Fix warning.
13661
13662         * object.c appdomain.h: Get rid of metadata_section. 
13663         It is no longer needed and it was causing deadlocks with domain->lock.
13664
13665         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
13666
13667 2003-08-26  Martin Baulig  <martin@ximian.com>
13668
13669         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
13670
13671 2003-08-26  Martin Baulig  <martin@ximian.com>
13672
13673         * pedump.c (main): Call mono_metadata_init(),
13674         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
13675         and mono_loader_init().
13676
13677 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
13678
13679         * loader.h: Add missing include to fix build.
13680
13681         * image.h: mono_image_load_references is no more.
13682
13683         * assembly.c: Reworked assembly loading to make it really thread safe.
13684         After these changes, the assembly returned by mono_assembly_open is
13685         fully initialized, i.e. all its references assemblies are loaded.
13686
13687         * assembly.c (mono_image_load_references): Renamed to 
13688         mono_assembly_load_references, and made private, since clients no
13689         longer need to call it.
13690
13691         * class.c: Removed calls to mono_assembly_load_references, since it was
13692         a source of deadlocks.
13693
13694         * loader.h loader.c class.h class.c: Protect data structures using a 
13695         new lock, the loader lock.
13696
13697         * class.c (mono_class_setup_vtable): Create temporary hash tables and
13698         GPtrArrays only when needed.
13699
13700         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
13701         into empty structures by mcs. Fixes pinvoke7.cs.
13702         
13703         * domain.c (mono_init): Call a new initialization function.
13704
13705         * appdomain.c (mono_runtime_init): Call the new initializer function
13706         of the marshal module.
13707
13708         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
13709         inserted into empty structures by mcs. Fixes pinvoke7.cs.
13710
13711         * marshal.h marshal.c: Added locks around the wrapper caches to make
13712         this module thread safe.
13713
13714         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
13715         this argument. Fixes pinvoke1.exe.
13716
13717 2003-08-25  Lluis Sanchez <lluis@ximian.com>
13718
13719         * object.h: Added call_type field to MonoMethodMessage and the corresponding
13720         enumeration of values. Removed fields to store remote call output values in
13721         MonoAsyncResult. Not needed any more.
13722         * object.c: Initialize call_type and async_result fields in mono_message_init.
13723         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
13724         dispatching the message.
13725         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
13726         async call to finish. To do it use a message with EndInvoke call type.
13727
13728 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13729
13730         * loader.h loader.c (mono_method_hash_marhal_info): New function which
13731         determines whenever a method has marshalling info.
13732
13733 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13734
13735         * assembly.c: fix the build on windows.
13736
13737 2003-08-22 Lluis Sanchez <lluis@ximian.com>
13738
13739         * object.cs: Fixed bug #47785.
13740
13741 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
13742
13743         * string-icalls.c (StringReplace): If their are no occurances of
13744         the old string found return a reference to the supplied
13745         string. This saves some memory and matches MS behavoir.
13746         
13747 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13748
13749         * socket-io.c: fixed compilation for systems that define AF_INET6
13750         and don't define SOL_IP/SOL_IPV6.
13751
13752 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
13753
13754         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
13755         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
13756
13757         * rawbuffer.c rawbuffer.h: Make this module thread safe.
13758
13759         * domain.c: Make this module thread safe.
13760
13761         * domain.c (mono_init): Call new initialization function.
13762
13763         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
13764         reference types too. Fixes #38812.
13765
13766         * image.c (mono_image_init): Fixed warnings.
13767
13768         * class.c (mono_class_from_typeref): Handle assembly load failure
13769         correctly.
13770
13771         * appdomain.c (add_assemblies_to_domain): Handle the case when
13772         the references of an assembly are not yet loaded.
13773
13774         * metadata.c image.c assembly.c: Moved initialization of global
13775         variables to a separate function called at startup since lazy 
13776         initialization of these variables is not thread safe.
13777         
13778         * image.c assembly.c: Made this module thread safe by adding locks in 
13779         the appropriate places.
13780
13781         * domain.c (mono_init): Call the new initialization functions of the
13782         three modules.
13783
13784 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
13785
13786         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
13787           make a direct call. It is proxy's work to make the call asynchronous.
13788           mono_delegate_end_invoke(): If the targe is a proxy, just collect
13789           the return values.
13790         * object.cs: mono_method_call_message_new(): read AsyncResult and
13791           state object from parameters list, if this info is requested.
13792         * object.h: Added fields to store remote call output values in
13793           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
13794
13795 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13796
13797         * object.h: add needed fields to MonoThread.
13798         * threads.c, threads.h: allow registering a function to cleanup data
13799         allocated per thread by the JIT.
13800
13801 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13802
13803         * loader.h: portability fix by Bernie Solomon
13804         * <bernard@ugsolutions.com>.
13805
13806 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
13807
13808         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
13809         return a MonoArray. This simplifies the code and also ensures that
13810         the cache allways contains an object reference as a value.
13811
13812         * icall.c (ves_icall_get_parameter_info): Simplified using the new
13813         function.
13814
13815 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13816
13817         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
13818         fixes a problem with byte ordering when getting the address family for
13819         a socket.
13820
13821 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
13822
13823         * .cvsignore: Added monosn.
13824
13825         * reflection.h reflection.c loader.c: Added support for parameter
13826         marshalling to dynamically created types. Fixes #47295.
13827
13828 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
13829
13830         * rand.c: remove useless warnings.
13831
13832 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13833
13834         * class.c: implemented ldtoken for methods and fieldrefs.
13835
13836 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13837
13838         * threadpool.c: when mono_async_invoke was called, no one took care of
13839         monitoring the queue. So if the method invoked took some time and we
13840         got new async invoke requests after 500 ms (the thread created waited
13841         that long in WaitForSingleObject), the new async invoke was not called
13842         until the previous one finished.
13843
13844         This is fixed now. Thanks to Totte for helping with it.
13845
13846 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13847
13848         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
13849
13850 2003-08-11  Martin Baulig  <martin@ximian.com>
13851
13852         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
13853
13854 2003-08-06  Martin Baulig  <martin@ximian.com>
13855
13856         * mono-debug-debugger.c: Added support for static fields,
13857         properties and methods.
13858
13859 2003-08-06  Martin Baulig  <martin@ximian.com>
13860
13861         * mono-debug-debugger.c: Don't store the MonoString's vtable to
13862         make this work for applications with multiple application domains.
13863
13864 2003-08-04  Martin Baulig  <martin@ximian.com>
13865
13866         * mono-debug-debugger.c: Completely reworked the type support; the
13867         most important thing is that we're now just using one single
13868         `MonoType' instance per type.
13869
13870 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
13871
13872         * mono-endian.h, mono-endian.c, icall.c: Added icall
13873         ves_icall_System_Double_AssertEndianity to assert double word endianity
13874         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
13875
13876 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13877
13878         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
13879         support, icalls and fixes.
13880
13881 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
13882
13883         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
13884         classes that are a punctuation character in .NET is not the same a
13885         g_unichar_ispunct.
13886
13887 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13888
13889         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
13890
13891 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
13892
13893         * icall.c: Add new MemCopy internalcall.
13894         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
13895         Simplified code; It is not necessary to handle all the cases here,
13896         as the C# code takes care of it.  Only handle the case of the name
13897         resource embedded into the assembly.
13898
13899         Changed signature to return the data pointer and the size of the
13900         data. 
13901
13902 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
13903
13904         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
13905         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
13906
13907 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13908
13909         * socket-io.c: ignore EINTR error in select.
13910
13911 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13912
13913         * class.h, class.c: removed unused subclasses field in MonoClass.
13914
13915 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
13916
13917         * icall.c: improve fix of get_base_definition(). If the parent class
13918           doesn't have the mehod, look at the parent of the parent.
13919         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
13920           to check if a parameter is an in or out parameter
13921           (PARAM_ATTRIBUTE_IN is not set by default).
13922           mono_method_return_message_restore(): Use mono_class_value_size to
13923           get the size of a value type. mono_type_stack_size (parameterType)
13924           does not return the correct value if parameterType is byRef.
13925           mono_load_remote_field(), mono_load_remote_field_new(),
13926           mono_store_remote_field(), mono_store_remote_field_new():
13927           raise exception if the remote call returns an exception.
13928
13929 2003-07-28  Martin Baulig  <martin@ximian.com>
13930
13931         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
13932         method.  This is a wrapper around mono_runtime_invoke() which
13933         boxes the instance object if neccessary.
13934
13935 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13936
13937         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
13938         metadata.h, row-indexes.h, verify.c: first cut of generics support.
13939
13940 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13941
13942         * icall.c: disable mcs bug workaround.
13943
13944 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13945
13946         * object.c (mono_runtime_class_init): Take the metadata_section
13947         mutex before obtaining the domain mutex.
13948
13949         * appdomain.h: Added definition of metadata_section mutex here. 
13950
13951         * object.c: define metadata_mutex here.
13952
13953 2003-07-24  Ravi Pratap  <ravi@ximian.com>
13954
13955         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
13956         fixed.
13957
13958 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
13959
13960         * reflection.c: Fix bug #46669
13961
13962 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13963
13964         * exception.c:
13965         * exception.h:
13966         * icall.c:
13967         * object.h: fill in the type name for TypeLoadException.
13968
13969 2003-07-23  Ravi Pratap  <ravi@ximian.com>
13970
13971         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
13972         relationship between TypeBuilders while compiling corlib) and bug
13973         45993 (Array types returned from the runtime while compiling
13974         corlib were from the loaded corlib).
13975
13976 2003-07-22  Martin Baulig  <martin@ximian.com>
13977
13978         * mono-debug-debugger.c: Reworked the type support a bit more;
13979         distinguish between types and classes.
13980
13981 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
13982
13983         * icall.c: add IsArrayImpl icall.
13984
13985 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
13986
13987         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
13988         initializing real_size only once. Also fix bug #46602.
13989
13990 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
13991
13992         * object.c: Renamed mono_metadata_section to metadata_section.
13993
13994 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
13995
13996         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
13997           empty array if the type is an array. Fixed.
13998           ves_icall_MonoMethod_get_base_definition: if the base method
13999           is abstract, get the MethodInfo from the list of methods of
14000           the class.
14001         * reflection.c: ParameterInfo.PositionImpl should be zero-based
14002           and it was 1-based. Fixed in mono_param_get_objects.
14003
14004 2003-07-20  Martin Baulig  <martin@ximian.com>
14005
14006         * mono-debug.h: Set version number to 31.
14007         (mono_debug_init): Added `MonoDomain *' argument.
14008
14009         * mono-debug-debugger.c: Reworked the type support; explicitly
14010         tell the debugger about builtin types; pass the `klass' address to
14011         the debugger.
14012
14013 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
14014
14015         * image.c: Allow new metadata tables to be loaded without a
14016         warning. Also update the warning message to give the new constant value.
14017                 
14018 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14019
14020         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
14021         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
14022         array type representation changes.
14023
14024 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14025
14026         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
14027         on Environment.Exit () call.
14028
14029 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14030
14031         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
14032         requires a matching corlib.
14033
14034 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
14035
14036         * Changelog: My editor decided to add a CR to each line. Sorry about that.
14037           Committed again without the CRs.
14038         
14039 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
14040
14041         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
14042           getting it from the "this" socket instance. Did not work
14043           if the socket is a subclass of Socket.
14044           Also fixed bug #35371.
14045
14046 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14047
14048         * metadata.c: fixed size for TypedByRef.
14049         * loader.c: when searching for a method, consider the vararg amrker.
14050         * unicode.c, decimal.c: constify some arrays.
14051
14052 2003-07-15  Dick Porter  <dick@ximian.com>
14053
14054         * socket-io.c: Fixed compilation for gcc < 3.2.
14055
14056         Fixed compilation for machines that don't have AF_INET6 (thanks to
14057         Bernie Solomon <bernard@ugsolutions.com> for that part.)
14058
14059         Fixed compile warnings.
14060         
14061         Fixed formatting and line endings.
14062
14063 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
14064
14065         * socket-io.h:
14066         * socket-io.c: Added IPv6 support.
14067
14068 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
14069
14070         * class.c (mono_class_is_assignable_from): New function to implement
14071         the is_assignable_from logic. Used by mono_object_isinst, 
14072         Type::IsAssignableFrom () and the interpreter.
14073
14074         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
14075         Object, even interfaces.
14076         
14077         * object.c (mono_object_isinst): Implement in terms of 
14078         is_assignable_from.
14079
14080         * icall.c (ves_icall_type_is_assignable_from): New icall.
14081
14082 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
14083
14084         * domain.c (foreach_domain): fix compiler warning.
14085
14086 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
14087
14088         * image.c (load_metadata_ptrs): use g_strndup because strndup is
14089         not available on all plattforms
14090
14091 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
14092
14093         * image.h image.c: Store the metadata version string in MonoImage.
14094         * icall.c: New icall to retrieve the image version.
14095         * reflection.c (create_dynamic_image): Fill in the image version field
14096         * reflection.c (build_compressed_metadata): Use the image version
14097         from the image structure.
14098
14099 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14100
14101         * appdomain.c: modified comment.
14102         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
14103         That will be its last iteration when mono_gc_cleanup is called from
14104         mono_runtime_cleanup and before the domain is unloaded.
14105
14106         Fixes bug #45962.
14107
14108 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
14109
14110         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
14111         attributes.
14112
14113 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14114
14115         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
14116         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
14117         Bernie Solomon <bernard@ugsolutions.com>.
14118
14119 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14120
14121         * object.c, object.h: provide mono_object_new_fast() for faster
14122         allocation in some special cases.
14123
14124 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14125
14126         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
14127         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
14128
14129 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14130
14131         * threadpool.c: fix leaks.
14132
14133 2003-07-01  Dick Porter  <dick@ximian.com>
14134
14135         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
14136         using MonoGHashTables.  Fixes threadpool bug posted to list.
14137
14138 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14139
14140         * image.h, image.c: added support to load an assembly from a byte array.
14141         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
14142         assembly bundle support.
14143
14144 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
14145
14146         * threadpool.c (mono_thread_pool_add): keep a reference to the
14147         AsyncResult to prevent GC
14148
14149 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14150
14151         * class.c: leak fix.
14152
14153 2003-06-25  Dick Porter  <dick@ximian.com>
14154
14155         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
14156         for the async object, the WaitHandle object will close the handle.
14157         Fixes bug 45321.
14158
14159 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14160
14161         * class.c: in mono_array_class_get (), lookup from the hash with the
14162         same type we insert: this works around a bug in
14163         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
14164         lluis. The real fix will have to wait for after the release.
14165
14166 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14167
14168         * icall.c: fix memory leak when getting type members.
14169
14170 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14171
14172         * reflection.c: added more pubtoken special cases.
14173
14174 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14175
14176         * class.c: handle field offset correctly when class size
14177         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
14178
14179 2003-06-20  Martin Baulig  <martin@ximian.com>
14180
14181         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
14182         *image' field.
14183
14184 2003-06-20  Martin Baulig  <martin@ximian.com>
14185
14186         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
14187
14188 2003-06-20  Martin Baulig  <martin@ximian.com>
14189
14190         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
14191         just distinguish between variables in registers and variables at
14192         an offset relative to a register.
14193
14194 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14195
14196         * icall.c: #ifdef out latest changes until mcs is fixed.
14197
14198 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14199
14200         * icall.c: return members in metadata order.
14201
14202 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14203
14204         * icall.c: avoid infinite loop in GetTimeZoneData.
14205
14206 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14207
14208         * icall.c: added Marshal.Prelink/All icalls.
14209
14210 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14211
14212         * object.c, object.h: fix warnings and do some overflow checking
14213         when creating arrays.
14214
14215 2003-06-17  Dick Porter  <dick@ximian.com>
14216
14217         * file-io.h:
14218         * file-io.c: File attributes need to be tweaked slightly when
14219         passed from the managed to the w32 world.
14220
14221 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14222         * profiler.h profiler-private.h profiler.c: Rework last patch
14223         based on suggestion by Paolo.
14224         
14225 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14226
14227         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
14228         instruction level coverage data collection.
14229         * profiler.h profiler.c (: Added new callback function which can be
14230         used by the profiler to limit which functions should have coverage
14231         instrumentation.
14232         * profiler.c (mono_profiler_load): Call g_module_build_path to
14233         generate the file name of the profiler library.
14234
14235 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14236
14237         * profiler.c, profiler.h, profiler-private.h: added basic block 
14238         coverage profiling API.
14239
14240 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
14241
14242         * reflection.c (mono_reflection_create_runtime_class): Add support
14243         for events in dynamically generated code.
14244
14245         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
14246         not allocated.
14247
14248 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14249
14250         * icall.c: when getting timezone info, return reasonable values if we
14251         can't get the actual data.
14252
14253 2003-06-14  Dick Porter  <dick@ximian.com>
14254
14255         * threads.c (start_wrapper): Remove the reference to the thread
14256         object in the TLS data, so the thread object can be finalized.
14257         This won't be reached if the thread threw an uncaught exception,
14258         so those thread handles will stay referenced :-( (This is due to
14259         missing support for scanning thread-specific data in the Boehm GC
14260         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
14261
14262 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
14263
14264         * reflection.c: ensure streams and tables are first allocated with
14265         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
14266
14267 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14268
14269         * icall.c: fixed GetElementType for byrefs (bug# 44792).
14270
14271 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
14272
14273         * reflection.c (mono_reflection_create_runtime_class): Add support for
14274         properties to dynamically created classes.
14275         * reflection.c: Fix a few places where non-MonoObjects were inserted
14276         into the tokens hashtable.
14277
14278 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14279
14280         * object.c: some support to handle out of memory exceptions.
14281
14282 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
14283
14284         * marshal.c (mono_marshal_get_native_wrapper): support reference
14285         return types
14286
14287 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14288
14289         * object.h, object.c: more portability stuff from Bernie Solomon.
14290         Unexport mono_object_allocate(). Added mono_object_unbox ().
14291         Set exitcode when an unhandled exception is thrown.
14292
14293 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
14294
14295         * marshal.c (mono_marshal_get_native_wrapper): use custom
14296         marshaler for return types.
14297
14298 2003-06-10  Dick Porter  <dick@ximian.com>
14299
14300         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
14301         ip_mreq is available
14302
14303 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14304
14305         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
14306         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
14307         by Bernie Solomon <bernard@ugsolutions.com>.
14308
14309 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
14310
14311         * gc.c (mono_gc_init): Avoid error message on shutdown when
14312         GC_DONT_GC=1 is used.
14313
14314         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
14315         New icall to return the GUID of a module.
14316
14317 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14318
14319         * class.c: ensure instance size always includes the parent's size
14320         even whem class size is set explicitly (fixes bug#44294).
14321
14322 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14323
14324         * profiler.h, profiler.c: made the simple profiler thread-safe,
14325         get more accurate timing info. Allow the loading of an
14326         externally-developed profiler module.
14327
14328 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
14329
14330         * marshal.c (mono_marshal_get_native_wrapper): improved
14331         class/byref arguments.
14332         (mono_marshal_get_native_wrapper): better string marshaling support.
14333
14334 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14335
14336         * class.c: ensure .pack and .size are handled correctly and
14337         simplified layout of static fields.
14338
14339 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14340
14341         * appdomain.c
14342         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
14343
14344         * loader.c (mono_lookup_pinvoke_call): look for modules in the
14345         current directory (fix bug 44008)
14346
14347 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
14348
14349         * marshal.c (mono_marshal_get_native_wrapper): started support for
14350         custom marshalers.
14351         (mono_delegate_to_ftnptr): consider marshalling specifications
14352
14353 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14354
14355         * reflection.c, reflection.h: emit custom marshal info.
14356
14357 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14358
14359         * object.c: free the GError.
14360         * icall.c: added CloseEvent_internal.
14361         * threads.[ch]:
14362         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
14363         call.
14364
14365 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
14366
14367         * loader.c (mono_method_get_signature): Add support for dynamic
14368         assemblies.
14369
14370 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14371
14372         * reflection.c: fixed bug #43905.
14373
14374 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14375
14376         * class.c, domain.c, icall.c, metadata.h, object.h: support for
14377         handling TypedReference and ArgIterator.
14378         * loader.c, loader.h: added function to get signature at call site.
14379
14380 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14381
14382         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
14383         data readonly. Buglets and warning fixes. Some MethodSpec support.
14384
14385 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14386
14387         * class.h, class.c, object.c: remove relative numbering support.
14388
14389 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
14390
14391         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
14392         free the string, until we get a chance to fix Gtk#
14393
14394 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14395
14396         * marshal.c: revert last patch.
14397
14398 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14399
14400         * icall.c: updates for new mono_class_vtable() not calling
14401         the type constructor anymore.
14402
14403 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14404
14405         * object.h, object.c: separate vtable creation from type
14406         initialization. Make running the .cctor thread safe.
14407
14408 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14409
14410         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
14411
14412 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14413
14414         * loader.c (mono_get_method): consider calling convention
14415
14416 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
14417
14418         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
14419         to return the invisible global type for a module.
14420
14421         * reflection.c (mono_image_build_metadata): Emit global fields too.
14422
14423 2003-05-20  Peter Williams  <peterw@ximian.com>
14424
14425         * loader.c (mono_lookup_internal_call): Add a few newlines.
14426
14427 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
14428
14429         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
14430         literal strings.
14431
14432         * appdomain.c (set_domain_search_path): Recalculate search path when
14433         AppDomainSetup.PrivateBinPath changes.
14434
14435         * object.c (mono_class_compute_gc_descriptor): It turns out some
14436         parts of the class libs (like System.Thread) holds pointers to
14437         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
14438         to treat native int a pointer type here.
14439         
14440 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
14441
14442         * appdomain.h, domain.c: add hashtable for jump target resolution.
14443
14444 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
14445
14446         * reflection.h reflection.c icall.c: Added new icalls 
14447         GetManifestResourceInfoInternal, GetModulesInternal and support
14448         infrastructure.
14449
14450 2003-05-16  Dick Porter  <dick@ximian.com>
14451
14452         * icall.c:
14453         * file-io.h:
14454         * file-io.c: Implement System.IO.MonoIO::GetTempPath
14455
14456 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
14457
14458         * object.c: mono_store_remote_field: little fix to previous patch.
14459
14460 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14461
14462         * class.c: add constructors to array classes.
14463         * icall.c: special case array construction for InternalInvoke (),
14464
14465 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
14466
14467         * class.h class.c reflection.c object.c: Added support for field
14468         defaults in dynamically generated classes.
14469
14470 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14471
14472         * reflection.c: properly encode charset for ddlimport.
14473
14474 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14475
14476         * threads.c: allow compiling without GC.
14477
14478 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14479
14480         * appdomain.h, object.c, object.h, threads.c, threads.h: added
14481         handling of thread static data.
14482
14483 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14484
14485         * reflection.h, reflection.c: added mono_custom_attrs_free ().
14486
14487 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14488
14489         * class.c (mono_array_class_get): always set the serializable flags
14490         (mono_array_class_get): always set the SEALED attribute for array types
14491
14492 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
14493
14494         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14495         attributes (fix for bug 42021).
14496
14497 2003-05-12  Dick Porter  <dick@ximian.com>
14498
14499         * gc.c: Don't run finalizers when the finalizer thread is
14500         finishing up, because the default domain has already been
14501         destroyed.
14502
14503 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
14504
14505         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14506         value is null, we should throw an exception.   This is slightly
14507         different than the other conventions used for the constructor.
14508
14509 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14510
14511         * socket-io.c: fixed windows build.
14512
14513 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14514
14515         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14516
14517 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
14518
14519         * object.c (mono_string_new_wrapper): Compatibility fix for MS
14520         compilers.
14521
14522 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
14523
14524         * class.c (mono_class_layout_fields): Add experimental GC aware
14525         auto layout facility. Requires class library changes to work correctly.
14526
14527         (mono_class_setup_vtable): Avoid overriding explicit interface
14528         method implementations. Fixes iface3.exe test.
14529
14530         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
14531         object reference.
14532         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
14533         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
14534
14535         * metadata.h: Add new type classification macro which determines
14536         whenever the type holds an object reference.
14537
14538 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14539
14540         * marshal.c (mono_marshal_get_native_wrapper): cleanups
14541
14542 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
14543
14544         * gc.c (finalizer_thread): Work around a GC bug.
14545
14546 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
14547
14548         * marshal.c (emit_struct_conv): allow unions
14549
14550         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
14551
14552 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
14553
14554         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
14555
14556 2003-05-06  Martin Baulig  <martin@ximian.com>
14557
14558         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
14559
14560 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14561
14562         * socket-io.c:
14563         (Select_internal): allow NULLs, don't create arrays if not needed.
14564         Coupled with Socket.cs changes.
14565
14566         * threadpool.c:
14567         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
14568         register a finalizer for it that will close the semaphore handle. This
14569         fixes the leak and make Lupus' test run with > 4080 loops.
14570
14571 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14572
14573         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
14574         Jerome Laban (bug #42287)
14575
14576 2003-05-02  Martin Baulig  <martin@ximian.com>
14577
14578         * debug-mono-symfile.h
14579         (MonoSymbolFile): Moved declaration into mono-debug.h.
14580         (MonoDebugMethodJitInfo): Likewise.
14581         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
14582         argument.
14583         (_mono_debug_address_from_il_offset): Take a
14584         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
14585
14586         * mono-debug.h
14587         (MonoDebugDomainData): New struct.
14588         (mono_debug_get_domain_data): New function.
14589         (mono_debug_add_method): Take an additional `MonoDomain *'
14590         argument.
14591         (mono_debug_source_location_from_address): Likewise.
14592         (mono_debug_il_offset_from_address): Likewise.
14593         (mono_debug_address_from_il_offset): Likewise.
14594
14595 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
14596
14597         * reflection.c: one more check for null type in custom attrs.
14598
14599 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14600
14601         * reflection.c: avoid warning (comparison is always false due to limited
14602         range of data type).
14603
14604 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14605
14606         * icall.c: throw an exception in Type.GetField if the argument 'name'
14607         is NULL.
14608
14609 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
14610
14611         * reflection.c: fixed handling of enums in named arguments to custom
14612         attributes (bug #42123).
14613
14614 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14615
14616         * reflection.c: use the right array element type and handle
14617         a null for a Type argument, too.
14618
14619 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
14620
14621         * reflection.c: handle arrays as arguments to custom attributes.
14622
14623 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14624
14625         * reflection.c: handle a string value in a custom attr
14626         ctor that takes an object.
14627
14628 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14629
14630         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
14631         (fix bug #42063)
14632
14633 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14634
14635         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
14636
14637 2003-04-27  Martin Baulig  <martin@ximian.com>
14638
14639         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
14640         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
14641         MONO_DEBUGGER_EVENT_BREAKPOINT.
14642         (mono_breakpoint_trampoline_code): Removed.
14643         (mono_debugger_event_handler): The last argument is now a
14644         `guint32'.
14645         (mono_debugger_insert_breakpoint_full): Removed the
14646         `use_trampoline' argument.
14647         (mono_debugger_method_has_breakpoint): Likewise.
14648         (mono_debugger_trampoline_breakpoint_callback): Renamed to
14649         mono_debugger_breakpoint_callback(); take the method and
14650         breakpoint number as arguments.
14651
14652 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14653
14654         * metadata.c: fix off by one when loading parameters attributes.
14655
14656 2003-04-24  Martin Baulig  <martin@ximian.com>
14657
14658         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
14659
14660 2003-04-24  Martin Baulig  <martin@ximian.com>
14661
14662         * mono-debug-debugger.c: Moved all code which interacts with the
14663         Mono Debugger here.
14664
14665         * debug-mono-symfile.c: This code now just deals with the symbol
14666         file itself, the debugger code is now in mono-debug-debugger.c.
14667
14668 2003-04-23  Martin Baulig  <martin@ximian.com>
14669
14670         * mono-debug.c (mono_debug_source_location_from_il_offset):
14671         New method; like mono_debug_source_location_from_address(), but
14672         takes an IL offset instead of a machine address.
14673
14674 2003-04-23  Martin Baulig  <martin@ximian.com>
14675
14676         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
14677         `line' field; this is now computed by the debugger.
14678
14679 2003-04-23  Martin Baulig  <martin@ximian.com>
14680
14681         * mono-debug.[ch]: New files.  This is the new debugging interface.
14682
14683         * mono-debug-debugger.[ch]: New files.  Moved all code which
14684         interacts with the Mono Debugger here.
14685
14686 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14687
14688         * domain.c (mono_init): initialize mono_defaults.monitor_class
14689
14690 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
14691
14692         * reflection.c (method_encode_code): Add a spicy exception to help
14693         future compiler authors.
14694
14695 2003-04-21  Martin Baulig  <martin@ximian.com>
14696
14697         * icall.c
14698         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14699         Make this work with relative pathnames; g_filename_to_uri() needs
14700         an absolute filename.
14701
14702 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
14703
14704         * icall.c: Track name changes in Object and ValueType.
14705
14706 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
14707
14708         * metadata.c (mono_type_stack_size): size should be a multiple of
14709         sizeof (gpointer)
14710
14711 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14712
14713         * gc.c:
14714         (internal_domain_finalize): moved into mono_domain_finalize. No need
14715         to create another thread because the finalizers will be run in the
14716         finalizer thread.
14717         
14718         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
14719         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
14720         to be run (MS does this too).
14721
14722 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14723
14724         * object.c (mono_class_compute_gc_descriptor): Update comment.
14725
14726         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
14727
14728         * image.h: Add synchronized wrapper cache.
14729
14730         * image.c (do_mono_image_open): Initialize cache.
14731
14732         * reflection.c (create_dynamic_mono_image): Initialize cache.
14733
14734 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14735
14736         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
14737         ves_icall_System_Buffer_ByteLengthInternal.
14738
14739 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14740
14741         * reflection.c: setup klass->nested_in earlier. Allow
14742         a dash in the assembly name.
14743
14744 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
14745
14746         * metadata.c (mono_type_to_unmanaged): dont access
14747         type->data.klass for MONO_TYPE_OBJECT
14748         (mono_type_to_unmanaged): consider System.Delegate class
14749
14750 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
14751
14752         * class.c: just setup supertypes in the proper place instead of
14753         initializing the full element class for arrays.
14754
14755 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14756
14757         * class.c: ensure the element class of arrays is initialized.
14758         Setup the supertype info for array classes, too.
14759
14760 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
14761
14762         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
14763
14764 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14765
14766         * Makefile.am: re-added -m option when running cygpath. This way,
14767         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
14768         separator.
14769         * mono-config.c: same codepath for locating mono config file for WIN32
14770         and the rest.
14771         * assembly.c: if mono_assembly_setrootdir is called, don't override
14772         the value set.
14773
14774 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14775
14776         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
14777         MONO_ASSEMBLIES variable.
14778
14779 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14780
14781         * icall.c: added Assembly::GetNamespaces() icall.
14782
14783 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14784
14785         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
14786
14787 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
14788
14789         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
14790         * object.c: fixed bug in the construction of vtable for proxies
14791
14792 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14793
14794         * object.c (mono_array_new): Mark mono_array_new as an icall.
14795
14796 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14797
14798         * class.c: fixed test for public method when overriding interfaces.
14799         Closes bug #40970.
14800
14801 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14802
14803         * appdomain.h, domain.c: added mono_domain_foreach() to
14804         be able to access the currently loaded appdomains.
14805         * object.c: make string interning work across sppdomains.
14806         Mark some functions for use as icalls.
14807
14808 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14809
14810         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
14811
14812         * reflection.h reflection.c: Allocate long living data using 
14813         GC_MALLOC_ATOMIC so the collector does not need to scan it.
14814
14815         * reflection.c: Double the allocation size in streams instead of
14816         increasing it, to prevent unneccesary copying on large assemblies.
14817         
14818         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
14819         creation if the assembly does not have the Run flag set.
14820
14821 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14822
14823         * class.h: avoid the C++ keywords in header files (Jerome Laban
14824         spotted and fixed this).
14825
14826 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14827
14828         * object.c:
14829         (mono_unhandled_exception): fill in the arguments for the
14830         UnhandledException event. Only trigger that event for the default
14831         domain (as MS does).
14832
14833 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
14834
14835         * object.c: Improve typed allocation stuff based on suggestions from
14836         Paolo. Also turn it on if the GC library supports it.
14837
14838 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14839
14840         * object.c object.h class.h: Added experimental typed allocation
14841         facility using the interfaces in gc_gcj.h.
14842
14843         * os/gc_wrapper.h: Added new include files.
14844         
14845 2003-04-03  Martin Baulig  <martin@ximian.com>
14846
14847         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
14848         which is not yet enabled by default.
14849
14850         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
14851         functions.
14852         (mono_gc_lock, mono_gc_unlock): New static functions.
14853
14854         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
14855         functions; stop/start the world for the garbage collector.  This
14856         is using the windows API; we need to complete the SuspendThread()/
14857         ResumeThread() implementation in the io-layer to make this work on Unix.
14858         (mono_gc_push_all_stacks): New public function; tells the garbage
14859         collector about the stack pointers from all managed threads.
14860
14861 2003-04-03  Martin Baulig  <martin@ximian.com>
14862
14863         * object.h (MonoThread): Added `gpointer stack_ptr'.
14864
14865         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
14866
14867 2003-04-03  Martin Baulig  <martin@ximian.com>
14868
14869         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
14870
14871 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
14872
14873         * reflection.c (typebuilder_setup_fields): Initialize field.first and
14874         field.last.
14875
14876 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
14877
14878         * loader.c (mono_lookup_internal_call): Report the corlib that is
14879         out of sync.
14880
14881 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
14882
14883         * icall.c (ves_icall_type_GetTypeCode): fixed check for
14884         System.DBNull (it's class not valuetype).
14885
14886 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14887
14888         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
14889         if the array method was already assigned a token (fixes bug#40646).
14890
14891 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
14892
14893         * reflection.c (mono_reflection_get_type): Attempt type resolve even
14894         if no assembly is given.
14895
14896 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
14897
14898         * metadata.h: Added the new tables.
14899
14900         * row-indexes.h: Added definitions for new tables.
14901
14902         * metadata.c: Add schemas for new tables, and add support for
14903         computing the sizes of them.
14904
14905         * class.c: Update for handling the new type cases.
14906
14907 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
14908
14909         * metadata.h (MONO_TYPE_IS_VOID): new macro
14910
14911 2003-03-31  Martin Baulig  <martin@ximian.com>
14912
14913         * threads.h (MonoThreadCallbacks): Added `thread_created'.
14914
14915         * threads.c (mono_thread_new_init): Call `thread_created' in the
14916         mono_thread_callbacks.
14917
14918 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
14919
14920         * loader.h: added marshalbyrefobject_class to mono_defaults
14921         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
14922         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
14923           generation of output parameters.
14924           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
14925         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
14926           contextbound and the target object belongs to the context of the caller.
14927         * object.h: added context and unwrapped_server variables in MonoRealProxy.
14928         * object.c: Implemented support for interfaces and abstract classes
14929           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
14930           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
14931
14932 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
14933
14934         * class.h class.c (mono_class_is_subclass_of): New function.
14935         
14936         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
14937         routines for most common case (calls from ArrayList::ToArray).
14938
14939         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
14940         routine so programs which call Environment::Exit() can be profiled.
14941
14942         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
14943         Added MONO_ARCH_SAVE_REGS.
14944
14945         * icall.c (ves_icall_type_is_subtype_of): Use new function.
14946
14947 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
14948
14949         * blob.h: Add a couple of new MonoType types definitions.
14950
14951         * tabledefs.h: Add a couple of new call convs.
14952
14953 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
14954
14955         * reflection.h (MonoReflectionDynamicAssembly): track changes in
14956         the layout of the class.
14957
14958         * reflection.c (alloc_table): double the size on overflow to avoid
14959         unnecessary copying.
14960
14961         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
14962         avoid filling out metadata tables and blobs. Also set mb->ilgen to
14963         null so it can be garbage collected.
14964         
14965 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
14966
14967         * reflection.c (mono_reflection_get_type): Return the resolved type
14968         only if it is in the assembly we searched.
14969
14970         * reflection.c (ensure_runtime_vtable): Initialize method slots.
14971
14972         * class.c (mono_class_setup_vtable): Set the slot of the overriding
14973         method.
14974
14975 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14976
14977         * appdomain.c:
14978         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
14979         the right one is 'file:///blah', but MS allows it.
14980         * assembly.c:
14981         (mono_assembly_open): allow 'file://blah'
14982
14983         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
14984
14985 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
14986
14987         * socket-io.c: fixes bug #40310.
14988
14989 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
14990
14991         * reflection.c (mono_reflection_parse_type): handle deeply nested
14992         types correctly.
14993
14994         * reflection.c (mono_image_create_token): Use unique token values
14995         since they will be put into a hash table.
14996
14997         * class.c (mono_class_setup_vtable): If a method occurs in more than
14998         one place in the vtable, and it gets overriden, then change the
14999         other occurances too.
15000
15001         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
15002         object as return type.
15003
15004 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
15005
15006         * icall.c: Deleted "ToString" implementation for double and float
15007         because they are full implemented in managed code.
15008
15009 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15010
15011         * reflection.c, reflection.h: implemented and exported functions
15012         to retrieve info about custom attributes.
15013
15014 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15015
15016         * appdomain.c: moved Uri handling to assembly.c
15017         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
15018         work when using a file Uri in *nix and windows.
15019
15020         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
15021         GetReferencedAssemblies.
15022
15023 2003-03-18  Dick Porter  <dick@ximian.com>
15024
15025         * icall.c: Rename a couple of internal calls
15026
15027         * threads.c: Set the thread state to Stopped when a thread exits.
15028         Fixes bug 39377.
15029
15030 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
15031
15032         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
15033         New icall.
15034
15035         * object.c (mono_class_vtable): fix warning.
15036
15037 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
15038
15039         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
15040
15041         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
15042         memory.
15043         (method_encode_clauses): Create exception info structures in the right
15044         order.
15045         (mono_reflection_setup_internal_class): Initialize supertypes field.
15046
15047         * class.c object.c: Handle interfaces which implement other interfaces 
15048         correctly.
15049
15050         * class.h class.c: Move the supertypes array initialization code into 
15051         a separate function so it can be used for dynamic types too. Also call
15052         it earlier, in mono_class_init(), since it can be used before the
15053         type is initialized.
15054
15055 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15056
15057         * Makefile.am:
15058         * assembly.c:
15059         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
15060
15061         * appdomain.c:
15062         * appdomain.h:
15063         * marshal.c:
15064         * object.c: remove warnings.
15065
15066 2003-03-13  Martin Baulig  <martin@ximian.com>
15067
15068         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
15069         (MonoDebugLexicalBlockEntry): New types.
15070
15071         * debug-mono-symfile.c
15072         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
15073
15074 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15075
15076         * process.c: ret can be any non-zero value accroding to MS doc.
15077
15078 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
15079
15080         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
15081         fixing a warning for a miss-used prototype, would have cause
15082         random memory corruption.
15083
15084 2003-03-07  Martin Baulig  <martin@ximian.com>
15085
15086         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
15087         getting really annoying ....
15088
15089 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
15090
15091         * reflection.c (fixup_method): added support for array methods.
15092
15093 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15094
15095         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
15096         (pointed out by Michael Adams).
15097
15098 2003-03-04  Dick Porter  <dick@ximian.com>
15099
15100         * icall.c: Temporarily reverted the Double and Single ToString()
15101         change, because it broke nunit.
15102
15103 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
15104
15105         * object.h, threads.h: make include files compatible with C++
15106         (patch by Jerome Laban <jlaban@wanadoo.fr>).
15107
15108 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
15109
15110         * icall.c: Erased ToString helper functions for Double and Single.
15111         Now, that implementations ar all in managed code (Double and Single
15112         Formatters).
15113
15114 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
15115
15116         * appdomain.c: Added method for initializing the default context of
15117         a domain. Added internal call for getting the default context.
15118         * appdomain.h: Added context variable in MonoDomain struct.
15119         * domain.c: mono_domain_set also sets the default context of the domain
15120         * icall.c: Mapped internal method InternalGetDefaultContext.
15121         * object.c: mono_object_get_virtual_method returns always a remoting
15122         wrapper if the object is a transparent proxy.
15123         mono_runtime_invoke_array: when creating an object by calling the
15124         constructor, if the created object is a proxy, then the constructor should
15125         be called using the a remoting wrapper.
15126
15127 2003-03-03  Dick Porter  <dick@ximian.com>
15128
15129         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
15130         variable so it compiles on solaris.  Problem spotted by
15131         Christopher Taylor <ct@cs.clemson.edu>
15132
15133 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15134
15135         * appdomain.c:
15136         (get_info_from_assembly_name): don't leak value.
15137
15138         * icall.c:
15139         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
15140         result.
15141
15142 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15143
15144         * assembly.c: export mono_image_load_references ().
15145         * class.c: handle function pointers. mono_class_from_name() now
15146         supports nested type names directly.
15147
15148 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
15149
15150         * reflection.h reflection.c: Encode already created dynamic methods 
15151         and fields correctly as a DEF instead of a REF.
15152
15153         * reflection.c: Get rid of the force_ref argument to 
15154         mono_image_typedef_or_ref since it was wrong in the first place.
15155
15156         * string-icalls.c: add error checking to string constructors according
15157         to the MSDN docs.
15158
15159         * reflection.c: Emit types in the order their TypeBuilders were 
15160         created. Previously, a new table index was assigned to each type before
15161         the tables were emitted. This was wrong because the signature blob
15162         might already refer to a type by its original table index.
15163
15164 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
15165
15166         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
15167         change.
15168         
15169 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15170
15171         * Makefile.am: make assemblies dir have \ instead of / on windows.
15172
15173 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
15174
15175         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
15176         iterate over the NESTEDCLASS table using a linear search since the
15177         table is not guaranteed to be sorted by the secondary key.
15178
15179         * class.c (mono_class_create_from_typedef): fixed up call to
15180         mono_metadata_nesting_typedef.
15181         
15182 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
15183
15184         * marshal.c (mono_string_to_byvalstr): clear the memory as
15185         suggested by Jerome Laban <jlaban@wanadoo.fr>
15186
15187 2003-02-26  Dick Porter  <dick@ximian.com>
15188
15189         * process.c: Cope with padding in .rsrc blocks
15190
15191 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
15192
15193         * metadata.h: reverted the filter_len change, it breaks reflection
15194         
15195 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
15196
15197         * metadata.h: added a new field to store the filter_len
15198         
15199
15200 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15201
15202         * reflection.c: handle custom attributes for types and members
15203         created with Reflection.Emit (bug#38422).
15204
15205 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
15206
15207         * reflection.c: define RTSpecialName automatically for constructors for
15208         compatibility with MS.NET.
15209
15210         * reflection.c (mono_reflection_create_runtime_class): initialize
15211         nested_in field of dynamically created classes.
15212
15213 2003-02-22  Martin Baulig  <martin@ximian.com>
15214
15215         * debug-mono-symfile.h: Incremented version number.
15216
15217 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
15218
15219         * object.h icall.c process.c: fix warnings.
15220
15221 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
15222
15223         * appdomain.h appdomain.c:
15224         (mono_domain_try_type_resolve): split the 
15225         name_or_tb argument into a name and a tb argument.
15226         (mono_domain_has_type_resolve): new function to check whenever the
15227         application has registered a TypeResolve event handler.
15228         
15229         * icall.c reflection.h reflection.c: move the type resolve logic into
15230         mono_reflection_get_type () so it will be invoked when 
15231         Assembly::GetType () is called.
15232
15233         * reflection.c:
15234         (mono_reflection_get_type): renamed to get_type_internal.
15235         (mono_reflection_get_type): fixed type name generation so it works 
15236         for nested types too.
15237         (mono_reflection_get_type): call has_type_resolve () to avoid the 
15238         costly type name generation if there is no resolve event handler.
15239
15240 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15241
15242         * class.c, image.c: load exported types from file references.
15243
15244 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
15245
15246         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
15247           used to cache the managed methods used to create proxies and make 
15248           remote invocation of methods.
15249         * class.h: Added in MonoVTable a flag to indicate that a class needs 
15250           to be remotely created.
15251         * object.c: Modified the method mono_class_vtable(). It now initializes 
15252           the remote flag of the vtable. Modified mono_object_new_specific(), 
15253           so now it checks the remote flag.
15254         * icall.c: Added a couple of internal methods, one for enabling instance 
15255           creation interception for a type, and one for creating objects bypassing
15256           the remote check.
15257
15258 2003-02-18  Martin Baulig  <martin@ximian.com>
15259
15260         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
15261         New interncall to get a method's metadata token.
15262
15263         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
15264         New interncall for the debugger.
15265
15266 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
15267
15268         * class.c (mono_class_setup_vtable): allocate supertype array
15269
15270 2003-02-18  Martin Baulig  <martin@ximian.com>
15271
15272         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
15273
15274 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15275
15276         * reflection.c:
15277         (assembly_name_to_aname): jump over unknown properties (i've found
15278         something like: 'type, assembly, version=xxx, custom=null, public...',
15279         so now will ignore custom=null and still get the rest of the values).
15280
15281 2003-02-17  Dick Porter  <dick@ximian.com>
15282
15283         * threads.c: Have Thread.Start() wait for a semaphore to signal
15284         that the thread has set up all its local data.  This fixes bug
15285         34323, where Abort() raced the new thread's TLS data.
15286
15287         Also removes the handle_store() call from start_wrapper, because
15288         threads are now always created suspended and there is no longer a
15289         race between the parent and child threads to store the info.
15290
15291 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
15292
15293         * image.c: explain the #- heap issue in a message, hopefully
15294         avoiding FAQs on mono-list.
15295
15296 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15297
15298         * icall.c:
15299         (GetEntryAssembly): if the domain has not invoked
15300         AppDomain.ExecuteAssembly yet, return the assembly of the default
15301         AppDomain.
15302
15303 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
15304
15305         * class.c (mono_ldtoken): make it work in dynamic assemblies.
15306
15307 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15308
15309         * metadata.c, reflection.c: simple speedup to type hash
15310         and equals code.
15311
15312 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
15313
15314         * image.c, image.h, class.c, assembly.c: move module loading
15315         to MonoImage. When loading metadata, consider alignemnet from
15316         the start of metadata, not from the metadata address in memory.
15317
15318 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
15319
15320         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
15321         AssemblyBuilder objects. Factored out custom attribute creation into
15322         a separate function.
15323         (create_custom_attr): new function to create custom attributes.
15324
15325 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
15326
15327         * Makefile.am: Got tired of typing the full pathname to pedump.
15328         Until there is another option, am installing this.
15329
15330 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
15331
15332         * class.c (class_compute_field_layout): always set field->parent 
15333         (mono_ldtoken): use mono_defaults.fieldhandle_class;
15334
15335 2003-02-11  Dick Porter  <dick@ximian.com>
15336
15337         * threads-types.h:
15338         * monitor.c: Rewrote Monitor, making lock much faster and
15339         Pulse/Wait work as specified.  Also uses much fewer handles, and only
15340         creates them as needed.
15341
15342         * exception.c: Added SynchronizationLockException
15343
15344         * threads.c: Deleted old Monitor implementation.  The new one is
15345         in a new file.
15346
15347 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15348
15349         * class.c: handled TypedReference type code. Set the correct size for
15350         class data. Setup interface_offsets for interface classes, too.
15351
15352 2003-02-09  Martin Baulig  <martin@ximian.com>
15353
15354         * debug-mono-symfile.h: Reflect latest symbol writer changes.
15355
15356 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
15357
15358         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
15359         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
15360         * object.c: fixed mono_object_get_virtual_method () for interfaces.
15361         * verify.c: check for code that runs after the end of the method.
15362
15363 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
15364
15365         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
15366         "System.Math::Round2".
15367         * sysmath.h: Added Floor, Round and Round2 definitions.
15368         * sysmath.c: Modified certain functions that were not 100% compliant
15369         with MS.NET (math precision) and added the implementation of Floor,
15370         Round and Round2.
15371
15372 2003-02-07  Martin Baulig  <martin@ximian.com>
15373
15374         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
15375
15376 2003-02-07  Martin Baulig  <martin@ximian.com>
15377
15378         * debug-mono-symfile.c: Reflected latest symwriter changes.
15379         (mono_debug_create_mono_symbol_file): Removed.
15380         (mono_debug_open_mono_symbol_file): Take an argument which
15381         specifies whether to create a dynamic symbol file.
15382
15383 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
15384
15385         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
15386
15387 2003-02-05  Martin Baulig  <martin@ximian.com>
15388
15389         * reflection.c (mono_image_build_metadata): Make this public,
15390         protect it against being called multiple times, don't create
15391         resources and don't build the compressed metadata here.
15392         (mono_image_create_pefile): Do this here.
15393
15394         * icall.c
15395         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
15396
15397 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15398
15399         * socket-io.c: fixed bug #36322.
15400
15401 2003-02-06  Piers Haken <piersh@friskit.com>
15402
15403         * appdomain.[ch]:
15404         * class.h:
15405         * debug-mono-symfile.c:
15406         * icall.c:
15407         * loader.c:
15408         * mono-config.c:
15409         * monosn.c:
15410         * reflection.c:
15411         * socket-io.c: warning cleanups
15412
15413 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
15414
15415         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
15416         function. works like remoting invoke, but does a check for the Proxy first.
15417
15418 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
15419
15420         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
15421
15422 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
15423
15424         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
15425         array of pointers.
15426         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
15427         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
15428
15429         * object.c (mono_store_remote_field_new): used by the new jit
15430         instead of mono_store_remote_field
15431         (mono_load_remote_field_new): used by the new jit
15432         instead of mono_load_remote_field
15433
15434 2003-02-05  Patrik Torstensson
15435
15436         * appdomain.c: changed unload to take the domain id instead
15437         of domain
15438         
15439         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
15440
15441
15442 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15443
15444         * appdomain.c: don't look for assemblies in ApplicationBase if
15445         PrivateBinPathProbe is set.
15446
15447 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15448
15449         * object.c: make the first argument in main_args contain the absolute
15450         path to the assembly. Fixes bug #37511.
15451
15452 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15453
15454         * icall.c: get correct UTC offset for countries not using daylight
15455         time saving. Fixes bug #30030.
15456
15457 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15458
15459         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15460         and 1 are the family).
15461
15462 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
15463
15464         * icall.c (ves_icall_InternalExecute): removed wrong assertion
15465
15466         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15467
15468 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
15469
15470         * reflection.c: added support for SignatureHelper tokens, which is
15471         needed by the Calli opcode.
15472
15473         * reflection.h: track changes to SignatureHelper class.
15474
15475         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15476
15477 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15478
15479         * appdomain.c: fixed loading assemblies from PrivateBinPath.
15480
15481 2003-02-03  Patrik Torstensson
15482         * appdomain.[c|h], domain.c : 
15483          - Added support for getting a domain via domain id
15484          - Support for setting and getting domain from System.AppDomain 
15485            (used in cross appdomain channel)
15486          - Added support for get/set for a MonoAppContext on a thread 
15487            (Context class in System.Runtime.Remoting.Contexts),
15488          - Removed hack in Get/SetData and ExecuteAssembly.
15489         
15490         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15491         the managed world to get control when a proxy is created.
15492
15493         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15494         
15495 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
15496
15497         * icall.c
15498         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15499         Populate the codebase field as well.
15500
15501 2003-02-02  Martin Baulig  <martin@ximian.com>
15502
15503         * debug-mono-symfile.c
15504         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15505         (mono_debug_symfile_add_method): Allow interncalls.
15506
15507 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15508
15509         * icall.c: throw parse exception if strtod fails or the string is empty.
15510
15511 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15512
15513         * marshal.c: handle object type separately from defined
15514         class types.
15515
15516 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
15517
15518         * marshal.c: handle NATIVE_LPSTR for strings when it's
15519         explicitly specified.
15520
15521 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
15522
15523         * reflection.c, reflection.h, icall.c: setup the reflection
15524         handle cache for ModuleBuilders and AssemblyBuilders.
15525
15526 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
15527
15528         * reflection.c (reflection_methodbuilder_to_mono_method): set
15529         pinvoke flag
15530
15531 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15532
15533         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
15534
15535 2003-01-29  Dick Porter  <dick@ximian.com>
15536
15537         * threads.c: No need for the fake_thread kludge now that Thread
15538         doesn't run a class constructor
15539         
15540 2003-01-29  Dick Porter  <dick@ximian.com>
15541
15542         * threads.c: Use g_direct_hash instead of the rather bogus
15543         g_int_hash
15544
15545 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
15546
15547         * marshal.c (mono_marshal_get_native_wrapper): add check for null
15548         (fix pinvoke12.exe)
15549         (mono_marshal_get_struct_to_ptr): generate valid IL code
15550         (mono_marshal_get_ptr_to_struct): generate valid IL code
15551         (*): correctly set sig->pinvoke, we need to memdup the signature
15552         to do that
15553
15554 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15555
15556         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
15557         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
15558
15559 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15560
15561         * profiler.c: provide more callers information.
15562
15563 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
15564
15565         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
15566
15567         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
15568
15569         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
15570
15571 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15572
15573         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
15574         exception instead of going into an infinite loop on dates which it 
15575         can't yet handle.
15576
15577         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
15578         out-of-range exception if needed.
15579
15580         * class.c (mono_class_setup_vtable): allow a virtual method to provide
15581         an implementation for an interface method and to override an inherited
15582         method at the same time. 
15583         Imagine a scenario when a virtual method is used to override a
15584         virtual abstract method in a parent class, and this same method 
15585         provides an implementation for an method inherited from an interface. 
15586         In this case, the interface resolution code will set im->slot, which 
15587         means that the virtual method override pass will skip this method 
15588         which means a pointer to the abstract method inherited from the parent
15589         will remain in the vtable of this non-abstract class.
15590
15591         * class.c: (mono_class_setup_vtable): continue search for a real 
15592         method if only an abstract method is found.     
15593
15594 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
15595
15596         * reflection.c: add size to encoding for ByValStr and ByValArray
15597         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
15598
15599 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15600
15601         * class.c (mono_class_setup_vtable): pass the override info as an
15602         argument.
15603
15604         * class.c (mono_class_setup_vtable): set the slot of overriding methods
15605         correctly.
15606         
15607         * reflection.c (ensure_runtime_vtable); add support for method 
15608         overrides.
15609         
15610 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15611
15612         * reflection.c (resolution_scope_from_image): Hack to work to work with
15613         dynamic assemblies.
15614
15615         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
15616         added a 'force_ref' argument to force this function to allways return 
15617         a TypeRef. This is needed by mono_image_get_memberref_token ().
15618         
15619 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15620
15621         * reflection.c (mono_image_get_type_info): interfaces really don't have
15622         a parent.
15623
15624         * reflection.c (mono_image_basic_init): fill out missing fields of
15625         image structure.
15626
15627         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
15628         dynamic assemblies. This is required so dynamic assemblies show up in
15629         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
15630         Type::GetType() etc. This is consistent with MS behaviour.
15631
15632         * image.c image.h reflection.c: add newly created classes to the name 
15633         cache so mono_class_get () will find them.      
15634
15635 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
15636
15637         First part of changes to get IKVM.NET running under mono.
15638         
15639         * appdomain.h, appdomain.c: added new function 
15640         mono_domain_try_type_resolve() which will emit TypeResolve events. 
15641         This function will call AppDomain::DoTypeResolve to do the actual work.
15642
15643         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
15644         moved existing code dealing with dynamic tokens to a new function 
15645         called mono_reflection_lookup_dynamic_token (). This function will 
15646         raise TypeResolve events when appropriate. Since reflection.c is not 
15647         part of libmetadata, a new hook function called 
15648         mono_lookup_dynamic_token() is added to class.c which will call this.
15649
15650         * assembly.h assembly.c: make the invoke_load_hook function public,
15651         so it can be called for dynamic assemblies.
15652
15653         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
15654
15655         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
15656         type isn't found.
15657
15658         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
15659         MonoGHashTable, since it contains pointers to objects which the GC 
15660         needs to track.
15661
15662         * assembly.c (search_loaded): remove unused variable.
15663         
15664 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
15665
15666         * object.c: fixed issue exposed by gcc-generated IL programs
15667         that use RVA data for pointers.
15668
15669 2003-01-25  Martin Baulig  <martin@ximian.com>
15670
15671         * threads.c (start_wrapper): Moved the initialization of
15672         `start_func' above the mono_new_thread_init() call to which we
15673         pass it as argument.
15674
15675 2003-01-24  Martin Baulig  <martin@ximian.com>
15676
15677         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
15678         the MonoThread pointer.
15679
15680 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
15681
15682         * icall.c: Rename `PowImpl' to Pow.
15683
15684 2003-01-23  Dick Porter  <dick@ximian.com>
15685
15686         * threads.c (start_wrapper): Create a Thread object if needed, so
15687         the Main() thread can do the class initialisation in a subthread
15688         that has been set up to allow managed code execution.
15689
15690         Pass the thread ID instead of the MonoThread pointer to the thread
15691         start and attach callbacks.  This change is required, because the
15692         jit thread start callback must be called _before_ the Thread
15693         object can be created.
15694         
15695         (mono_thread_init): Removed much object creation code that is no
15696         longer needed.  No managed code is called from here now.
15697
15698         * object.c (mono_runtime_exec_managed_code): Create a subthread
15699         for Main, and call back to the runtime to use it.
15700         Set the exit code when Main exits.
15701
15702         * gc.c: Make sure domain finalisation happens in a subthread.
15703         Re-enable threaded GC, fixing bug 31333 (again).
15704
15705         * environment.c: System.Environment internall calls (so far just
15706         ExitCode is here, the others are still in icall.c)
15707
15708         * appdomain.c (mono_runtime_cleanup): All threads running managed
15709         code should have finished before mono_runtime_cleanup() is
15710         reached, so no need to clean up threads.
15711
15712 2003-01-22  Martin Baulig  <martin@ximian.com>
15713
15714         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
15715         `gpointer func' arguments.      
15716         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
15717         but added `MonoThread *thread' argument.
15718         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
15719
15720         * threads.c (mono_new_thread_init): Added `gpointer func' argument
15721         and pass it to the mono_thread_start_cb callback.
15722         (mono_install_thread_callbacks): New public function to install a
15723         set of callbacks which are set by the debugger.
15724         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
15725
15726 2003-01-22  Martin Baulig  <martin@ximian.com>
15727
15728         * Makefile.am: Install debug-mono-symfile.h.
15729
15730 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
15731
15732         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
15733
15734 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
15735
15736         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
15737         * class.c (mono_ptr_class_get): correctly set access levels of pointers
15738         (mono_array_class_get): correctly set access levels of arrays
15739
15740 2003-01-20      Patrik Torstensson
15741         * image.h (MonoAssemblyName): changed major, minor, build, revision
15742         from signed to unsigned.
15743
15744 2003-01-20  sean kasun <skasun@azstarnet.com>
15745
15746         * reflection.c (load_cattr_value): Now this handles
15747         MONO_TYPE_SZARRAY.  Fixes bug #35629
15748
15749 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
15750
15751         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
15752         integer value
15753
15754 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15755
15756         * decimal.c: fixed bug #26056.
15757
15758 2003-01-17  Martin Baulig  <martin@ximian.com>
15759
15760         * gc.c: Raise an ExecutionEngineException instead of using g_error().
15761
15762 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15763
15764         * exception.[ch]:
15765         (mono_get_exception_type_initialization): new function.
15766
15767         * object.c: throw a TypeInitializationException when an exception is
15768         thrown invoking the class constructor.
15769
15770 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15771
15772         * reflection.c: fixed attribute reading.
15773
15774 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15775
15776         * icall.c:
15777         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
15778         provided, look for the type in the calling assembly and then in
15779         mscorlib; if the assembly name is provided, only try that one.
15780
15781 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15782
15783         * object.c: register the vtable before there is a chance it's
15784         queried again recursively.
15785
15786 2003-01-13  Duncan Mak  <duncan@ximian.com>
15787
15788         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
15789         gc-internal.h. 
15790         
15791 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
15792
15793         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
15794
15795 2003-01-11  Martin Baulig  <martin@ximian.com>
15796
15797         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
15798         this to 20 for the release.
15799
15800 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
15801
15802         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
15803
15804         * loader.c (mono_method_get_marshal_info): bug fix
15805
15806         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
15807         structures with explicit layout
15808
15809 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15810
15811         * profiler.c: made the output more readable (and sorted). 
15812         Added caller information for the allocation profiler.
15813
15814 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
15815
15816         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
15817
15818 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15819
15820         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
15821         to get value types.
15822         
15823 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
15824
15825         * object.c, profiler.h, profiler.c, profiler-private.h:
15826         Added object allocation profiler.
15827
15828 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
15829
15830         * reflection.h, reflection.c: handle global methods.
15831         Compress blob entries.
15832
15833 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
15834
15835         * marshal.c: fix compilation.
15836
15837 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
15838
15839         * loader.c (mono_method_get_marshal_info): impl.
15840
15841         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
15842
15843 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15844
15845         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
15846         for reference types.
15847
15848 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
15849
15850         * loader.c: fixed off by one error in loaded parameter names.
15851
15852 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
15853
15854         * marshal.c (mono_marshal_get_icall_wrapper): like
15855         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
15856         instead of a MonoMethod.
15857
15858 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15859
15860         * decimal.c: fixed bug #36537.
15861
15862 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
15863
15864         * marshal.c: throw a missing method exception if a
15865         P/Invoke method is not found.
15866
15867 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15868
15869         * icall.c: allow a null this for constructors.
15870
15871 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15872
15873         * icall.c: raise the proper exceptions if the arguments to the
15874         internal Invoke are incorrect.
15875
15876 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
15877
15878         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
15879
15880 2003-01-03  Martin Baulig  <martin@ximian.com>
15881
15882         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15883
15884 2002-12-31  Martin Baulig  <martin@ximian.com>
15885
15886         * debug-mono-symfile.c: Completely rewrote the type section.
15887         Instead of using individual malloc()ed fields, we use one big
15888         continuous memory area and offsets into this area.
15889         See the comments in the source code for details.
15890
15891 2002-12-30  Martin Baulig  <martin@ximian.com>
15892
15893         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
15894
15895 2002-12-30  Martin Baulig  <martin@ximian.com>
15896
15897         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
15898         line number table in this data blob instead of using an external
15899         pointer.
15900
15901 2002-12-28  Martin Baulig  <martin@ximian.com>
15902
15903         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
15904
15905 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
15906
15907         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
15908         as a boxed return type.
15909
15910 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
15911
15912         * appdomain.c
15913         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
15914         g_build_filename to properly get separators on the filename created.
15915
15916         * object.h: Small change, introduce MonoMarshalByRefObject to
15917         track the layout of that structure in the C# universe as we make
15918         changes there.
15919
15920 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
15921
15922         * object.c: removed assert to allow static fields on interfaces.
15923         * loader.c: a TypeSpec may be used for any type, not just arrays.
15924
15925 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15926
15927         * class.c, class.h: added mono_class_array_element_size ().
15928         Ignore static methods in interfaces.
15929
15930 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15931
15932         * threads.c: fixed the build under cygwin.
15933
15934 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
15935
15936         * reflection.c: handle nullref constants. Allocate keys for
15937         reflection handles with the GC.
15938
15939 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15940
15941         * threads.c, threads.h: added mono_thread_get_abort_signal()
15942         to get a suitable signal for thread abort.
15943
15944 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15945
15946         * metadata.c: fix handling of ExportedType table.
15947
15948 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15949
15950         * icall.c: added WriteWindowsDebugString internal call.
15951
15952 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15953
15954         * reflection.h: added fields to match C# implementation.
15955
15956 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15957
15958         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
15959
15960 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
15961
15962         * gc.h, gc-internal.h: Rename header for GC internal calls to
15963         gc-internal.h from gc.h as to not clash with Boehm GC having its
15964         header installed as <gc.h> in outside include paths.
15965         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
15966         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
15967
15968 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15969
15970         * icall.c: assign minor, build and revision in FillName.
15971
15972 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
15973
15974         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
15975         Added support for running code generated by Reflection.Emit.
15976
15977 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15978
15979         * appdomain.c: check for NULL argument in LoadFrom.
15980
15981 2002-12-10  Dick Porter  <dick@ximian.com>
15982
15983         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
15984
15985 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15986
15987         * appdomain.c: fix buglet when building exe file name.  Handle full
15988         assembly name (needed after latest changes to AssemblyName).
15989         * image.c:
15990         (mono_image_close): free some hashtables.
15991
15992 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
15993
15994         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
15995         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
15996         on some systems (redhat 7.3) 
15997
15998 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
15999
16000         * threads.c: delete the critical section of a sync block,
16001         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
16002
16003 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
16004
16005         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
16006
16007 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16008
16009         * appdomain.[ch]: handle the assembly preload event to try loading the
16010         assemblies using the paths we have in the current domain.
16011
16012         * assembly.[ch]: created an assembly preload hook that is called to try
16013         loading the assembly by other means that the ones provided here.
16014
16015         * domain.c: initialize the domain search path.
16016
16017         From now on, assemblies (TODO: except corlib and System) are loaded
16018         according to these rules when using mono_assembly_load ():
16019
16020                 1. It tries to load the assembly from the ApplicationBase
16021                 of the current domain appending .dll and .exe (TODO: have to
16022                 try loading from name/name.dll and name/name.exe).
16023
16024                 2. It tries the search path specified in PrivateBinPath for the
16025                 current domain (if any).
16026
16027                 3. Previous behavior.
16028
16029 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
16030
16031         * icall.c: implemented GetInterfaceMap() related icall.
16032         * domain.c, loader.h: load MethodInfo in mono_defaults.
16033
16034 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16035
16036         * gc.c: disable the finalizer thread for now, untill all the issues
16037         with it are resolved.
16038
16039 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16040
16041         * string-icalls.c: handle embedded nulls in string ctor when the
16042         length is specified.
16043
16044 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16045
16046         * class.c: look for explicit interface implementation in parent
16047         classes, too.
16048
16049 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
16050
16051         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
16052
16053 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16054
16055         * gc.c: protect handles with a critical section.
16056
16057 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16058
16059         * icall.c:
16060         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
16061         parameters. If no assembly specified, try getting the type from all
16062         the assemblies in the current domain, else, load the assembly and get
16063         the type from it.
16064
16065 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16066
16067         * marshal.c: applied patch from Aleksey Demakov that fixes
16068         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
16069
16070 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16071
16072         * icall.c: fixed get_location.
16073
16074 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
16075
16076         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
16077         declarations to make it work with older gcc. 
16078
16079         * loader.c (mono_get_method): set signature->pinvoke for native calls
16080
16081 2002-11-20  Dick Porter  <dick@ximian.com>
16082
16083         * threads.c (mono_thread_init): Set the main thread's handle
16084
16085 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16086
16087         * gc.c: allow compilation without GC support. Changed to match the
16088         mono coding style.
16089
16090 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16091
16092         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
16093
16094 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
16095
16096         * reflection.c: set a public key token on the core assemblies.
16097
16098 2002-11-18  Dick Porter  <dick@ximian.com>
16099
16100         * threads.c: Split out some thread initialisation so that other
16101         files can set the start callback function.
16102
16103         * gc.c: Run finalisers in a separate thread, to avoid stack
16104         overflow.  Fixes bug 31333.
16105
16106         * appdomain.c: Set up GC finalisation thread.
16107
16108         * reflection.c: 
16109         * object.c: 
16110         * domain.c: Use gc.h macros for GC_malloc
16111         
16112 2002-11-15  Dick Porter  <dick@ximian.com>
16113
16114         * threadpool.c: 
16115         * threads.c:
16116         * appdomain.c: Removed mono_runtime_init_with_attach(),
16117         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
16118         merging the extra parameter with the existing function.  Removed
16119         unneeded code in mono_thread_attach().
16120
16121 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
16122
16123         * image.c (mono_image_loaded_by_guid): a method to get loaded
16124         images by guid. 
16125         (load_metadata_ptrs): we store the guid as string.
16126
16127 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
16128
16129         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
16130
16131         * metadata.c (mono_guid_to_string): imported method form Zoltan
16132         Varga (slightly modified)
16133
16134         * assembly.c (mono_assembly_open): load precompiled code
16135
16136         * loader.h (MonoMethod): we store the method token for use in the
16137         aot compiler. 
16138
16139 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16140
16141         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
16142         the hook function called when an assembly is loaded.
16143         
16144         * domain.c: Modified file.
16145         (mono_domain_assembly_load): removed hash table insertion of assemblies.
16146
16147         Fixes bug #33196.
16148
16149 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
16150
16151         * reflection.c: Map PEFileKind to the value expected by the WinNT
16152         image loader. 
16153
16154 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16155
16156         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
16157         Read until the buffer is filled completely.
16158
16159 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16160
16161         * icall.c: implemented MonoType.InternalGetEvent ().
16162
16163 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16164
16165         * appdomain.c: implemented InitAppDomainSetup. Delayed
16166         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
16167         the entry_assembly.
16168
16169         * assembly.c: base_dir is now an absolute path ending with
16170         G_DIR_SEPARATOR.
16171
16172         * icall.c: modified get_location according to the above changes.
16173
16174         * object.c: init AppDomain.SetupInformation for the default domain after
16175         we have the entry assembly.
16176
16177         * domain.c: when unloading a domain, setup = NULL.
16178
16179 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
16180
16181         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
16182
16183 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
16184
16185         * object.h, object.c: introduced mono_object_get_virtual_method ()
16186         to lookup the method invoked on an object when a callvirt is done on
16187         a method.
16188         * icall.c: make MethodInfo::Invoke() always do a virtual call.
16189
16190 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16191
16192         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
16193         current domain when loaded an assembly and failed to load it.
16194
16195         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
16196
16197 2002-10-31  Dick Porter  <dick@ximian.com>
16198
16199         * icall.c: 
16200         * file-io.h: 
16201         * file-io.c: Return the error status in a parameter, as the
16202         GetLastError() value has long since been blown away if we try and
16203         look it up in a subsequent internal call invocation.  Delete the
16204         GetLastError() internal call, because it's useless.
16205
16206 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
16207
16208         * class.[ch]: added cast_class to fix bug 29517
16209
16210 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
16211
16212         * marshal.c: create valid IL code in the filter clause:
16213         the new JIT is less forgiving:-)
16214
16215 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16216
16217         * icall.c: removed get_property internal call.
16218
16219 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
16220
16221         * appdomain.h domain.c: Added an ID to appdomains.
16222         
16223         * threads.c threads.h icall.c: Implement icall
16224         Thread:GetDomainID(), and remove unused icall 
16225         CurrentThreadDomain_internal.
16226
16227 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16228
16229         * icall.c: Don't recurse through the base types in GetConstructor.
16230         Fixes bug #32063. 
16231
16232 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16233
16234         * mempool.h, mempool.c: added mono_mempool_empty() and
16235         mono_mempool_stats().
16236
16237 2002-10-23  Dick Porter  <dick@ximian.com>
16238
16239         * file-io.c: 
16240         * file-io.h: 
16241         * icall.c: Added MonoIO.GetFileType internal call
16242
16243 2002-10-17  Dick Porter  <dick@ximian.com>
16244
16245         * appdomain.c (mono_runtime_cleanup): Don't signal the async
16246         delegate semaphore before waiting for all threads to finish,
16247         because new threads can also call async delegates.  Fixes bug
16248         32004.
16249
16250         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
16251         of 3 seconds, in case another async job is queued.  (This part is
16252         needed because the bug fix reintroduced the 3s exit lag.)  This
16253         makes the mono_runtime_shutdown flag superfluous.
16254
16255 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16256
16257         * reflection.c: include ehader size in method section headers.
16258         Really check for suplicated modules entries.
16259
16260 2002-10-17  Martin Baulig  <martin@gnome.org>
16261
16262         * debug-mono-symfile.c: Added back support for locals.
16263
16264 2002-10-14  Martin Baulig  <martin@gnome.org>
16265
16266         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
16267         MONO_TYPE_VOID.
16268
16269 2002-10-14  Martin Baulig  <martin@gnome.org>
16270
16271         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
16272         mono_class_get() instead of looking in the class cache. 
16273
16274 2002-10-13  Martin Baulig  <martin@gnome.org>
16275
16276         * debug-mono-symfile.c: Set version number to 28, include the
16277         signature in method names.
16278
16279 2002-10-13  Martin Baulig  <martin@gnome.org>
16280
16281         * debug-mono-symfile.h: Set version number to 27.
16282
16283 2002-10-11  Martin Baulig  <martin@gnome.org>
16284
16285         * gc.c: Don't register/unregister NULL pointers as disappearing links.
16286
16287 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16288
16289         * metadata.c, metadata.h: added helper function to allocate signatures.
16290
16291 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16292
16293         * icall.c: added internal call to get the location of machine.config.
16294
16295 2002-10-08  Martin Baulig  <martin@gnome.org>
16296
16297         * debug-mono-symfile.c: Ignore classes with a pending init for the
16298         moment.
16299
16300 2002-10-03  Dick Porter  <dick@ximian.com>
16301
16302         * threads.c: Freebsd pthread_t is a pointer
16303
16304 2002-10-03  Dick Porter  <dick@ximian.com>
16305
16306         * socket-io.c: Implemented GetHostName_internal
16307
16308 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16309
16310         * mono-config.c:
16311         (mono_config_parse_file): don't leak the text.
16312
16313 2002-10-02  Martin Baulig  <martin@gnome.org>
16314
16315         * debug-mono-symfile.c: Added support for methods.
16316
16317 2002-10-01  Martin Baulig  <martin@gnome.org>
16318
16319         * debug-mono-symfile.c: Don't emit methods and line numbers for
16320         the dynamic symbol file, just write the type table.  We can easily
16321         have an external helper program which creates a symbol file for an
16322         IL file.        
16323
16324 2002-10-01  Dick Porter  <dick@ximian.com>
16325
16326         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
16327         Only add the handle to the cleanup array when we're about to
16328         launch the thread.  Bug 31425 deadlocked when the test was run on
16329         mono under w32.
16330
16331 2002-10-01  Martin Baulig  <martin@gnome.org>
16332
16333         * debug-mono-symfile.c: Added support for properties.
16334
16335 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16336
16337         * reflection.c: unaligned store fix from Mark Crichton
16338         <crichton@gimp.org>.
16339
16340 2002-09-27  Martin Baulig  <martin@gnome.org>
16341
16342         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
16343         New interncall.
16344
16345 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16346
16347         * assembly.h, assembly.c: use a sane API to hook into the assembly
16348         loading process instead of a useless special-purpouse hack
16349         (ngen needs a hook, too, for example).
16350
16351 2002-09-27  Dick Porter  <dick@ximian.com>
16352
16353         * threads.c (mono_thread_init): Call GetCurrentProcess() so
16354         io-layer can set up some process handle info.  Not needed on w32,
16355         but doesn't hurt either.
16356
16357         * process.c: Pass the program name in the second parameter to
16358         CreateProcess, so the path is searched.  Include the working
16359         directory. Implemented process name, process enumeration, and some
16360         process detail internal calls.
16361         
16362         * icall.c: Added internal calls for process lookup, and some
16363         process details
16364
16365 2002-09-26  Martin Baulig  <martin@gnome.org>
16366
16367         * assembly.c (mono_install_open_assembly_hook): New global
16368         function to install a function to be invoked each time a new
16369         assembly is loaded.
16370         (mono_assembly_open): Run this callback function if set.
16371
16372         * debug-mono-symfile.c: Put back line numbers for the dynamic
16373         symbol file and also record the .il file as source file.  This
16374         allows us to install the temporary symbol file as `file.dbg' just
16375         like a compiler-generated one.
16376
16377 2002-09-26  Nick Zigarovich <nick@chemlab.org>
16378
16379         * Corrected typo in gc.c (BOHEM vs BOEHM).
16380
16381 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16382
16383         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
16384         GetProperties. Also avoid calling g_slist_length in GetProperties and
16385         GetMethods.
16386
16387 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16388
16389         * reflection.c: avoid unaligned stores (bug spotted by
16390         Mark Crichton  <crichton@gimp.org>).
16391
16392 2002-09-25  Martin Baulig  <martin@gnome.org>
16393
16394         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
16395         instead of guint64 for addresses and added prologue/epilogue info.
16396
16397 2002-09-25  Martin Baulig  <martin@gnome.org>
16398
16399         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
16400         store line number info.  For the dynamic symbol file, we only need
16401         to provide the JIT generated dynamic line number info for the dynamic
16402         symbol file.
16403
16404 2002-09-25  Martin Baulig  <martin@gnome.org>
16405
16406         * debug-mono-symfile.h: Incremented version number.
16407
16408 2002-09-24  Martin Baulig  <martin@gnome.org>
16409
16410         * class.c (mono_debugger_class_init_func): New global function
16411         pointer variable.
16412         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
16413         call it.
16414
16415         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
16416         function.  This is called via the mono_debugger_class_init_func
16417         hook to add all types to the dynamic type table.
16418         (ves_icall_MonoDebugger_GetType): New interncall to get a class
16419         from its metadata token.
16420
16421         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
16422         New interncall for the debugger.
16423
16424 2002-09-24  Nick Drochak <ndrochak@gol.com>
16425
16426         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
16427         before using it in case it is null.
16428         
16429 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16430
16431         * metadata.c: allow custom modifiers in local var signatures
16432         (bug spotted by Zoltan Varga).
16433
16434 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16435
16436         * class.c: deal with the <Module> class that may have a NULL vtable.
16437         Eliminate warnings.
16438
16439 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16440
16441         * image.c, image.h: more strong name helpers.
16442         * monosn.c: more work: convert pem keys to cryptoapi format.
16443
16444 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16445
16446         * string-icalls.c: speedup IndexOf.
16447
16448 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16449
16450         * icall.c: updates from Zoltan.2.Varga@nokia.com.
16451
16452 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16453
16454         * icall.c: cleanup: use mono_object_domain ().
16455
16456 2002-09-23  Martin Baulig  <martin@gnome.org>
16457
16458         * debug-mono-symfile.c: Improved type support.
16459
16460 2002-09-22  Martin Baulig  <martin@gnome.org>
16461
16462         * debug-mono-symfile.c: Added support for reference types and strings.
16463
16464 2002-09-22  Martin Baulig  <martin@gnome.org>
16465
16466         * debug-mono-symfile.c: Started to work on the type table.
16467
16468 2002-09-21  Martin Baulig  <martin@gnome.org>
16469
16470         * debug-mono-symfile.c: Largely reworked the symbol table format.
16471         The symbol table is now incrementally updated each time a new
16472         method is added.  We're now also using our own magic and version
16473         so that you don't need to recompile all your classes if the
16474         dynamic table changes.
16475         (mono_debug_update_mono_symbol_file): Removed.
16476         (mono_debug_symfile_add_method): New function to add a method.
16477
16478 2002-09-21  Martin Baulig  <martin@gnome.org>
16479
16480         * icall.c
16481         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16482         New interncall.
16483
16484         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16485         New interncall to get a method from its metadata token.
16486
16487 2002-09-21  Martin Baulig  <martin@gnome.org>
16488
16489         * debug-mono-symfile.c: Create type table.
16490
16491 2002-09-20  Martin Baulig  <martin@gnome.org>
16492
16493         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16494
16495 2002-09-20  Martin Baulig  <martin@gnome.org>
16496
16497         * debug-mono-symfile.c: Provide information about params and locals.
16498
16499 2002-09-20  Martin Baulig  <martin@gnome.org>
16500
16501         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16502         New interncall.
16503
16504         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16505         interncall to get a method from its metadata token.
16506
16507 2002-09-20  Martin Baulig  <martin@gnome.org>
16508
16509         * debug-mono-symfile.c: Added a few checks for method->header
16510         being non-NULL.  This should never happen, but for the moment
16511         let's use a g_warning() rather than a g_assert().
16512
16513 2002-09-19  Mark Crichton  <crichton@gimp.org>
16514
16515         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16516         even if support for it isn't present.  Added an #ifdef to fix this.
16517
16518         * socket-io.c: Added checks back for Solaris support.
16519
16520 2002-09-19  Martin Baulig  <martin@gnome.org>
16521
16522         * debug-mono-symfile.c (read_string, write_string): Reflect latest
16523         changes in the symbol file format.
16524
16525 2002-09-18  Martin Baulig  <martin@gnome.org>
16526
16527         * debug-mono-symfile.c: Set version number to 21.
16528
16529 2002-09-18  Dick Porter  <dick@ximian.com>
16530
16531         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
16532         on netbsd.  Fixes bug 30051.
16533
16534 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16535
16536         * reflection.c:
16537         (set_version_from_string): little fix.
16538
16539 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16540
16541         * monosn.c, Makefile.am: added strong name utility.
16542         * reflection.h, reflection.c: implemented delayed signing,
16543         locale, version and hash id assembly attributes.
16544
16545 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16546
16547         * loader.c, metadata.c: load param attributes in signatures.
16548
16549 2002-09-16  Martin Baulig  <martin@gnome.org>
16550
16551         * debug-mono-symfile.c: Added string table with all method names.
16552
16553 2002-09-14  Martin Baulig  <martin@gnome.org>
16554
16555         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
16556         fast method lookup.
16557
16558 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16559
16560         * reflection.c: record the public key token of referenced assemblies.
16561
16562 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16563
16564         * image.c, image.h: added functions to get the strong name and the
16565         public key of an assembly.
16566         * pedump.c: use them.
16567
16568 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
16569
16570         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
16571
16572 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
16573
16574         * marshal.c (mono_marshal_get_managed_wrapper): Added
16575         MONO_TYPE_BOOLEAN 
16576
16577 2002-09-11  Martin Baulig  <martin@gnome.org>
16578
16579         * gc.c: Call GC_unregister_disappearing_link() on all links when
16580         finalizing them, this is necessary to aviod a crash in boehm's
16581         finalize handler.
16582
16583 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16584
16585         * gc.c: handle GetTarget for finalized objects spotted and fixed by
16586         nick@chemlab.org.
16587
16588 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16589
16590         * icall.c: implemented MonoType::Module.
16591         * reflection.c, reflection.h: mono_module_get_object () from
16592         Tomi Pakarinen <tomi.pakarinen@welho.com>.
16593
16594 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16595
16596         * icall.c: ignore overridden methods in GetMethods ().
16597         Fix for FieldInfo::SetValue().
16598         * object.c: handle float/double in runtime invoke.
16599
16600 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16601
16602         * object.c: allow a constructor to be called again on an object.
16603
16604 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16605
16606         * class.h, class.c: move field layout code to it's own function and
16607         export it. Get an interface id earlier. Move fields in MonoClass
16608         so they are more cache friendly and align the bitfields.
16609         * loader.c: temporary handle get_param_names() for a runtime method.
16610         * reflection.c, reflection.h: more code to handle runtime creation of
16611         types.
16612
16613 2002-09-09  Martin Baulig  <martin@gnome.org>
16614
16615         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
16616         signature with the pinvoke field being set for the actual call.
16617
16618 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16619
16620         * icall.c: removed some unused icalls. Start of map of glib charsets
16621         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
16622
16623 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16624
16625         * debug-helpers.c: break infinite loop (found and fixed by
16626         Holger Arnold <harnold@gmx.de>).
16627
16628 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16629
16630         * icall.c: target may be null in create_delegate.
16631
16632 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16633
16634         * marshal.c: handle a boolean return type.
16635
16636 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16637
16638         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
16639
16640 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16641
16642         * gc.c: fix weakreferences.
16643
16644 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16645
16646         * icall.c: added icall to get default codepage.
16647
16648 2002-09-03  Dick Porter  <dick@ximian.com>
16649
16650         * threads.h: 
16651         * threads.c: Use MonoThread instead of MonoObject where
16652         apropriate.
16653
16654         Store running thread objects in a hash table, so that we have all
16655         the info to hand when waiting for them to finish
16656         (means we don't need OpenThread() any more, so mingw builds should
16657         be fully functional again.)
16658
16659         * verify.c:
16660         * object.h: Added thread ID to MonoThread
16661
16662 2002-09-03  Martin Baulig  <martin@gnome.org>
16663
16664         * icall.c (System.Reflection.Assembly::get_location): New interncall.
16665
16666 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16667
16668         * icall.c: fixed leak in get_temp_path. Thanks lupus.
16669
16670 2002-09-03  Martin Baulig  <martin@gnome.org>
16671
16672         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
16673         argument to store the end address of the disassembled instruction.
16674
16675         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
16676         here from debug-symfile.h.
16677         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
16678         JIT into this struct.
16679         (MonoSymbolFile): Added `char *image_file' field.
16680         (MonoDebugGetMethodFunc): Removed.
16681         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
16682         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
16683         (mono_debug_find_method): New method.
16684
16685         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
16686         create a full symbol file.
16687         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
16688         and static symbol files.
16689         (mono_debug_find_method): The symbol file keeps an internal method hash,
16690         call this to get a MonoDebugMethodInfo from a MonoMethod.
16691
16692         * debug-symfile.[ch]: Removed.
16693
16694 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
16695
16696         * image.c (do_mono_image_open): Remove linker version check.
16697
16698 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
16699
16700         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
16701         wrappers for instance methods.
16702         
16703 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16704
16705         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
16706
16707 2002-08-28  Dick Porter  <dick@ximian.com>
16708
16709         * Makefile.am: Export HOST_CC for w32 builds
16710
16711 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16712
16713         * file-io.c process.c: MonoString are null terminated, no
16714         need for mono_string_to_utf16() anymore.
16715
16716 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16717
16718         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
16719
16720 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
16721
16722         * icall.c, reflection.h: speedup System.MonoType.
16723
16724 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16725
16726         * reflection.c: allow null as the value of a string argument in
16727         custom attributes constructors.
16728
16729 2002-08-27  Martin Baulig  <martin@gnome.org>
16730
16731         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
16732         `trampoline_address' field.
16733
16734 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
16735
16736         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
16737         check (fixes bug #29486) 
16738
16739 2002-08-27  Martin Baulig  <martin@gnome.org>
16740
16741         * debug-mono-symfile.c: Changed the file format in a way that allows us
16742         open it read-only and to use a specially malloced area for all the
16743         dynamic data.  We can now also generate a symbol file on-the-fly if we're
16744         debugging IL code and there is no MCS generated symbol file for it.
16745
16746 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16747
16748         * object.c: added a define for a good string and array
16749         creation speedup (not enabled by default because we need to deal with
16750         the synch stuff).
16751
16752 2002-08-26  Martin Baulig  <martin@gnome.org>
16753
16754         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
16755         function to create a dynamic symbol file.  This is used by the
16756         debugger to create a symbol file for IL code on-the-fly.
16757
16758 2002-08-26  Martin Baulig  <martin@gnome.org>
16759
16760         * loader.c (mono_lookup_pinvoke_call): Include the error message
16761         from g_module_error() in the error message.
16762
16763 2002-08-24  Martin Baulig  <martin@gnome.org>
16764
16765         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
16766         function to update the symbol file.  The symbol file is mmap()ed
16767         writable, but private.  This allows us to install the symbol file
16768         together with the assembly.
16769
16770 2002-08-24  Martin Baulig  <martin@gnome.org>
16771
16772         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
16773         but they can read the new symbol file format which mcs is now creating.
16774
16775         * debug-symfile.c (mono_debug_find_source_location): Moved to
16776         debug-mono-symfile.c; this is now operating on the new symbol file.
16777
16778 2002-08-23  Martin Baulig  <martin@gnome.org>
16779
16780         * debug-helpers.c (mono_method_desc_from_method): New function to get
16781         a MonoMethodDesc from a MonoMethod.
16782
16783 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16784
16785         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
16786         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
16787
16788 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16789
16790         * string-icalls.[ch]: make helper methods static.
16791
16792 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16793
16794         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
16795         types to it and to SetValueInternal.
16796
16797         * object.c: Moved handle_enum label to its proper place. This was the
16798         f... bug! ;-)
16799
16800         This time i compiled mcs and gtk-sharp and they both work.
16801
16802 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16803
16804         * icall.c: reverted partially my previous patch until 
16805         object.c:set_value handles enums correcly.
16806
16807 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16808
16809         * icall.c:
16810         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
16811         (ves_icall_System_Environment_get_MachineName): removed warning when
16812         compiling under cygwin.
16813
16814 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16815
16816         * object.c: fixed field_get_value() for reference types.
16817
16818 2002-08-22  Dick Porter  <dick@ximian.com>
16819
16820         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
16821         Don't free a buffer while it's still needed.  Patch from Jonathan
16822         Liger <Jonathan.liger@wanadoo.fr>
16823
16824 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
16825
16826         * icall.c (ves_icall_System_Environment_get_Platform): Add new
16827         internal call.
16828
16829 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
16830
16831         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
16832         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
16833
16834         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
16835         we call unmanaged code which throws exceptions.
16836
16837 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16838
16839         * appdomain.h: added per-domain entry_assembly.
16840         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
16841         arguments.
16842         * icall.c: Assembly::GetEntryAssembly icall.
16843         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
16844         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
16845
16846 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16847
16848         * appdomain.h, gc.c: added mono_domain_finalize ().
16849
16850 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16851
16852         * object.c:
16853         (mono_print_unhandled_exception): changed g_warning by g_printerr
16854         because g_log has a 1024 characters limit (yeah, i got a big stack
16855         trace). Don't print exception name, that should be in ToString 
16856         returned string.
16857
16858 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16859
16860         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
16861         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
16862
16863 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16864
16865         * object.c:
16866         (mono_print_unhandled_exception): after previous commit, i realized
16867         that MS calls ToString on the exception. I changed this function to
16868         do that. This way we get stack_trace for free.
16869
16870 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16871
16872         * object.c:
16873         (mono_print_unhandled_exception): invoke Message property instead of
16874         getting 'message' field from Exception. Don't allocate memory for
16875         'trace' and 'message' if not needed.
16876
16877 2002-08-18  Dick Porter  <dick@ximian.com>
16878
16879         * unicode.c: Fix asserts to match Encoder.cs checks
16880
16881 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16882
16883         * marshal.c: fix unaligned store issue and a few wrong
16884         opcode argument types.
16885
16886 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16887
16888         * icall.c: added GetUninitializedObjectInternal internal call.
16889
16890 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
16891
16892         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
16893         to the right domain.
16894
16895 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
16896
16897         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
16898
16899         * class.c (class_compute_field_layout): set blittable to false for Strings
16900
16901         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
16902
16903 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16904
16905         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
16906         first chunk of code to create types at runtime. Code to
16907         handle ReflectedType/DeclaringType. Make reflection handles
16908         domain specific.
16909
16910 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16911
16912         * class.c: set correct name in arrays.
16913
16914 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
16915
16916         * appdomain.c (mono_domain_transfer_object): make it work with
16917         valuetypes. bug fixes.
16918
16919 2002-08-12  Dick Porter  <dick@ximian.com>
16920
16921         * object.h: Rename some parameters to avoid c++ keywords (Patch
16922         from Joseph Wenninger <kde@jowenn.at>)
16923
16924 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
16925
16926         * icall.c: added icall to implement Assembly.GetFile*.
16927
16928 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16929
16930         * reflection.h, reflection.c: code to embed managed resources.
16931
16932 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16933
16934         * class.c: move all the type size stuff into
16935         class_compute_field_layout().
16936
16937 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16938
16939         * class.c: ensure enums have always the correct instance size.
16940         * unicode.c: remove wrong assert.
16941
16942 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16943
16944         * assembly.c: fix mem corruption issue.
16945         * image.h, image.c: added mono_image_get_resource () to access
16946         managed resources.
16947         * icall.c: implemented Assembly.EntryPoint property and some
16948         Managed Resources related internalcalls.
16949
16950
16951 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16952
16953         * image.c, image.h: impemented mono_image_get_entry_point ().
16954         * appdomain.c: use mono_image_get_entry_point.
16955
16956 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16957
16958         * reflection.c: support the object type argument when loading
16959         custom attributes.
16960
16961 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
16962
16963         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
16964         String as return type.
16965
16966 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
16967
16968         * reflection.c: fix encoding of named args for custom attrs to match
16969         the ms implementation. Read them back when instantiating custom
16970         attributes.
16971
16972 2002-08-02  Radek Doulik  <rodo@ximian.com>
16973
16974         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
16975         by Dietmar as quick fix
16976         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
16977         16 as stack size, used on more places as quick fix before Dietmar
16978         will fix it properly
16979
16980 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16981
16982         * object.h, object.c: added accessors for fields and properties.
16983
16984 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
16985
16986         * class.c, class.h: made mono_class_get_field_from_name ()
16987         loop on parent types.
16988         Added mono_class_get_property_from_name ().
16989
16990 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16991
16992         * class.c, class.h: move the code to setup the type vtable in its own
16993         function so that it can be reused also for types created at runtime.
16994         Eliminate the "class" identifier from the header file.
16995         * reflection.c: setup the vtable for enums so that we can create
16996         objects for use in SetConstant ().
16997
16998 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
16999
17000         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
17001         instead of the delegate itself as this pointer (bug #28383)
17002
17003 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
17004
17005         * marshal.c (mono_marshal_get_managed_wrapper): added return type
17006         conversions.
17007
17008 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17009
17010         * loader.c: don't set the pinvoke bit on icalls.
17011
17012 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
17013
17014         * debug-helpers.c (mono_method_full_name): only print a number to
17015         indicate wrapper type (so that the output is more readable in traces).
17016
17017 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
17018
17019         * class.c (mono_class_init): include method override patch from Paolo
17020
17021 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
17022
17023         * icall.c: fixed GetTypeCode().
17024
17025 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
17026
17027         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
17028         use real delegate invoke function to make it work with multicast
17029         delegates (fix bug# 28291).
17030
17031 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17032
17033         * object.c: load constant strings.
17034
17035 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17036
17037         * reflection.c: no magic numbers.
17038         * tabledefs.h: security action enum.
17039
17040 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17041
17042         * assembly.c: fix possible memory corruption.
17043
17044 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17045
17046         * reflection.h, reflection.c: added support for linking resources.
17047         * verify.c: check we have an updated corlib.
17048
17049 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
17050
17051         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
17052         string arrays.
17053         (mono_marshal_string_array): null terminate unmanaged string arrays.
17054         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
17055
17056 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17057
17058         * icall.c: Type.GetType () can now return also types from the
17059         calling assembly.
17060
17061 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17062
17063         * loader.h, loader.c: stack walking support.
17064         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
17065         GetCallingAssembly.
17066
17067 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
17068
17069         * marshal.c: added optimisations for blittable types 
17070
17071         * class.c (mono_array_class_get): do not set blittable attribute on arrays
17072         (mono_class_setup_mono_type): set blittable attribute for single
17073         and double.
17074
17075         * marshal.c (mono_string_utf8_to_builder): impl.
17076         (mono_string_builder_to_utf8): impl.
17077         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
17078
17079 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
17080
17081         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
17082         (mono_marshal_get_managed_wrapper): impl. byref types
17083
17084 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17085
17086         * icall.c:
17087         (search_method): don't display debug message. 
17088
17089 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
17090
17091         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
17092
17093 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17094
17095         * appdomain.c: set the missing filename when throwing exception.
17096
17097 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
17098
17099         * metadata.c (mono_type_size): code cleanup
17100         (mono_type_stack_size): removed some test code
17101
17102 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
17103
17104         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
17105         mono_get_exception_file_not_found now.
17106
17107         * exception.c (mono_exception_from_name_two_strings): New version
17108         that will call a constructor with two string arguments. 
17109         (mono_get_exception_file_not_found): New helper routine, used to
17110         report file-not-found errors.
17111
17112 2002-07-20  Dick Porter  <dick@ximian.com>
17113
17114         * process.h:
17115         * process.c: Pass file handles to CreateProcess
17116         
17117         * icall.c:
17118         * file-io.h:
17119         * file-io.c: Implemented CreatePipe
17120
17121 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
17122
17123         * metadata.c (mono_get_param_info): set alignment for value types
17124
17125 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17126
17127         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
17128         Constify mono_domain_assembly_open().
17129         * loader.c: handle null namespace in icalls.
17130
17131 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
17132
17133         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
17134         (emit_str_to_ptr_conv): marshal object as structs
17135
17136         * metadata.c (mono_type_to_unmanaged): marshal object as structs
17137
17138         * marshal.c (mono_marshal_get_runtime_invoke): support value types
17139
17140 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
17141
17142         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
17143         (mono_marshal_get_native_wrapper): we an now return value types
17144
17145 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17146
17147         * verify.c: more checks implemented.
17148
17149 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
17150
17151         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
17152         (fix bug #27695)
17153         (mono_marshal_get_native_wrapper): allow byref arguments
17154         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
17155         impl. PtrToStringXXX methods
17156         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
17157         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
17158         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
17159         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
17160         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
17161
17162 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17163
17164         * reflection.c: fix buglet in parsing an assembly name.
17165
17166 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
17167
17168         * marshal.c (emit_ptr_to_str_conv): first impl.
17169
17170 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17171
17172         * object.c, class.h: cache the vtable in the class as suggested by
17173         vargaz@freemail.hu (Zoltan Varga).
17174
17175 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17176
17177         * class.h, loader.c: added mono_field_from_token().
17178         * verify.c: first cut of type checking code.
17179
17180 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
17181
17182         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
17183
17184 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
17185
17186         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
17187         (fix bug #27782)
17188         (mono_marshal_get_remoting_invoke): impl.
17189         (mono_delegate_begin_invoke): impl.
17190         (mono_mb_emit_save_args): impl.
17191         (mono_delegate_end_invoke): impl.
17192         (mono_marshal_get_delegate_begin_invoke):
17193         (mono_marshal_get_delegate_end_invoke):
17194         (mono_marshal_get_delegate_invoke): generate a special name for
17195         those methods (including the signature) and associate them whith
17196         the delegate class. 
17197
17198 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
17199
17200         * reflection.[ch]: 
17201         (mono_reflection_type_from_name): now it has a MonoImage parameter
17202         which is used as the default image to search the type in. If the image
17203         is NULL or getting the type from it fails, it defaults to corlib.
17204
17205         * icall.c: changed 1 call to mono_reflection_type_from_name to match
17206         new parameter.
17207
17208 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17209
17210         * reflection.c: update the parameter table index.
17211
17212 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17213
17214         * domain.c: don't include the mark byte in the string hash.
17215
17216 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17217
17218         * icall.cs: icall for Type.GetTypeCode ().
17219         * verify: a couple of fixes and disabled local initialization checks.
17220
17221 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
17222
17223         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
17224
17225         * debug-helpers.c (mono_method_full_name): print the type of the
17226         runtime wrapper
17227
17228         * metadata.c (mono_signature_hash): a hash function for signatures
17229         (mono_signature_hash): better hash algorithm
17230
17231         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
17232
17233         * debug-helpers.c (mono_method_full_name): this can now generate
17234         method names with signatures
17235
17236         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
17237         method dont have this pointers.
17238
17239 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17240
17241         * reflection.c: fixup typebuilder tokens.
17242         * image.c: fix buglet.
17243         * marshal.h: remove whitespace.
17244         * metadata.h, metadata.c: reinstate code that was removed.
17245         * verify.c: handle catch directives and fix another couple of bugs.
17246
17247 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
17248
17249         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
17250         (mono_marshal_get_native_wrapper): make it comp. with the old code
17251         (mono_marshal_get_native_wrapper): support boolean
17252         (mono_marshal_get_managed_wrapper): support more types
17253
17254 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
17255
17256         * class.c (class_compute_field_layout): compute class->blittable attribute.
17257
17258 2002-07-09  Dick Porter  <dick@ximian.com>
17259
17260         * threads.c: Make the thread cleaning up cope with threads that
17261         call ExitThread()
17262
17263 2002-07-08  Radek Doulik  <rodo@ximian.com>
17264
17265         * reflection.c (method_encode_code): use non-translated values to
17266         compute finally_start, this fixes exception handling on ppc, yay!
17267
17268         * decimal.h (struct signscale): fix endianess
17269
17270 2002-07-07  Radek Doulik  <rodo@ximian.com>
17271
17272         * reflection.c: swap box_val and not val
17273
17274 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17275
17276         * reflection.c, reflection.h: handle full assembly info in type name.
17277         Handle Type arguments when loading custom attributes.
17278         * icall.c: updated to use new mono_reflection_type_from_name () method.
17279
17280 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17281
17282         * loader.c:
17283         (method_from_memberref): also print assembly name when method not found.
17284
17285 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17286
17287         * icall.c:
17288         (ves_icall_TypeGetProperties): fixed bug #27473. 
17289
17290 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17291
17292         * reflection.c: display image name and token when cannot find the
17293         .ctor for an attribute.
17294
17295 2002-07-05  Martin Baulig  <martin@gnome.org>
17296
17297         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17298
17299 2002-07-04  Dick Porter  <dick@ximian.com>
17300
17301         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
17302         compile on mingw.  This will cause mingw builds to not wait for
17303         subthreads to terminate after the main thread does.  I've lodged a
17304         bug with the mingw developers for them to wrap OpenThread().
17305
17306 2002-07-03  Dick Porter  <dick@ximian.com>
17307
17308         * threads.c: Store thread IDs instead of handles, because
17309         GetCurrentThread() returns a pseudohandle and therefore stores
17310         useless values.  mono_thread_cleanup() continues checking the
17311         array of threads until it is empty, to cope with subthreads
17312         spawning new threads after the main thread has finished.
17313
17314         * profiler.h:
17315         * profiler.c:
17316         * profiler-private.h: Pass the thread ID to thread profiler
17317         functions, instead of a handle
17318
17319 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17320
17321         * verify.c: fixes to make it more usable.
17322         * pedump.c: added --verify code to verify IL code in an assembly.
17323
17324 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17325
17326         * reflection.c: turn errors into warnings to allow compiling corlib.
17327
17328 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17329
17330         * reflection.c: add special cases to compile corlib.
17331
17332 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17333
17334         * reflection.c: handle properties with only a set method.
17335
17336 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17337
17338         * opcodes.h: add enum with opcodes in opval order.
17339
17340 2002-07-01  Dick Porter  <dick@ximian.com>
17341         
17342         * object.h:
17343         * object.c (mono_runtime_run_main): Removed unneeded argument
17344
17345 2002-06-28  Martin Baulig  <martin@gnome.org>
17346
17347         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17348
17349 2002-06-27  Dick Porter  <dick@ximian.com>
17350
17351         * threads.c: Store the handle in both the parent thread and in the
17352         subthread, to minimise the time between starting a new thread and
17353         storing its ID.
17354
17355 2002-06-26  Dick Porter  <dick@ximian.com>
17356
17357         * appdomain.c (mono_runtime_cleanup): Close the socket library
17358         after all the threads have finished, not before
17359
17360 2002-06-26  Martin Baulig  <martin@gnome.org>
17361
17362         * debug-symfile.c (mono_debug_find_source_location): Added
17363         `guint32 *line_number' argument.  If it's not NULL, store the line number
17364         there and return the file name without the line number.
17365
17366 2002-06-25  Dick Porter  <dick@ximian.com>
17367
17368         * icall.c:
17369         * process.h:
17370         * process.c: Process forking and other support functions
17371
17372 2002-06-25  Dick Porter  <dick@ximian.com>
17373
17374         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
17375         things dont happen when the image is closed.
17376         (mono_image_lookup_resource): Walk the resource section looking
17377         for a particular entry
17378
17379         * cil-coff.h: PE resource section decoding
17380
17381 2002-06-25  Dick Porter  <dick@ximian.com>
17382         
17383         * assembly.h:
17384         * assembly.c: 
17385         (mono_assembly_foreach): Accessor functions to walk the list of
17386         loaded assemblies
17387         (mono_assembly_set_main):
17388         (mono_assembly_get_main): Process methods need to know which
17389         assembly is the "main" one
17390
17391         * object.c (mono_runtime_run_main): Record the main assembly
17392
17393         * debug-helpers.c: Fix typo
17394
17395 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
17396
17397         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
17398         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
17399
17400 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17401
17402         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
17403
17404 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
17405
17406         * image.c (do_mono_image_open): Initialize reference count,
17407         otherwise we leak the MonoImage.
17408
17409 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17410
17411         * reflection.c: small tweak to handle self-hosting.
17412
17413 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17414
17415         * reflection.c: fix type name parse code.
17416
17417 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17418
17419         * reflection.c: break out of the loop.
17420         * image.c: special case corlib.
17421
17422 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17423
17424         * reflection.c: add all the custom attrs at the end to ensure the
17425         ctors have been properly initialized when the attributes are defined
17426         in the current assembly.
17427
17428 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17429
17430         * reflection.c: handle correctly multiple-nested types.
17431
17432 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17433
17434         * row-indexes.h: fix typos.
17435         * reflection.c: adjust for typos and fix method_def_or_ref
17436         encoding in MethodImpl table.
17437
17438 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17439
17440         * reflection.c: fix entry point patching (thanks Serge!).
17441
17442 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
17443
17444         * verify.c: add check for System.Exception
17445
17446 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17447
17448         * image.c, class.c: minifix for code just c&p'ed.
17449         * reflection.c: warning fix.
17450         * object.h, loader.h, domain.c: load also StringBuilder.
17451
17452 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17453
17454         * marshal.h, marshal.c: some support code to handle complex marshaling.
17455
17456 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17457
17458         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
17459         Better signatures with vtable error dump.
17460
17461 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17462
17463         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17464
17465 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
17466
17467         * icall.c (ves_icall_Type_GetField): impl.
17468
17469 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17470
17471         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17472         to retrieve a marshal description blob for a field or param.
17473
17474 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17475
17476         * reflection.h, reflection.c: change order of nested type emission
17477         to avoid table corruption. The NestedTypes table is sorted.
17478         * icall.c: change order of GetConstructor results to workaround mcs bug.
17479
17480 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17481
17482         * reflection.h, reflection.c: handle field and param marshal
17483         information.
17484
17485 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17486
17487         * icall.c, marshal.c marshal.h: more Marshal class implementation.
17488
17489 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17490
17491         * reflection.c: fix call convention.
17492
17493 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17494
17495         * reflection.h, reflection.c: mono_image_get_memberref_token()
17496         takes a type instead of a class, now. Added
17497         mono_image_get_array_token() to create tokens for the special
17498         multi-dim array methods.
17499
17500 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17501
17502         * assembly.c: handle modules (no assembly table). Split
17503         loading references in its own function.
17504         * class.c: handle moduleref resolution scope.
17505         * image.c, image.h: cache module name in image.
17506
17507 2002-06-07  Martin Baulig  <martin@gnome.org>
17508
17509         * reflection.c (mono_image_get_type_info): Only add a class layout entry
17510         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17511
17512 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17513
17514         * icall.c: more signature fixes that used uint instead of int.
17515
17516 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17517
17518         * reflection.c: fixed signature of field refs.
17519
17520 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17521
17522         * class.c, reflection.c: handle typerefs of nested types
17523         (both on read and when writing files).
17524
17525 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17526
17527         * icall.c: fix method signatures that tried to workaround the previous
17528         typo, d'oh!
17529
17530 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17531
17532         * debug-helpers.c: fix typo.
17533
17534 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17535
17536         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
17537         rewrote the PE/COFF writing code (our programs are understood by the
17538         ms runtime, now).
17539
17540 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17541
17542         * gc.c, gc.h, icall.c: weakreference support.
17543
17544 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17545
17546         * Makefile.am, mono-config.c: use $(sysconfdir).
17547
17548 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17549
17550         * icall.c: changed default precision of Double.ToString() to 15.
17551         Fixed memory leak. Unified with Single.ToString.
17552
17553 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17554
17555         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
17556
17557 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17558
17559         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
17560         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
17561         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
17562         and myself.
17563
17564 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17565
17566         * debug-symfile.c, sysmath.c: yet more compilation fixes.
17567
17568 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17569
17570         * reflection.c, socket-io.c: more compilation fixes.
17571
17572 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17573
17574         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
17575         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
17576         unicode.c: warning and compiler compatibility fixes.
17577
17578 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17579
17580         * class.h, metadata.c: fixed warnings/compilation errors.
17581
17582 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17583
17584         * Makefile.am, mono-config.c, mono-config.h: configuration file
17585         support routines.
17586         * loader.c, loader.h: make Dll mapping configurable at runtime in the
17587         config file. Export methods to insert and lookup mappings.
17588
17589 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17590
17591         * reflection.c: handle types and boxed objects in custom attr
17592         constructors.
17593
17594 2002-05-30  Martin Baulig  <martin@gnome.org>
17595
17596         * debug-symfile.c
17597         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
17598
17599 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
17600
17601         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
17602         to lookup the implmap row for a P/Invoke method.
17603         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
17604         P/Invoke method from the runtime on an as needed basis.
17605
17606 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
17607
17608         * metadata.c (mono_metadata_parse_signature): impl.
17609
17610 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17611
17612         * class.c: handle .pack directive.
17613
17614 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17615
17616         * object.c: initialize static fields with RVA data.
17617
17618 2002-05-25  Martin Baulig  <martin@gnome.org>
17619
17620         * debug-symfile.c
17621         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
17622
17623 2002-05-24  Martin Baulig  <martin@gnome.org>
17624
17625         * debug-symfile.c
17626         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
17627         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
17628         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
17629
17630 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17631
17632         * object.c: special case string ctros in invoke.
17633         * gc.c: silly whitespace changes.
17634
17635 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
17636
17637         * threadpool.[ch]: impl. a threadpool that can
17638         be used by mint and mono.
17639
17640 2002-05-22  Martin Baulig  <martin@gnome.org>
17641
17642         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
17643         The first argument is now a `MonoReflectionModuleBuilder *', the return
17644         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
17645         `methods' field to get the method builder.  The `token' argument is the
17646         unfixed token.
17647
17648         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
17649         invalid characters instead of g_assert_not_reached()ing.  This seems
17650         to be the behaviour of mscorlib.
17651
17652 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
17653
17654         * object.c (mono_runtime_invoke_array): applied patch from Rachel
17655         Hestilow to fix bug #25104
17656
17657 2002-05-21  Martin Baulig  <martin@gnome.org>
17658
17659         * debug-symfile.c (mono_debug_find_source_location): New function.
17660         Looks up an IL offset in the line number table and returns the source
17661         location as a string.
17662
17663 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17664
17665         * icall.c:
17666         (mono_double_ToStringImpl): changed %f by %g until we have something
17667         better.
17668
17669 2002-05-21  Nick Drochak  <ndrochak@gol.com>
17670
17671         * icall.c : Use different name for Math.Pow's icall.  Needed to check
17672         parameters first in C#.
17673
17674 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17675
17676         * icall.c, reflection.h: added icall to get info about an event.
17677
17678 2002-05-20  Radek Doulik  <rodo@ximian.com>
17679
17680         * object.c (mono_value_box): don't use memcpy for boxing on BIG
17681         endian
17682         (mono_value_box): don't use memcpy for small sizes on
17683         architectures with unaligned access
17684
17685 2002-05-20  Martin Baulig  <martin@gnome.org>
17686
17687         * reflection.c (mono_reflection_setup_internal_class): Don't crash
17688         if `tb->parent == NULL'.
17689         (mono_reflection_create_internal_class): New function.  This is
17690         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
17691         for enum types.
17692
17693         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
17694         New interncall.
17695
17696 2002-05-19  Martin Baulig  <martin@gnome.org>
17697
17698         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
17699         argument to get the length, don't default to the array length.
17700
17701 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
17702
17703         * assembly.c (mono_assembly_setrootdir): New function used to
17704         override the MONO_ASSEMBLIES directory.
17705
17706 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17707
17708         * icall.c: ValueType_GetHashCode() initialize local var.
17709
17710 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17711
17712         * reflection.c: sort custom attributes table.
17713
17714 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17715
17716         * reflection.c: support named args in custom attributes (write support).
17717
17718 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17719
17720         * reflection.c: fix finally position calculation.
17721
17722 2002-05-15  Radek Doulik  <rodo@ximian.com>
17723
17724         * reflection.c: fixed endianess at many places
17725
17726         * icall.c (ves_icall_InitializeArray): comment out debug msg
17727
17728 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
17729
17730         * object.c (mono_unhandled_exception): new function to handle
17731         unhandled exceptions.
17732         (mono_unhandled_exception): call the UnhandledException event.
17733         (mono_runtime_delegate_invoke): impl.
17734
17735 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
17736
17737         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
17738         returns the RVA, not the direct pointer to the data. Handle the case
17739         when the class size is fixed.
17740
17741 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17742
17743         * reflection.c: fix some endianess issues.
17744
17745 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
17746
17747         * object.c (mono_runtime_invoke): is now able to catch exceptions.
17748
17749         * threads.c (mono_thread_init): added a callback which is invoked
17750         at thread start.
17751
17752 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17753         
17754         * icall.c: make GetHashCode return non-negative values.
17755
17756 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
17757
17758         * object.c, icall.c, gc.c: revert to address-based hashcode.
17759
17760 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
17761
17762         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
17763
17764 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17765
17766         * icall.c, class.c: special case <Module>.
17767
17768 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
17769
17770         * icall.c: fix bug in GetNow().
17771
17772 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
17773
17774         * object.c (mono_runtime_class_init): make sure that we call all
17775         static class constructors.
17776
17777 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17778
17779         * reflection.c: sort methodsemantics table.
17780
17781 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17782
17783         * reflection.h, reflection.c: honour init locals setting.
17784
17785 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
17786
17787         * icall.c: copied Double ToStringImpl for Single ToStringImpl
17788
17789 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17790
17791         * reflection.c: support ContructorBuilders in attribute blob creation.
17792
17793 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17794
17795         * reflection.c: some changes to build a binary that can be run
17796         directly in windows.
17797
17798 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17799
17800         * loader.c: print a big message when an icall can't be found.
17801
17802 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17803
17804         * string-icalls.c: fix bug 24248.
17805
17806 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17807
17808         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
17809         icall.c, reflection.h: separate assembly loading by pathname and by
17810         assembly name. Use the MONO_PATH env var to search for assemblies.
17811
17812 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17813
17814         * assembly.c, image.h: add some support for assemblies
17815         with multiple modules.
17816         * class.c, class.h: export mono_class_from_typeref().
17817         * loader.c: remove duplicated code and use mono_class_from_typeref(),
17818         instead.
17819
17820 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17821
17822         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
17823         documentation says (the ECMA one is correct).
17824
17825 2002-05-02  Dick Porter  <dick@ximian.com>
17826
17827         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
17828         Don't name the synchronisation mutex.
17829
17830 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
17831
17832         * rand.c
17833         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
17834         Make the prototypes match.
17835         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
17836         Same.
17837
17838         * icall.c
17839         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
17840         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
17841         all systems have tm.tm_zone, so use strftime() with %Z to print
17842         the timezone abreviation into a temp string.
17843
17844         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
17845         rather than mono_array_addr() on a MonoString on Big Endian
17846         machines.
17847
17848 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
17849
17850         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
17851         fix bug 24041
17852
17853 2002-04-30  Dick Porter  <dick@ximian.com>
17854
17855         * socket-io.c: Cope with SOCKET being an integer rather than a
17856         pointer now.
17857
17858         * threads.c: Added Thread_free_internal, to deal with thread
17859         handle cleanup.  Moved calls to handle_store() and handle_remove()
17860         to start_wrapper(), so each can only be called once.  Allocate
17861         synchronisation blocks with GC_malloc(), and use GC finalisation
17862         to close the handles.
17863
17864         * icall.c: added System.Threading.Thread::Thread_free_internal
17865
17866 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17867
17868         * icall.c: support Environment.Exit, CommandLineArgs().
17869
17870 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17871
17872         * object.c, object.h: added mono_runtime_run_main () and
17873         mono_runtime_get_main_args () for use in System.Environment.
17874
17875 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17876
17877         * gc.c: fix thinko, enable actual finalization since the jit is now
17878         fixed.
17879
17880 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17881
17882         * gc.c, object.c: take into account that an object may be offset wrt the address
17883         returned by GC_malloc().
17884
17885 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
17886
17887         * image.c: handle files without entries in the assembly table (modules).
17888
17889 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
17890
17891         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
17892         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
17893         allowed to be null when it's System.Object class setup.
17894
17895 2002-04-27  Martin Baulig  <martin@gnome.org>
17896
17897         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
17898         if `tb->parent == NULL' rather than crashing.
17899
17900 2002-04-28  Nick Drochak  <ndrochak@gol.com>
17901
17902         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
17903         calling acos() where asin() should have been called.
17904
17905 2002-04-26  Martin Baulig  <martin@gnome.org>
17906
17907         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
17908         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
17909         there's a subdirectory called `System', but we don't want to read that
17910         subdirectory as an assembly.
17911
17912 2002-04-25  Martin Baulig  <martin@gnome.org>
17913
17914         * debug-symfile.c: Reflect latest MonoString changes.
17915
17916 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17917
17918         * rand.c, rand.h: instance method icalls need to have an explicit
17919         this pointer as first argument in the C implementation.
17920
17921 2002-04-25  Nick Drochak <ndrochak@gol.com>
17922
17923         * icall.c: Fix typo in map for GetNonZeroBytes
17924
17925 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17926
17927         * string-icalls.c : String does now passes unit tests without any 
17928         errors, the following changes has been made:
17929         
17930         Implemented replace methods.
17931         Renaming of methods to (try) follow the standard.
17932         Fixed compare ordinal
17933         Made all memory allocated directly to function instead of via icall function.
17934         Small performance fix in is_in_array function
17935                         
17936  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
17937
17938         c (mono_string_Internal_ctor_charp_int_int):
17939         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
17940         sindex < 0, throw ArgumentOutOfRangeException instead of
17941         ArgumentNullException.
17942
17943         Added new check for length == 0, however
17944         I need to make it return String.Empty from the C code.
17945         
17946         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
17947         that calculate the length for us here.
17948         
17949         (mono_string_Internal_ctor_sbytep_int_int): Replaced
17950         mono_string_new_utf16 with mono_string_new, since value is utf8.
17951
17952 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17953
17954         * object.c: register the object for finalization if needed.
17955         Allocate one more char in the string for the terminating 0 char.
17956
17957 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17958
17959         * class.c, class.h, image.c: check if a type implemenst a destructor.
17960         Use the proper key for array class lookups.
17961         * icall.c: register the icalls in the System.GC class.
17962         * gc.c, gc.h: GC-related functions and icalls.
17963
17964 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17965
17966         * icall.c:
17967         * socket-io.c:
17968         * unicode.c: free some strings gotten from mono_string_to_utf8 and
17969         changed a couple of free () by g_free ().
17970
17971         * decimal.c: one-liner in the comments for decimal2string ().
17972
17973 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17974
17975         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
17976
17977 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
17978
17979         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
17980         * object.c (mono_runtime_invoke_array) : handle null in params
17981
17982 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17983
17984         * string-icalls.c: fixed bug in split (one off bug)
17985
17986 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17987
17988         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
17989         * icalls.c: added String::Equals as internal method
17990
17991 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
17992
17993         * threads.c: fixed bug in the double interlocked functions
17994
17995 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
17996
17997         * threads.c: implemented all of the new interlocked icalls.
17998         * string-icalls.c: fix a bug in insert.
17999         * icalls.c: added the icalls for interlocked, removed old string functions.
18000         
18001 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18002
18003         * loader.c: fix off-by-one error when reading argument names.
18004
18005 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18006
18007         * profiler.c: win32 counter implementation (untested).
18008         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
18009         (the latter needs testing and more complete impl. from win32 folks).
18010
18011 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
18012
18013         * object.c: mono_array_new_full workaround mono_array_class_get
18014         problem.
18015
18016 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18017
18018         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
18019         * object.h (mono_string_chars): Changed casting type.
18020
18021 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18022
18023         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
18024                            method signatures to use gunichar2 instead of gint16.
18025
18026 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
18027
18028         * object.h, object.c: domain-specific versions of mono_object_new and
18029         mono_array_new.
18030
18031 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
18032
18033         * object.c: changed String layout
18034
18035         * string-icalls.c (mono_string_Internal_ctor_chara): added
18036         internal string constructors.
18037
18038 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
18039
18040         * threads.c: pass 'this' to the thread start routine.
18041
18042 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18043
18044         * string-icalls.c: fix IndexOf and LastIndexOf. Now
18045         InternalCompareStr don't call twice mono_string_cmp_char for the last
18046         character. Improved performance in mono_string_cmp_char.
18047
18048 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18049
18050         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
18051         code into its own library: libmonoruntime.
18052
18053 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
18054
18055         * object.h, object.c: changed array format so that szarrays do not
18056         require a bounds structure.
18057         * icall.c, appdomain.c: support for new szarray format.
18058
18059 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
18060
18061         * metadata.c: compare also the retuns type when comparing signatures:
18062         we didn't do this as an optimization since really overloaded methods
18063         must differ also in the arguments, but this doesn't work with
18064         low-level IL code (or when using explicit conversion operators: see
18065         bug#23498 for an example).
18066
18067 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18068
18069         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
18070
18071 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18072
18073         * icall.c: make MonoType::GetElementType its own icall.
18074
18075 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18076
18077         * icall.c: remove MonoMethod_get_Name().
18078         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
18079         object.
18080
18081 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18082
18083         * string-icalls.c: optimized a few methods.
18084
18085 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18086
18087         * icall.c: added all new string internal calls
18088         * string-icalls.c: added, new string internal call implementation.
18089         * object.c: added mono_string_new_size for allocating a string a size
18090
18091 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
18092
18093         * object.c (mono_object_isinst): use the same code as in the
18094         optimized x86 version.
18095
18096 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18097
18098         * profiler.c: TSC-based timer code (faster and more accurate).
18099         Not hooked up in configure, yet (set USE_X86TSC to 1).
18100
18101 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
18102
18103         * profiler.c, profiler.h: track time spent compiling methods.
18104         * threads.c: track thread creation/destruction.
18105
18106 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
18107
18108         * profiler.c, profiler.h, profiler-private.h: profiling interface
18109         and sample implementation. Moved here so that it can be used also by
18110         the jit.
18111
18112 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
18113
18114         * reflection.c, reflection.h: keep types and other handles separate in
18115         the hash tables for referred tokens. Add guid for modules.
18116
18117 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18118
18119         * assembly.c: fix bugs found with valgrind.
18120         * metadata.h, metadata.c: added mono_metadata_guid_heap().
18121
18122 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
18123
18124         * threads: added icall support for getting current domain for
18125                    the thread.
18126  
18127 2002-04-13  Martin Baulig  <martin@gnome.org>
18128
18129         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
18130         (MonoDebugVarInfo): Added `index' field for register based addresses.
18131         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
18132         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
18133         `MonoDebugVarInfo *params' and `guint32 this_offset' with
18134         `MonoDebugVarInfo *this_var'.
18135
18136         * debug-symfile.c (relocate_variable): New static function to write
18137         a location description for a local variable or method parameter.
18138
18139 2002-04-12  Martin Baulig  <martin@gnome.org>
18140
18141         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
18142         stack offset and begin/end scope address of a local variable.
18143         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
18144         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
18145         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
18146
18147         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
18148         Added new relocation types for start/end scope of a local variable.
18149
18150 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18151
18152         * object.h: add mono_object_domain() macro.
18153         * reflection.c: handle typespecs.
18154         * icall.c: MonoMethod::get_Name() implementation.
18155
18156 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18157
18158         * icall.c: String::GetHashCode() icall implementation.
18159
18160 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18161
18162         * icall.c: String::IndexOfAny icall.
18163         * object.c, object.h: make array->max_length more useful.
18164         Intrduced mono_object_class() and mono_string_length() macros.
18165
18166 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18167
18168         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
18169         instead of g_unichar_isdigit.
18170
18171 2002-04-11  Nick Drochak  <ndrochak@gol.com>
18172
18173         * icall.c: Implement a simple Double.ToString().
18174
18175 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18176
18177         * appdomain.h: only io-layer.h is supposed to be included.
18178         * icall.c: explicitly import environ. Fix warning.
18179
18180 2002-04-10  Nick Drochak  <ndrochak@gol.com>
18181
18182         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
18183                 return true even if it's not Daylight Savings time.
18184                 Only return false for the case where the function isn't
18185                 implemented for a plaform (read Windows).
18186
18187 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18188
18189         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
18190         data with a mutex.
18191
18192 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
18193
18194         * mempool.c (mono_mempool_alloc): only use g_malloc when
18195         absolutely necessary.
18196
18197 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
18198
18199         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
18200
18201         * class.c (mono_class_vtable): use domain mempool to allocate vtable
18202         (mono_class_proxy_vtable): use domain mempool
18203
18204 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18205
18206         * appdomain.h, appdomain.c: split initialization that requires the
18207         execution engine support into mono_runtime_init().
18208
18209 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
18210
18211         * class.c (mono_class_init): don't include vtable inside MonoClass
18212         to save some memory, gather some statistics.
18213         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
18214
18215 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18216
18217         * icall.c: internalcall implementation for ValueType.Equals().
18218
18219 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
18220
18221         * object.c (mono_message_init): moved 
18222         (mono_runtime_exec_main): new arch. independent impl.
18223         (mono_runtime_invoke_array): new method - like
18224         mono_runtime_invoke, but you can pass an array of objects.
18225         (mono_remoting_invoke): new arch. independent impl.
18226         (mono_message_invoke): new arch. independent impl.
18227         (mono_runtime_class_init): new arch. independent impl.
18228         (mono_runtime_object_init): new arch. independent impl.
18229
18230 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18231
18232         * metadata.c, object.c, reflection.c: documented the exported
18233         functions.
18234
18235 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
18236
18237         * icall.c: simpler code to pass the assembly builder data to corlib.
18238         Implement GetNestedTypes() internalcall.
18239
18240 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18241
18242         * class.c: warn if a type can't be loaded.
18243
18244 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
18245
18246         * image.h: typedef MonoImageOpenStatus
18247         * types.h: removed unused file
18248         
18249 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
18250
18251         * icall.c: Enum_ToObject accepts enum value arguments.
18252
18253 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18254
18255         * class.c: move initialization of properties, events and nested
18256         classes, so that they happen for interfaces, too.
18257
18258 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18259
18260         * icall.c: cleanup some ugly casts in Array_SetValue*.
18261
18262 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18263
18264         * icall.c: the values array fro enums is of the correct type, now.
18265         Implement (correctly) getFullName instead of assQualifiedName for
18266         MonoType.
18267         * reflection.h, reflection.c: added mono_type_get_name ().
18268
18269 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18270
18271         * assembly.c, image.h: for each MonoImage, record from wich assembly
18272         it was loaded.
18273         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
18274         Make Type.Assembly work.
18275
18276 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
18277
18278         * debug-symfile.h: use char* instead of gpointer to avoid
18279         unnecessary casts.
18280
18281         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
18282
18283         * icall.c (ves_icall_InternalExecute): impl. FielSetter
18284         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
18285
18286 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
18287
18288         * icall.c (mono_message_init): impl. (code cleanup)
18289         (ves_icall_InternalExecute): impl. FieldGetter
18290
18291         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
18292         defined we call all (non-static)methods through the vtable. 
18293
18294 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
18295
18296         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
18297         finalizer even though the memory is still referenced (and the chunk of
18298         memory is not freed).
18299
18300 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18301
18302         * assembly.c: fix brokeness.
18303
18304 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
18305
18306         * class.c: kill some warnings. Check explicit interface method
18307         implementation also without considering the namespace.
18308         Load also literal strings in static class data.
18309
18310 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
18311
18312         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
18313         (default_assembly_name_resolver): Make the resolver take the
18314         "base" directory where the assembly was originally defined, so we
18315         can load DLLs that are in the same directory as the assembly that
18316         is being referenced.
18317
18318 2002-03-28  Dick Porter  <dick@ximian.com>
18319
18320         * file-io.h: 
18321         * file-io.c:
18322         * socket-io.c: 
18323         * unicode.h: 
18324         * unicode.c: Warning cleanups
18325
18326 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
18327
18328         * object.h, reflection.h: use the correct type instead of MonoObject.
18329
18330 2002-03-28  Martin Baulig  <martin@gnome.org>
18331
18332         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
18333         (mono_debug_update_symbol_file): Initialize classes if necessary.
18334
18335 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18336
18337         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
18338         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
18339
18340 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
18341
18342         * assembly.h: fix function prototype.
18343         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
18344         * mono-endian.h: use const cast.
18345
18346 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
18347
18348         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
18349
18350 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18351
18352         * loader.c: don't assert when a typeref can't be loaded, give
18353         a chance to the runtime to trow an exception instead.
18354         * loader.h: fix warning.
18355
18356 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
18357
18358         * class.c (mono_class_proxy_vtable): added proxy support
18359
18360 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
18361
18362         * icall.c: removed last of PAL calls, added System.Environment
18363         * file-io.h, file-io.c: MonoIO implementation
18364         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
18365
18366 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18367
18368         * appdomain.c: do not use the byte marker in ldstr table lookup.
18369         * debug-helpers.c: allow two ':' to separate class and method name.
18370         * object.c: allocate arrays bounds with the GC, too.
18371         * verify: add a few more checks.
18372
18373 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
18374
18375         * reflection.c: output also literal strings. Allocate parameter data
18376         with GC_malloc() (thanks, Martin, for catching this!).
18377
18378 2002-03-26  Martin Baulig  <martin@gnome.org>
18379
18380         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
18381         include the `this' offset in the `param_offsets'.
18382
18383 2002-03-25  Martin Baulig  <martin@gnome.org>
18384
18385         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
18386         mono_debug_get_class() function to get the classes. Added new
18387         relocation types for arrays and strings.
18388         (mono_debug_get_class): New static function to search in all
18389         referenced assemblies for a metadata token.
18390
18391         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
18392
18393 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18394
18395         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
18396         hold gc-allocated objects. Make the string heap a stream like the
18397         others. Removed duplicated code when writing stream info.
18398         Added asserts to catch possible buffer overflows. Set the sorted map
18399         for tables that need sorting. Added some documentation.
18400
18401 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
18402
18403         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
18404         for interned strings and vtables.
18405
18406 2002-03-24  Martin Baulig  <martin@gnome.org>
18407
18408         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
18409         it in the array since it was created with g_slist_prepend().
18410
18411 2002-03-24  Martin Baulig  <martin@gnome.org>
18412
18413         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
18414         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
18415         (mono_debug_method_from_token): Renamed to
18416         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
18417         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
18418
18419         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
18420         relocation types.
18421
18422         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
18423
18424 2002-03-24  Martin Baulig  <martin@gnome.org>
18425
18426         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
18427         (mono_debug_method_from_token): New func.
18428
18429         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
18430         New interncall, calls mono_debug_local_type_from_signature().
18431         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
18432         calls mono_debug_method_from_token().
18433
18434 2002-03-23  Martin Baulig  <martin@gnome.org>
18435
18436         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
18437         specifies the number of bytes to be converted, not the array size.
18438         Return the number of chars, not the number of bytes.
18439         (ves_icall_iconv_get_chars): The `byteCount' argument
18440         specifies the number of bytes to be converted, not the array size.
18441
18442 2002-03-23  Martin Baulig  <martin@gnome.org>
18443
18444         * reflection.h (MonoReflectionSigHelper): New type.
18445
18446         * reflection.c (mono_reflection_sighelper_get_signature_local),
18447         (mono_reflection_sighelper_get_signature_local): New functions.
18448
18449         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
18450         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
18451         interncalls.
18452
18453 2002-03-23  Martin Baulig  <martin@gnome.org>
18454
18455         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
18456         is_writeable is set.
18457         (mono_raw_buffer_update): New function to write the modified map
18458         back to disk.
18459
18460         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18461
18462         * debug-symfile.c (mono_debug_update_symbol_file): Call
18463         mono_raw_buffer_update() when done writing.
18464
18465 2002-03-23  Martin Baulig  <martin@gnome.org>
18466
18467         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18468
18469         * debug-symfile.c: Added support for arguments and local variables.
18470
18471 2002-03-23  Dick Porter  <dick@ximian.com>
18472
18473         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18474         protected by ifdefs, hence breaking the w32 build.
18475
18476 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18477
18478         * object.c: implement is_interned() the right way.
18479
18480 2002-03-21  Martin Baulig  <martin@gnome.org>
18481
18482         * debug-symfile.[ch]: New files to handle debugging information
18483         files. There's also support to dynamically update these symbol
18484         files to include machine dependent information.
18485
18486 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
18487
18488         * threads.c (mono_thread_create): new function to create thread
18489         from C
18490
18491 2002-03-20  Martin Baulig  <martin@gnome.org>
18492
18493         * icall.c (ves_icall_InternalInvoke): Create a new object if the
18494         method is a constructor.
18495         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18496         points to ves_icall_InternalInvoke().
18497
18498 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
18499
18500         * file-io.c: Flush shouldn't throw exceptions.
18501
18502 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
18503
18504         * file-io.c: FileStream flush support; FileSetLength now
18505         restores file pointer.
18506
18507 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18508
18509         * class.c: set image for pointer classes.
18510
18511 2002/03/19  Nick Drochak <ndrochak@gol.com>
18512
18513         * sysmath.c: Forgot one.
18514
18515 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
18516
18517         * sysmath.c: Avoid redefining existing names.
18518
18519 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
18520
18521         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
18522         handled by runtime as icall rather than dllimport from libm.so
18523         * file-io.c, file-io.h: fixed handle argument type.
18524
18525 2002-03-18  Dick Porter  <dick@ximian.com>
18526
18527         * reflection.c (mono_image_get_type_info): rename interface to
18528         iface, because of "#define interface struct" on windows.
18529
18530 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
18531
18532         * class.c, class.h: rename and export mono_ptr_class_get().
18533         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
18534         * reflection.c, reflection.h, icall.c: better/saner type name
18535         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
18536         method signatures.
18537
18538 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
18539
18540         * class.c (mono_class_init): removed hardcoded GHC_SLOT
18541
18542         * icall.c (ves_icall_InternalInvoke): impl.
18543
18544 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18545
18546         * reflection.c: output the interface map table, too.
18547
18548 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18549
18550         * class.c (class_compute_field_layout): separate computation of 
18551         static field layout
18552
18553 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
18554
18555         * icall.c: added System.Buffer support.
18556         * file-io.c: moved file icalls from PAL to FileStream.
18557
18558 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
18559
18560         * icall.c (ves_icall_System_Object_GetHashCode): impl.
18561
18562 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
18563
18564         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
18565
18566 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18567
18568         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
18569
18570 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18571
18572         * debug-helpers.{c,h}: moved here from monograph some useful functions
18573         to locate a method by name/signature in a class or image. Included
18574         also a small and flexible IL disassembler.
18575
18576 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18577
18578         * reflection.c: fixup tokens in methods with small header size, too.
18579
18580 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
18581
18582         * object.c (mono_string_to_utf8): remove assert(!error), instead
18583         print a warning. 
18584
18585 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
18586
18587         * icall.c: update to the new mono_Array_class_get interface.
18588
18589 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18590
18591         * appdomain.c, object.c: Boehm-GC enable.
18592         * icall.c: make get_data_chunk() support split data requests.
18593         Ensure a class is initialized in more cases. Return only the first
18594         property found in GetProperties() or the compiler gets confused. 
18595         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
18596         * reflection.h, reflection.c: add fixup mechanism for field and method
18597         tokens. Initialize assembly->typeref in a single place. Output
18598         properties after events. Support custom attributes for events, too.
18599         Typo fix for paramter custom attrs.
18600
18601 2002-03-07  Martin Baulig  <martin@gnome.org>
18602
18603         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
18604
18605 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
18606
18607         * class.c (mono_array_class_get): fix. for multi. dim. arrays
18608
18609 2002-03-06  Martin Baulig  <martin@gnome.org>
18610
18611         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
18612         non-zero lower bounds. See testcases #F10-#F13.
18613
18614 2002-03-05  Martin Baulig  <martin@gnome.org>
18615
18616         * exception.c (mono_get_exception_argument_out_of_range): New exception.
18617
18618         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
18619         ves_icall_System_Array_GetValue(), only calculate the absolute array position
18620         here.
18621         (ves_icall_System_Array_SetValue): Likewise.
18622         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
18623         as argument and does the actual work. This function is used when copying a
18624         multi-dimensional array.
18625         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
18626         now do all the widening conversions of value types.
18627         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
18628
18629 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18630
18631         * class.c: remove some magic numbers and use the smbolic names,
18632         instead. Added init_events() to load event info at class init time.
18633         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
18634         and mono_metadata_methods_from_event().
18635         * reflection.h, reflection.c: added support for writing out the evnets
18636         related information.
18637
18638 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18639
18640         * reflection.h, icall.c: use a different method (GetInterfaces)
18641         to gather interface info and add isbyref, isprimitive and
18642         ispointer to the ves_icall_get_type_info() return value.
18643
18644 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
18645
18646         * class.h: stared adding support for events.
18647         * icall.c: split find_members implementation. Added debug icall to get
18648         the address of an object.
18649         * reflection.c: handle TypeBuilders in mono_type_get_object().
18650
18651 2002-03-01  Martin Baulig  <martin@gnome.org>
18652
18653         * icall.c (ves_icall_System_Array_GetLength): This must throw an
18654         ArgumentOutOfRangeException(), not an ArgumentException().
18655         (ves_icall_System_Array_GetLowerBound): Likewise.
18656         (ves_icall_System_Array_GetValue): Improved argument checking.
18657         (ves_icall_System_Array_SetValue): Improved argument checking.
18658
18659 2002-03-01  Martin Baulig  <martin@gnome.org>
18660
18661         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
18662         called with invalid arguments rather than just dying with g_assert().
18663         (ves_icall_System_Array_SetValue): Likewise.
18664         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
18665         raise a NotImplementedException instead.
18666         (ves_icall_System_Array_GetLength): Added argument checking.
18667         (ves_icall_System_Array_GetLowerBound): Added argument checking.
18668
18669 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
18670
18671         * object.h (mono_assert): new macros mono_assert and
18672         mono_assert_not_reached
18673
18674 2002-02-28  Martin Baulig  <martin@gnome.org>
18675
18676         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
18677         and "System::String::IsInterned" to "System::String::_IsInterned".
18678
18679 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
18680
18681         * icall.c: remove hacks for typebuilder. Added icall to create a
18682         modified type from a tybebuilder.
18683         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
18684         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
18685         to create a backing MonoClass for a TypeBuilder.
18686
18687 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18688
18689         * class.c, class.h: more refactoring of class init.
18690         Export mono_class_setup_mono_type() and mono_class_setup_parent().
18691
18692 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
18693
18694         * marshal.c, marshal.h: start of marshaling interface.
18695
18696 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18697
18698         * icall.c: fix order in assembly qualified name icall.
18699
18700 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18701
18702         * class.c: do not free str, since we store it in the hash table.
18703         * reflection.h: add label field to MonoILExceptionInfo.
18704         * reflection.c: handle references to more than one assembly. Handle
18705         case when there isn't a module created in the assembly.
18706
18707 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18708
18709         * class.c: Fix typo. Start refactoring of class init code.
18710
18711 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18712
18713         * appdomain.c: exit with 1 on error.
18714         * class.c: we already have the name in MonoClassField.
18715         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
18716         MonoStreamHeader instead of an offset of image->raw_metadata.
18717
18718 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
18719
18720         * appdomain.c (mono_init): Be even more descriptive about the error.
18721
18722 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
18723
18724         * appdomain.c: give the user an informative message when corlib can't
18725         be loaded.
18726
18727 2002-02-26  Martin Baulig  <martin@gnome.org>
18728
18729         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
18730         New icall to get the time zone data.
18731
18732 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18733
18734         * reflection.c: set virtual and raw size of section correctly.
18735         * threads.c: transfer domain information to newly created threads.
18736
18737 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18738
18739         * class.c: when instancing a class in a domain, load the default
18740         vaules for static fields from the constant table. Fix System.Enum to
18741         not be an enum.
18742         * icall.c: implement Object::GetType() internalcall. Implemented
18743         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
18744         Fixed checking of binding flags in find_members().
18745         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
18746         * reflection.c: handle enumerations when writing to the constant
18747         table. Use a different object cache for types.
18748
18749
18750 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
18751
18752         * object.c (mono_object_isinst): fix for arrays
18753
18754         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
18755
18756 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18757
18758         * object.c: don't use mprotect ()  and fix intern pool hash table
18759         lookup for big endian systems.
18760
18761 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18762
18763         * icall.c: change type_is_subtype_of () signature.
18764
18765 2002-02-21  Mark Crichton  <crichton@gimp.org>
18766
18767         * rand.c, rand.h: Added random number generator for
18768         System.Security.Cryptography classes.
18769
18770         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
18771
18772         * icall.c: Added System.Security.Cryptography calls.
18773
18774 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
18775
18776         * class.c, icall.c, metadata.c: better support for pointer types.
18777         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
18778         * reflection.c: Add support for getting custom attrs for properties
18779         and simplify some code.
18780
18781 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
18782
18783         * icall.c: change getToken () and add custom attribute GetBlob()helper
18784         method.
18785         * reflection.h: add custom attrs array to the reflection builder structures.
18786         * reflection.c: encode and emit custom attributes for all the relevant
18787         reflection objects. Cache fieldref and methodref tokens. Change
18788         mono_image_create_token() interface to take a MonoDynamicAssembly.
18789         More complete custom attributes decoder. Load custom attributes for
18790         Assembly, Field, Method and Constructor objects, too. Make the
18791         returned array an Attribute[] one, not object[]. Added
18792         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
18793         custom attribute constructor.
18794
18795 2002-02-20  Dick Porter  <dick@ximian.com>
18796
18797         * icall.c:
18798         * rawbuffer.c:
18799         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
18800         problem code out for now).
18801
18802 2002-02-19  Radek Doulik  <rodo@ximian.com>
18803
18804         * object.c (mono_ldstr): use hash table to avoid multiple swapping
18805
18806 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
18807
18808         * icall.c: register the GetCustomAttributes method.
18809         * object.c, object.h: add mono_string_new_len ().
18810         * reflection.h, reflection.c: added mono_runtime_invoke(),
18811         mono_install_runtime_invoke(). Added
18812         mono_reflection_get_custom_attrs () to load custom attributes and
18813         create the attribute objects.
18814
18815 2002-02-19  Dick Porter  <dick@ximian.com>
18816         * threads-dummy-types.c:
18817         * threads-dummy-types.h:
18818         * threads-dummy.c:
18819         * threads-dummy.h:
18820         * threads-pthread-types.c:
18821         * threads-pthread-types.h:
18822         * threads-pthread.c:
18823         * threads-pthread.h:  Deleted obsolete files
18824
18825 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
18826
18827         * class.c (mono_class_vtable): runtime init the class when we
18828         allocate static class data.
18829
18830         * icall.c (ves_icall_System_Array_SetValue): check for null values.
18831
18832         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
18833         and String - but we will need generic marshalling support in the
18834         future. 
18835         (mono_init): set the domain name in a ms compatible way
18836
18837         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
18838         String[].
18839
18840 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
18841
18842         * object.c (mono_array_clone): use alloca() instead of g_malloc  
18843         for sizes
18844
18845         * appdomain.c (mono_domain_unload): impl.
18846
18847 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18848
18849         * appdomain.c, object.c: fix intern pool implementation.
18850         * class.c: fix alignment code.
18851
18852 2002-02-16  Radek Doulik  <rodo@ximian.com>
18853
18854         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
18855         and s2 > s1, just copy lower bytes to be compatible with little
18856         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
18857         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
18858
18859         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
18860         force big_endian to be 1 for big endian machines 
18861         (ves_icall_iconv_new_decoder): ditto
18862
18863 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
18864
18865         * socket-io.c (convert_sockopt_level_and_name): If the system
18866         doesn't define SOL_IP or SOL_TCP, get them by hand using
18867         getprotobyname() and caching the values (because this could be a
18868         slow operation).
18869         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
18870         Use the appropriate struct when the system does support it. Ie,
18871         not all systems have struct ip_mreqn so use struct ip_mreq when
18872         appropriate.
18873
18874 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
18875
18876         * reflection.c: handle finally clauses.
18877
18878 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
18879
18880         * socket-io.c: use g_snprintf() instead of snprintf.
18881
18882 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18883
18884         * reflection.c (mono_param_get_objects): Cast second argument to
18885         mono_method_get_param_names to a const char** to silence the
18886         compiler warning.
18887
18888         * appdomain.c (mono_domain_assembly_open): Put parens around the
18889         truth statement in the for-loop.
18890
18891         * unicode.c (iconv_convert): Got rid of a compiler warning about
18892         int i being unused when the system has a new iconv.
18893         (iconv_get_length): Same.
18894
18895         * image.c (load_class_names): Cast the second argument to
18896         g_hash_table_insert() to char* to hush compiler warnings about the
18897         arg being a const.
18898         (mono_image_open): Same here.
18899
18900         * socket-io.c: Don't conditionally include sys/filio.h or
18901         sys/sockio.h here anymore since we now get them from
18902         io-layer/io-layer.h
18903         (inet_pton): If the system doesn't support inet_aton, implement
18904         using inet_addr and also #define INADDR_NONE if it isn't defined
18905         by the system.
18906
18907 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
18908
18909         * metadata.c, metadata.h: added function to get packing and size info
18910         of a typedef.
18911         * reflection.h, reflection.c: handle field RVA data. Save info about
18912         the table layout if needed. Assign typedef indexes to all the types
18913         before dumping the info about them to avoid forward reference problems.
18914
18915 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
18916
18917         * socket-io.c (convert_sockopt_level_and_name): ifdef
18918         SO_ACCEPTCONN because it is not defined on my system (old debian)
18919
18920 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
18921
18922         * opcode.c: use stddef.h to get NULL.
18923
18924 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
18925
18926         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
18927         for FIONBIO, FIONREAD and SIOCATMARK.
18928         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
18929         define INADDR_NONE and besides, inet_addr() is deprecated and
18930         should not be used. Use inet_pton() instead - it also has the
18931         added bonus that it can easily handle IPv6 addresses as well.
18932         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
18933
18934 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18935
18936         * decimal.c: remove _MSC_VER conditional.
18937
18938 2002-02-13  Dick Porter  <dick@ximian.com>
18939
18940         * socket-io.c: 
18941         * icall.c: Internal calls for Blocking, Select, Shutdown,
18942         GetSocketOption and SetSocketOption
18943
18944 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18945
18946         * assembly.cs: better resolver: use it instead of some kludgy
18947         code.
18948
18949 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
18950
18951         * reflection.c: the best way to speed-up the compiler is to avoid
18952         infinite loops.
18953
18954 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
18955
18956         * class.c (mono_class_vtable): changed the object layout
18957         (obj->vtable->class). 
18958         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
18959
18960 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18961
18962         * assembly.c: look for assemblies in the assembly dir, too.
18963
18964 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18965
18966         * class.c: fix thinko in mono_class_from_type().
18967
18968 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
18969
18970         * exception.h, exception.c: added TypeLoadException.
18971         * object.h, object.c: added mono_array_clone ().
18972         * icall.c: handle throwOnError in AssemblyGetType().
18973         Added Array.Clone().
18974         * opcode.h, opcode.c: use a single value for the opcode val.
18975         Compile fix for non-gcc compilers.
18976
18977 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
18978
18979         * opcodes.c, opcodes.h: export interesting info about opcodes.
18980
18981 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
18982
18983         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
18984         icalls. 
18985
18986         * class.c (class_compute_field_layout): set element_class for enums
18987         (mono_class_create_from_typedef): set element_class for normal classes
18988
18989         * icall.c (ves_icall_System_Enum_get_value): impl.
18990
18991         * class.c (mono_class_create_from_typedef): do not set valuetype
18992         flag for System.ValueType and System.Enum
18993
18994 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
18995
18996         * unicode.c (iconv_convert): fix big endian problem.
18997
18998 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
18999
19000         * class.c: add asserts if we are ever going to scribble over memory.
19001         * socket-io.c: not all systems have AF_IRDA defined.
19002
19003 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
19004
19005         * class.c (class_compute_field_layout): do not consider static
19006         fields to compute alignment
19007
19008 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
19009
19010         * appdomain.c (mono_appdomain_get): impl.
19011         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
19012
19013 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19014
19015         * icall.c: ignore "file://" prefix when loading an assembly.
19016
19017 2002-01-23  Dick Porter  <dick@ximian.com>
19018
19019         * socket-io.c:
19020         * icall.c:
19021         * Makefile.am: Added socket support
19022
19023 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
19024
19025         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
19026         code back.  This should return the assemblies that are loaded by
19027         the runtime on behalf of an application domain. 
19028
19029         The current implementation is still broken, it just returns every
19030         assembly loaded, but until we get real applications domain this
19031         will do.
19032
19033 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
19034
19035         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
19036         AppDomain object.
19037
19038 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
19039
19040         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
19041         the mono_class_from_name lookup.
19042         (ves_icall_get_parameter_info): ditto.
19043         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
19044         method.
19045         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
19046
19047 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
19048
19049         * class.c: load also nested classes on class init.
19050         System.ValueType instance methods gets passed boxed
19051         values, unless methods in derived classed that get a pointer to the
19052         data.
19053         * icall.c: use better name parsing code in GetType().
19054         * image.c, image.h: add mono_image_loaded ().
19055         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
19056         * reflection.c, reflection.h: added mono_reflection_parse_type().
19057
19058 2002-01-22  Veronica De Santis <veron78@interfree.it>
19059
19060         * icall.c : Added mapping of internal calls for Manual and Auto reset events
19061         * threads.c : Added the implementation of internal calls for events
19062         * threads.h : Added prototypes of internal calls for events
19063         
19064 2002-01-21  Radek Doulik  <rodo@ximian.com>
19065
19066         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
19067
19068 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
19069
19070         * class.c (mono_class_init): set min_align to 1 (instead of 0)
19071         (mono_class_value_size): use min_align
19072
19073 2002-01-20  Dick Porter  <dick@ximian.com>
19074
19075         * threads.h:
19076         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
19077         so it compiles on w32.
19078
19079 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
19080
19081         * metadata.c (mono_type_stack_size): impl.
19082
19083         * class.c (mono_class_get_field): impl. memberref token
19084
19085 2002-01-16 Veronica De Santis <veron78@@interfree.it>
19086
19087         * icall.h : Added the internal calls mapping for CreateMutex_internal
19088                     and ReleaseMutex_internal.
19089         * threads.h : Added the prototype of mutexes internal calls.
19090         * threads.c : Added the implementations of mutexes internal calls.
19091
19092 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
19093
19094         * metaparse.h: removed unused file.
19095         * reflection.c, reflection.h: added stream_data_align () function 
19096         to align data in streams and keep stream aligned. Add support for
19097         exception support in method headers.
19098
19099 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
19100
19101         * unicode.c: make iconv_convert () return the number of bytess written
19102         in the output buffer.
19103
19104 2002-01-15  Dick Porter  <dick@ximian.com>
19105         * threads.c: Make the runtime's idea of infinite timeouts coincide
19106         with the class library's
19107
19108         Fix a particularly egregious bug in mono_thread_cleanup(). That
19109         code was so utterly bogus it must have been written on a Monday.
19110
19111 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
19112
19113         * reflection.h: add subtypes field to TypeBuilder.
19114         * reflection.c: encode constants for literal fields.
19115         Handle subtypes. Fix user string token (and add a zero byte)
19116         at the end.
19117         
19118 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
19119
19120         * class.c (mono_class_init): bug fix: assign slot numbers for
19121         abstract methods.
19122
19123 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19124
19125         * reflection.c: don't try to output a code RVA for abstract methods.
19126         Small fixes for method header format. Output parameter info to the
19127         ParamDef table. Save method overriding info to MethodImpl table.
19128         Fix property support. Allow typedef.extends to be a type in the
19129         building assembly.
19130         * verify.c: fix off-by-one error.
19131
19132 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
19133
19134         * class.c: fix mono_class_from_mono_type () for szarray types.
19135         Remove unused cache check in mono_class_from_type_spec().
19136         * icall.c: *type_from_name () functions handle simple arrays and byref.
19137         * reflection.c: handle byref and szarray types. Handle methods without
19138         body (gets P/Invoke compilation working). Handle types and fields in
19139         get_token ().
19140         * reflection.h: add rank to MonoTypeInfo.
19141
19142 2002-01-10  Dick Porter  <dick@ximian.com>
19143
19144         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
19145         internal calls
19146
19147 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
19148
19149         * icall.c: initialize class in type_from_handle ().
19150         Loop also in parent classes for get_method ().
19151         * reflection.c: properly encode class and valuetype types.
19152         Start on encoding TypeBuilder types. Handle fieldrefs.
19153         Use correct length when registering a user string.
19154         Handle ConstructorBuilder and MonoMethod in get_token ().
19155         Make mono_type_get_object () aware of cached types.
19156         * object.c: back out change to mono_string_new ().
19157
19158 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
19159         * object.c: mono_string_new should return a NULL when the string 
19160         passed in is NULL -- not try to deference it.
19161         
19162 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19163
19164         * icall.c: hack to make IsSubType work for TypeBuilders.
19165         * reflection.c: emit constructors before methods.
19166         Retrieve param names in mono_param_get_objects().
19167
19168 2002/01/05  Nick Drochak  <ndrochak@gol.com>
19169
19170         * Makefile.am: fix list of headers and sources so automake 1.5
19171         doesn't complain. Removed \# at end of list.
19172
19173 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
19174
19175         * reflection.c: get token for a method ref. Set return type of
19176         constructor to void.
19177         * loader.c: debug message.
19178         * class.c: typo fix.
19179
19180 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
19181
19182         * icall.c: fix array init with rank > 1. FindMembers
19183         loops in parent class as well.
19184         * image.c: do not insert nested types in name cache.
19185         * reflection.c: warning fix.
19186         * reflection.h: add override method (for interface impl).
19187
19188 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
19189
19190         * metadata.c: fix customattr decoding.
19191
19192 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
19193
19194         * rawbuffer.cs: Added native Win32 implementation, avoids using
19195         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
19196
19197 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
19198
19199         * class.c: make the low-level routines handle the cache.
19200
19201 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
19202
19203         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
19204
19205 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
19206
19207         * class.c: fix mono_array_element_size() for objects.
19208         * class.h, class.c: add properties to MonoClass and load them
19209         at init time.
19210         * icall.c: check with isinst() when assigning a value to an array
19211         instead of requiring the classes to match exactly.
19212         Implemented icall for System.Type::GetType().
19213         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
19214         enums. Handle bindingflags when looking for methods and fields.
19215         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
19216         and mono_metadata_methods_from_property().
19217         * reflection.h, reflection.c: added structures for propreties,
19218         parameters and enums. Implemented mono_property_get_object() and
19219         mono_param_get_objects().
19220
19221 2001-12-18  Dick Porter  <dick@ximian.com>
19222
19223         * file-io.c: Use mono_string_to_utf16() instead of
19224         mono_string_chars()
19225
19226         * object.c: Added mono_string_to_utf16(), which copies the non
19227         NULL-terminated MonoString into a new double-null-terminated
19228         buffer.
19229
19230 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
19231
19232         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
19233
19234 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
19235
19236         * file-io.c: raise exceptions if handle is invalid.
19237
19238 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
19239
19240         * assembly.c: yet another check for mscorlib.
19241         * class.c, class.h: load nesting info for classes.
19242         * icall.c: many new functions to support the Reflection classes.
19243         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
19244         * reflection.h, reflection.c: mono_image_create_token(),
19245         mono_assembly_get_object(), mono_type_get_object(),
19246         mono_method_get_object(), mono_field_get_object(): methods to return
19247         objects that parallel the C representation of assemblies, types,
19248         methods, fields.
19249
19250 2001-12-11  Dick Porter  <dick@ximian.com>
19251
19252         * icall.c:
19253         * file-io.c: Internal calls for file IO.
19254
19255 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
19256
19257         * tabledefs.h: missing FileAttributes.
19258         * verify.h, verify.c: use is_valid_string () to simplify and check for
19259         valid strings more correctly. Fix warnings and speeling.
19260         Check more tables: Filed, File, ModuleRef, StandAloneSig.
19261         Check code: branches, maxstack, method calls.
19262
19263 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
19264
19265         * object.c (mono_object_allocate): removed static, so that the jit
19266         can allocate value types.
19267
19268         * icall.c (ves_icall_System_DateTime_GetNow): impl.
19269
19270 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19271
19272         * class.c: init enum types right away and register the
19273         token->MonoClass map in mono_class_create_from_typedef ().
19274         * verify.h, verify.c: first cut of the verifier.
19275         * pedump.c: add --verify switch to verify metadata tables.
19276         * tabledefs.h: add some missing enums.
19277
19278 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
19279
19280         * class.c (mono_install_runtime_class_init): impl.
19281         (mono_class_init): renamed mono_class_metadata_init to
19282         mono_class_init, also removed the metadata_inited flag
19283
19284         * object.c (mono_object_isinst): use faster algorithm
19285
19286 2001-11-30  Radek Doulik  <rodo@ximian.com>
19287
19288         * mono-endian.h: reverted last change
19289         added function prototypes
19290
19291         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
19292         add mono-endian.c back
19293
19294         * mono-endian.c: returned back, as Paolo pointed out, it's needed
19295         for unaligned access, I've mistaked it with endianess. I am
19296         sorry.
19297         (mono_read16): fix reverted endianess
19298         (mono_read64): ditto
19299         (mono_read32): ditto
19300
19301 2001-11-30  Dick Porter  <dick@ximian.com>
19302
19303         * exception.c: Implement mono_exception_from_name()
19304
19305 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19306
19307         * metadata.h, metadata.c: remove params_size and locals_size and their
19308         calculation from the metadata code: they are only usefult to the
19309         interp.
19310
19311 2001-11-29  Radek Doulik  <rodo@ximian.com>
19312
19313         * object.c (mono_ldstr): swap bytes here, it's probably not the
19314         best place, but works for me now, I'll redo it once I know mono
19315         better, also note that I add PROT_WRITE and don't reset back, also
19316         note that it's only affects big endians, so x86 should be OK
19317
19318         * mono-endian.h (read16): use just glib macros for both endians
19319
19320         * mono-endian.c: removed as glib macros are used in in
19321         mono-endian.h so we don't need to care about endianess for read
19322         macros as glib does that for us already
19323
19324 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
19325
19326         * class.h, class.h: take minimum alignment into consideration so
19327         that the fields of a class remain aligned also when in an array.
19328
19329 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19330
19331         * loader.h, loader.c: add mono_method_get_param_names().
19332         * class.c: 0-init class fields.
19333
19334 2001-11-26  Dick Porter  <dick@ximian.com>
19335
19336         * icall.c:
19337         * threads-types.h:
19338         * threads.c: New file that handles System.Threading on all platforms
19339
19340         * object.c: 
19341         * object.h: Remove the synchronisation struct from MonoObject,
19342         replace it with a pointer that gets initialised on demand
19343
19344         * Makefile.am: Replace all the system-specific threading code with
19345         a single file that uses the new wrapper library
19346
19347 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
19348
19349         * class.c, class.h: add mono_install_trampoline() so that the runtime
19350         can register a function to create a trampoline: removes the ugly
19351         requirement that a runtime needed to export arch_create_jit_trampoline.
19352         * object.h, object.c: added mono_install_handler() so that the runtime
19353         can install an handler for exceptions generated in C code (with
19354         mono_raise_exception()). Added C struct for System.Delegate.
19355         * pedump.c: removed arch_create_jit_trampoline.
19356         * reflection.c: some cleanups to allow registering user strings and
19357         later getting a token for methodrefs and fieldrefs before the assembly
19358         is built.
19359         * row-indexes.h: updates and fixes from the new ECMA specs.
19360
19361 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
19362
19363         * class.h, class.c: add enum_basetype field to MonoClass.
19364         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
19365         to get index in the constant table reated to a field, param or
19366         property.
19367         * reflection.h, reflection.c: handle constructors. Set public-key and
19368         version number of the built assembly to 0.
19369         * row-indexes.h: update from new ECMA spec.
19370
19371 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19372
19373         * class.h, class.c: add a max_interface_id to MonoClass.
19374         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
19375         since it's used to do that. Added mono_type_type_from_obj().
19376         Make GetType() return NULL instead of segfaulting if the type was not
19377         found. Handle simple arrays in assQualifiedName.
19378         * object.h: add a struct to represent an Exception.
19379         * reflection.c: output call convention in method signature.
19380         Add code to support P/Invoke methods and fixed offsets for fields.
19381
19382 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
19383
19384         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
19385         the value.
19386         * icall.c: use mono_array_addr instead of array->vector: fixes the
19387         reflection image writing.
19388         * reflection.c: init call convention byte to 0 in method signature.
19389         Encode the property signature. Don't output property-related methods
19390         twice. Really process the properties for a type (don't cast a field to
19391         a property, my mom always told me that).
19392         Fix 64 bit issues in pointer alignment in a different and more
19393         readable way.
19394
19395 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
19396
19397         * loader.h: Removed type class from MonoDefaults, added monotype
19398
19399         * loader.c: Loaded MonoType, removed loading of Type
19400
19401         * icall.c (my_mono_new_object): Now returns a System.MonoType,
19402         and fills in System.Type._impl with a RuntimeTypeHandle rather
19403         than the actual MonoClass *
19404
19405         (ves_icall_type_from_handle): change from type_class to
19406         monotype_class
19407
19408         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
19409         implemented
19410
19411         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
19412         implemented
19413
19414         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
19415
19416         (ves_icall_System_Reflection_Assembly_GetType): implemented
19417
19418         (ves_icall_System_MonoType_assQualifiedName): implemented
19419
19420         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
19421
19422 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
19423
19424         * assembly.c (mono_assembly_open): Implement a cache for the
19425         assemblies. 
19426
19427         (mono_assembly_close): only destroy the assembly when the last
19428         reference is gone.
19429         
19430 2001-11-09  Dick Porter  <dick@ximian.com>
19431
19432         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
19433
19434 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
19435
19436         * class.c (mono_class_metadata_init): bug fix: compute the right slot
19437
19438 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19439
19440         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
19441         from Martin Weindel.
19442         * object.h: add mono_string_chars ().
19443
19444 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
19445
19446         * reflection.c (build_compressed_metadata): Eliminates warnings
19447         and uses 64-bit clean code.
19448
19449         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
19450         (mono_type_equal): Change signature to eliminate warnings.
19451
19452 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19453
19454         * icall.c, loader.c: remove the internalcall array constructors.
19455         Changes to match the new MonoArray structure.
19456         * object.h, object.c: an array object doesn't allocate an extra
19457         vector. Add mono_array_new_full () to create jagged arrays easily.
19458
19459 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19460
19461         * metadata.h, metadata.c: add mono_metadata_field_info () to
19462         retreive all the info about a field from vairous tables.
19463         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19464         * class.h, class.c: augment MonoClassField with more info.
19465         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19466         policy and load a field's RVA if needed.
19467
19468 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
19469
19470         * class.c (mono_class_metadata_init): create a trampoline for all
19471         virtual functions instead of actually compiling them.
19472
19473 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19474
19475         * class.h, class.c: include name in MonoClassField.
19476         * class.c: fix fundamental type of System.Object and System.String.
19477         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19478         tokens in ldtoken.
19479         * icall.c: remove internalcalls for the Reflection stuff that is now
19480         done in C# code.
19481         * loader.c: mono_field_from_memberref () implementation.
19482         * mono-endian.c: thinko (s/struct/union/g).
19483         * object.c, object.h: make the mono_string_* prototypes actually use
19484         MonoString instead of MonoObject.
19485         * reflection.c, reflection.h: updates for changes in the reflection
19486         code in corlib: we use C structures that map to the actual C# classes.
19487         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19488         fat method header if needed and use the info from the ILGenerator for
19489         methods. Handle fields in types. Misc fixes.
19490
19491 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
19492
19493         * class.c (mono_class_metadata_init): bug fix: always allocate
19494         space for static class data
19495
19496 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
19497
19498         * class.c (mono_compute_relative_numbering): use relative
19499         numbering to support fast runtime type checks.
19500
19501 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
19502
19503         * class.c (mono_class_create_from_typeref): added debugging output
19504         to print class name when MonoDummy is returned instead of real class
19505
19506 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
19507
19508         * class.c (mono_class_metadata_init): interface offset table now
19509         contains pointers into the vtable - this is more efficient for the jit
19510
19511 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
19512
19513         * class.c (mono_class_metadata_init): use a temporary vtable (the
19514         old algorithm only worked for the interpreter, but not for the jit)
19515
19516 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
19517
19518         * loader.c (method_from_memberref): use mono_class_get to get the
19519         class of an array instead of using System.Array directly.
19520         (mono_get_method): also add MEMBERREF methods to the method cache
19521         which usefull for arrays.
19522
19523 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
19524
19525         * pedump.c (arch_compile_method): added to compute vtable entry
19526
19527         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
19528         number of interfaces.
19529         
19530         * class.h: merged MonoArrayClass into MonoClass
19531
19532         * class.c (mono_class_create_from_typedef): compute the vtable size and
19533         allocate space to include the vtable inside MonoClass
19534         (mono_class_metadata_init): initialize the vtable
19535
19536 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
19537
19538         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
19539         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
19540         * image.c: endian fixes by Laurent Rioux.
19541         * object.h, object.c: rename MonoStringObject to MonoString and
19542         MonoArrayObject to MonoArray. Change some function names to conform to
19543         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
19544         guint16* as first argument, so don't use char*.
19545         Provide macros to do the interesting things on arrays in a portable way.
19546         * threads-pthread.c: updates for the API changes and #include <sched.h>
19547         (required for sched_yield()).
19548         * icall.c: updates for the API changes above.
19549         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
19550         platforms that need them.
19551
19552 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19553
19554         * class.c: set the correct type for all the fundamental
19555         type when loading the class.
19556
19557 2001-10-05  Dick Porter  <dick@ximian.com>
19558
19559         * threads-pthread.c (pthread_mutex_timedlock): Simple
19560         compatibility version for C libraries that lack this call.
19561
19562 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19563
19564         * class.c: MonoTypes stored in MonoClass are stored as
19565         fundamental MonoTypes when the class represents a
19566         fundamental type (System.Int32, ...).
19567         The TypeHandle return by ldtoken is a MonoType*.
19568         * icall.c: ves_icall_get_data_chunk () write out all the
19569         PE/COFF stuff. Implement ves_icall_define_method (),
19570         ves_icall_set_method_body (), ves_icall_type_from_handle ().
19571         * image.c: properly skip unknown streams.
19572         * loader.h, loader.c: add type_class to mono_defaults.
19573         * metadata.c, metadata.h: export compute_size () as
19574         mono_metadata_compute_size () with a better interface.
19575         Typo and C&P fixes.
19576         * pedump.c: don't try to print the entry point RVA if there is no entry point.
19577         * reflection.c, reflection.h: many cleanups, fixes, output method
19578         signatures and headers, typedef and typeref info, compress the metadata
19579         tables, output all the heap streams, cli header etc.
19580         * row-indexes.h: typo fixes.
19581
19582 2001-10-04  Dick Porter  <dick@ximian.com>
19583
19584         * object.h: Add a synchronisation mutex struct to MonoObject
19585
19586         * object.c (mono_new_object): Initialise the object
19587         synchronisation mutexes
19588
19589         * icall.c: System.Threading.Monitor internal calls
19590         
19591         * threads-pthread.h:
19592         * threads-pthread.c: System.Threading.Monitor internal calls
19593
19594         * threads-types.h: New file, includes the system-specific thread
19595         structures
19596         
19597         * threads-pthread-types.h:
19598         * threads-pthread-types.c: New files, handle pthread-specific
19599         synchronisation types
19600
19601         * threads-dummy-types.h: 
19602         * threads-dummy-types.c: New files of dummy support for
19603         thread-specific types
19604
19605         * metadata.c:
19606         * image.c:
19607         * pedump.c: include mono-endian.h not endian.h
19608         
19609         * Makefile.am: More threads files.
19610         Name mono-endian.h not endian.h
19611
19612 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
19613
19614         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
19615         stuff and implement a few more bits.
19616         * icall.c: a field needs to be dereferenced twice. Do not use the same
19617         name for two variables in the same scope.
19618         * image.c, image.h: cleanups.
19619
19620 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
19621
19622         * class.c (mono_class_metadata_init): bug fix: compute the right size
19623
19624 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
19625
19626         * icall.c: implemented some of the Reflection internalcalls.
19627         * image.c, image.h: start writing out the PE/COFF image.
19628         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
19629         that does the reverse than decode_blob_size ().
19630         * object.c: use mono_metadata_encode_value (). Move here
19631         temporary implementation of mono_string_to_utf8 ().
19632         * rawbuffer.c: make malloc_map static.
19633
19634 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19635
19636         * metadata.c: fix type comparison for arrays.
19637         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
19638         Added a couple of new classes to monodefaults.
19639         * icall.c: added a couple of Reflection-related internalcalls.
19640         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
19641         Added a byval_arg MonoType to MonoClass.
19642
19643 2001-09-28  Dick Porter  <dick@ximian.com>
19644
19645         * icall.c:
19646         * threads-pthread.h: 
19647         * threads-pthread.c: Implemented internal calls for
19648         LocalDataStoreSlot operations.  Applied mutexes around all shared
19649         data.  Reworked the thread creation and Start() operations to
19650         avoid a race condition.
19651         
19652         * threads-dummy.h:
19653         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
19654
19655 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
19656
19657         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
19658
19659 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
19660
19661         * class.c, loader.c: warn and return NULL instead of erroring out.
19662         * icall.c: added System.AppDomain::getCurDomain().
19663         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
19664
19665 2001-09-25  Dick Porter  <dick@ximian.com>
19666
19667         * threads-pthread.h:
19668         * threads-pthread.c: Implemented timed thread joining and added
19669         System.Threading.Thread::Join_internal internal call
19670
19671         * icall.c: Added System.Threading.Thread::Join_internal internal call
19672
19673         * threads-dummy.h:
19674         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
19675
19676 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
19677
19678         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
19679         mono_string_intern () to implement the semantics of the ldstr opcode
19680         and the interning of System.Strings.
19681         * icall.c: provide hooks to make String::IsIntern and String::Intern
19682         internalcalls.
19683
19684 2001-09-23  Dick Porter  <dick@ximian.com>
19685
19686         * threads-dummy.c: 
19687         * threads-dummy.h: New files of dummy threading routines
19688
19689         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
19690         support code based on system specifics
19691
19692         Rename PTHREAD_LIBS to THREAD_LIBS
19693         
19694 2001-09-23  Dick Porter  <dick@ximian.com>
19695
19696         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
19697         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
19698         internal calls.
19699         (mono_thread_init): Set up a Thread object instance to return when
19700         the main thread calls Thread.CurrentThread
19701         (mono_thread_cleanup): Wait for all subthreads to exit
19702
19703         * icall.c: New internal calls for System.Threading.Thread::Sleep
19704         (including Schedule) and CurrentThread
19705
19706         * threads.h: New file, to insulate thread-specific stuff from the
19707         rest of the code
19708
19709 2001-09-21  Dick Porter  <dick@ximian.com>
19710
19711         * threads-pthread.h: 
19712         * threads-pthread.c: New file, for handling pthreads-style
19713         threading support.  Start() now starts a new thread and executes
19714         the ThreadStart delegate instance.
19715
19716         * icall.c: Added the internalcall for
19717         System.Threading.Thread::Start_internal
19718
19719         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
19720
19721 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
19722
19723         * loader.c: work around the different signatures for delegates
19724         constructors csc generates in compiled code vs the ones compiled in mscorlib.
19725
19726 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19727
19728         * class.h, class.c: add mono_class_get_field_from_name ().
19729         * *: Fix C comments and other ANSI C issues.
19730
19731 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
19732
19733         * endian.h, assembly.c: fix some endianness issues.
19734
19735 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
19736
19737         * loader.h, load.c: add delegate_class to mono_defaults.
19738         Handle runtime provided methods in mono_get_method ().
19739
19740 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
19741
19742         * loader.c (mono_get_method): use pinvoke for internal call
19743
19744         * icall.c: use pinvoke for internal call
19745
19746         * loader.c (method_from_memberref): set the method name
19747
19748 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
19749
19750         * metadata.c: help the compiler generate better code for
19751         mono_class_from_mono_type ().
19752
19753 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
19754
19755         * class.c (mono_class_metadata_init): delayed computing of the
19756         class size to mono_class_metadata_init ()
19757
19758 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
19759
19760         * class.c, class.h: add an interfaces member to MonoClass.
19761         * image.c, image.h: add assembly_name field to MonoImage
19762         from the assembly table.
19763         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
19764
19765 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19766
19767         * class.c: Handle Array in mono_class_from_mono_type ().
19768         * metadata.c, pedump.c: some endian fixes.
19769
19770 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
19771
19772         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
19773         * metadata.c: fix small problem introduced with the latest commit.
19774
19775 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
19776
19777         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
19778         We don't need a MonoMetadata pointer anymore to compare signatures in
19779         mono_metadata_signature_equal (), update callers.
19780         Reduced memory usage an number of allocations for MonoMethodHeader and
19781         MonoMethodSignature.
19782
19783 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
19784
19785         * metadata.c: added compare for szarray.
19786
19787 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
19788
19789         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
19790         and add a couple more types to it and mono_defaults. Give an hint on
19791         classes that need implementing in our corlib and are referenced
19792         in mscorlib.
19793
19794 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
19795
19796         * class.h, class.c: keep track if a class is also an Enum.
19797         * loader.c: Implement a couple more types for use in libffi
19798         marshalling. Gives better diagnostics when failing to dlopen
19799         a library. Set method->klass for P/Invoke methods, too.
19800
19801 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
19802
19803         * class.c, class.h: add a MonoType this_arg to MonoClass that
19804         represents a pointer to an object of the class' type that
19805         can be used by the interpreter and later the type cache.
19806         Add best guess alignment info for valuetype objects.
19807
19808 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
19809
19810         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
19811         into MonoType: one less level of indirection and allocation and
19812         simplifies quite a bit of code. Added cache for MonoTypes that are
19813         used frequently, so that we don't need to allocate them all the time.
19814
19815 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
19816
19817         * class.c (mono_class_create_from_typedef): System.Enum is also a
19818         value type, although it does not derive from System.ValueType
19819         (maybe a bug in the ms compiler?)
19820
19821         * metadata.c (mono_type_size): return the right size for value types
19822
19823         * loader.c (mono_get_method): only initialize method header if not abstract
19824
19825         * class.c (mono_class_from_mono_type): use mono_default values. 
19826
19827 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
19828
19829         * *: use MonoClass pointers instead of <type_tokens>
19830         
19831         * class.h: new flag: metadata_inited.
19832
19833         * class.c (mono_class_metadata_init): impl.
19834         (mono_class_instance_size): impl.
19835         (mono_class_data_size): impl.
19836
19837 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
19838
19839         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
19840         MonoClass now has the name and name_space fields. 
19841         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
19842         mono_get_method () takes and optional MonoClass as argument.
19843         Removed mono_typedef_from_name() and added mono_class_token_from_name()
19844         instead that takes advantage of a map from class names to typedef
19845         tokens in MonoImage.
19846
19847 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
19848
19849         * metadata.c: zero is not a valid alignment boundary.
19850         Merge MONO_TYPE_VOID in default decoding code.
19851
19852 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
19853
19854         * image.h: merged MonoMetadata into MonoImage
19855
19856         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
19857         identify the type of elements.
19858
19859 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
19860
19861         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
19862         * cil-coff.h: split MonoMSDOSHeader and add size info.
19863         * image.c: add some consistency checks.
19864         * metadata.c: fix row size computation: one programmer
19865         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
19866         add explanation for the locator routine.
19867         Fix decoding of size in method header.
19868         
19869 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
19870
19871         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
19872         (g_concat_dir_and_file): Bring g_concat_dir_and_file
19873         function from gnome-libs.  This uses the right path separator
19874         based on the OS, and also works around a bug in some systems where
19875         a double slash is not allowed. 
19876         (default_assembly_name_resolver): Use g_concat_dir_and_file
19877         (mono_assembly_open): ditto.
19878
19879 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
19880
19881         * metadata.c (mono_metadata_signature_equal): impl.
19882
19883         * *: void is now a realy MonoType (instead of using NULL)
19884         
19885         * metadata.c (do_mono_metadata_parse_type): use
19886         mono_metadata_parse_type to parse void value.
19887
19888 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
19889
19890         * metadata.c, metadata.h: in the signature and method header store
19891         only the space required for holding the loca vars and incoming arguments.
19892
19893 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
19894
19895         * metadata.c (do_mono_metadata_parse_type): treat void like any
19896         other type (instead of assigning NULL);
19897
19898 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
19899
19900         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
19901
19902 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
19903
19904         * image.c (do_mono_image_open): added a cache for arrays.
19905
19906 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19907
19908         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
19909         decode a single column from a row in a metadata table and changes
19910         to take advantage of it in the typedef locator (gives a nice speed up).
19911         Store offset info for function params.
19912
19913 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
19914
19915         * image.h (MONO_IMAGE_IS_CORLIB): removed 
19916
19917 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
19918
19919         * assembly.c: how could mono_assembly_close () had ever worked?
19920         * metadata.c, metadata.h: provide offset info for local vars.
19921         Implement mono_type_size () to take care of alignment as well
19922         as size (it was mono_field_type_size in cli/class.c before).
19923
19924 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
19925
19926         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
19927
19928         * assembly.h (CORLIB_NAME): set to corlib.dll
19929
19930         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
19931
19932 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
19933
19934         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
19935         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
19936         tokentype.h: massive namespace cleanup.
19937
19938 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
19939
19940         * metadata.h, metadata.c: decode exception clauses when parsing method header.
19941
19942 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
19943
19944         * metadata.c (mono_metadata_free_type): added check for type !=
19945         NULL (void) before calling mono_metadata_free_type()
19946
19947 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
19948
19949         * metadata.h, row_indexes.h: added header with enumerations to use
19950         to index in the columns from tables in metadata and to decode coded
19951         tokens: we should start using this instead of embedding magic numbers
19952         all over the code.
19953
19954 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
19955
19956         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
19957         Move metadata_t info from cli_image_info_t to MonoImage, where
19958         it's easily accessible. Changed all the uses accordingly.
19959         Added the method and class caches to MonoImage.
19960         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
19961         and mono_metadata_decode_value () signature to be more consistent
19962         with the other parse functions (and simplify code). Taken advantage
19963         of zero-length array allocation with GCC. Removed reduntant (and
19964         wrong) MonoFieldType struct and use MonoParam instead. Changed
19965         mono_metadata_parse_field_type () to use common code for parsing.
19966         Added mono_metadata_typedef_from_field () and
19967         mono_metadata_typedef_from_method () to lookup a typedef index from a
19968         field or method token.
19969         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
19970
19971 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
19972
19973         * metadata.c (mono_metadata_parse_field_type): Implement. 
19974         (do_mono_metadata_parse_type): Split engine from
19975         mono_metadata_parse_type, so that we can create smaller structures
19976         for things that just have one pointer to the MonoType (look at
19977         the MonoFieldType)
19978
19979 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
19980
19981         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
19982         as Jan Gray found out, it is incorrect. 
19983
19984 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
19985
19986         * assembly.c: Implement asssembly loading.  This loads an image
19987         and loads all the referenced assemblies.  Come to think of it, we
19988         could always do lazy loading of the assemblies. 
19989
19990         * image.c (mono_image_open): Keep loaded images in a hashtable.
19991
19992         * image.h (MonoImage): Add reference count.
19993
19994 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
19995
19996         * assembly.c (mono_assembly_open): Keep track of the file name in
19997         case the assembly has no ASSEMBLY table.
19998
19999         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
20000         from get.c here.
20001
20002 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
20003
20004         * metadata.c, metadata.h: decode local vars in method header
20005         parse function. Change callers accordingly.
20006
20007 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
20008
20009         * metadata.h, cil-coff.h: protect against multiple inclusion.
20010         Added some new structures to hold information decoded from metadata:
20011         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
20012         and relevant decoding/free functions.
20013         * metadata.c: implement decoding functions. Add warning for out of bounds
20014         index in mono_metadata_locate(). Implement mono_get_method () to retreive
20015         all the info about a method signature and invocation. Remove check on
20016         uninitialized local var in parse_mh() and fix memory leak.
20017
20018 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
20019
20020         * metadata.h: More macros.
20021
20022         * tokentype.h: New file.
20023
20024 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
20025
20026         * assembly.c: added a consistency check and initialize
20027         some structures with g_new0().
20028         * metadata.c: fixed a couple more bugs in table size computation
20029         and add other checks for out-of bound access to metadata.
20030
20031 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
20032
20033         * metatada.c: fix bugs computing table sizes. Spew a
20034         warning when index in string heap is out of bounds.
20035
20036 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
20037
20038         * metadata.h: Add a couple of macros to manipulate tokens. 
20039
20040 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
20041
20042         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
20043         cli_section_tables).
20044
20045 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
20046
20047         * metadata.c (mono_metadata_user_string): New function, provides
20048         access to the UserString heap. 
20049
20050 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
20051
20052         * metadata.c: Add inline documentation.
20053
20054 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
20055
20056         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
20057         files. 
20058
20059 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
20060
20061         * typeattr.h: New file, TypeAttribute flags. 
20062
20063 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
20064
20065         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
20066         mono_assembly_ensure_section): Section loading code.
20067         (load_section_tables): Load the sections.
20068
20069         * mono/metadata/metadata.c (mono_metadata_locate_token,
20070         mono_metadata_locate): Functions to locate the information
20071         definition given a token or a table and an index.
20072         (mono_metadata_compute_table_bases): New.
20073         (compute_size): New function to compute the sizes of the various
20074         tables.
20075
20076         * mono/metadata/metadata.h: Finish listing the different index
20077         types. 
20078
20079         * mono/metadata/pedump.c: Improve to dump new information.
20080
20081 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
20082
20083         * mono/metadata/metadata.c: Entered all the tables matching
20084         Beta2. 
20085
20086         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
20087
20088
20089