Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
[mono.git] / mono / metadata / ChangeLog
1
2 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
3
4         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
5         the wrapper type enum and reduce relocations.
6
7 2007-01-12  Raja R Harinath  <rharinath@novell.com>
8
9         * reflection.c (inflate_mono_method): Reuse method instantiation
10         from the generic method, if available.
11
12 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13
14         * marshal.c (emit_marshal_variant): Fix conv_arg
15         type in last commit, based on whether parameter is byref.
16         
17 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
18
19         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
20         marshalling.
21         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
22         MONO_TYPE_OBJECT back for VARIANT support.
23
24 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
25
26         * marshal.c, marshal.h, icall-def.h: Implement 
27         Marshal.ReAllocCoTaskMem.
28
29 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
30
31         * marshal.c: memory retention fixes: use the proper
32         image cache for runtime_invoke method lookups.
33
34 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
35
36         * mempool.c: added code to help debug mempool allocations.
37
38 2007-01-11  Dick Porter  <dick@ximian.com>
39
40         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
41         support (experimenting with faking it with IP_MTU_DISCOVER for
42         systems that don't have IP_DONTFRAGMENT.)
43         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
44         icall.
45
46         * icall-def.h: new System.Net.Sockets.Disconnect icall.
47
48         * socket-io.h: Add new fields to MonoSocketAsyncResult
49         corresponding to the new ones in Socket.cs.
50
51 2007-01-11  Raja R Harinath  <rharinath@novell.com>
52
53         Fix IronPython regression mentioned in #80249
54         * metadata.c (do_mono_metadata_parse_generic_class): Clear
55         'cached_context' field, since it may have been initialized as a
56         side-effect of metadata parsing.
57
58         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
59         (_MonoGenericClass.cached_class): Move here and rename from lone
60         remaining field of ...
61         (_MonoInflatedGenericClass): ... this.  Remove.
62         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
63         to changes.
64
65         Fix mcs/tests/test-128.cs regression.
66         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
67         2007-01-10 change below.
68         [MONO_TYPE_OBJECT]: Recurse into array case.
69
70 2007-01-11  Raja R Harinath  <harinath@gmail.com>
71
72         * class-internals.h (mono_get_inflated_generic_class): Remove.
73         * class.c (mono_get_inflated_generic_class): Remove.
74         (mono_generic_class_get_class): Rename from
75         mono_class_create_generic.
76         (mono_class_from_mono_type) [GENERICINST]: Use it.
77         * reflection.c, metadata.c: Update to changes.  Use
78         'mono_class_from_mono_type'.
79
80 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
81
82         * reflection.c: use passed type when encoding an array element
83         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
84
85 2007-01-09  Robert Jordan  <robertj@gmx.net>
86
87         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
88         result arguments (someDelegate.EndInvoke (unrelatedAres)).
89         Fixes bug #80392.
90
91 2007-01-09  Raja R Harinath  <rharinath@novell.com>
92
93         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
94
95         * object.c (set_value): Avoid aliasing between type->data.klass
96         and type->data.generic_class.
97
98         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
99
100 2007-01-08  Raja R Harinath  <rharinath@novell.com>
101
102         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
103         between type->data.klass and type->data.generic_class.
104
105 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
106
107         * marshal.c: In MS.NET, StringBuilder objects are not copied by
108         value in out parameters.
109
110 2007-01-08  Raja R Harinath  <rharinath@novell.com>
111
112         Simplify invariant for MonoGenericClass::klass field.
113         * class.c (mono_class_create_generic): Verify 'klass' is null.
114         * metadata.c (do_mono_metadata_parse_generic_class): Don't
115         initialize 'klass' field.
116
117 2007-01-05  Raja R Harinath  <rharinath@novell.com>
118
119         Ongoing work to avoid redundant data and simplify invariants.
120         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
121         'generic_class', and change type to a GenericInst.
122         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
123         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
124
125 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
126
127         * class.c : skip io-layer under PLATFORM_WIN32.
128
129 2007-01-03  Tor Lillqvist  <tml@novell.com>
130
131         Fix #80305: In a bundled executable, look in the bundled exe
132         assembly to determine the runtime version. Add the possibility to
133         bundle also the machine.config file.
134         
135         * assembly.c (mono_assembly_open_from_bundle): Make
136         non-static. Allow being called even if we have no bundled
137         assemblies, and return NULL right away in that case.
138
139         * domain-internals.h: Declare mono_assembly_open_from_bundle()
140         here.
141
142         * domain.c (app_config_parse): Take an assembly exe file name as
143         parameter instead of a config file name. Check for a bundled
144         config file for that assembly by calling
145         mono_config_string_for_assembly_file() (see below) before looking
146         for one in the file system.
147         (get_runtimes_from_exe): Corrsponding change to call of
148         app_config_parse().
149         (get_runtimes_from_exe): Check for bundled assembly exe file first
150         by calling mono_assembly_open_from_bundle(). If no bundled
151         assembly exe file is found, call mono_image_open() as before to
152         look it up in the file system.
153
154         * mono-config.c: Add variable bundled_machinec_onfig.
155         (mono_config_string_for_assembly_file): New function.
156         (mono_config_for_assembly): Move code snippet that looks for a
157         bundled assembly .config file into the above new function. Call
158         it.
159         (mono_register_machine_config, mono_get_machine_config): New
160         functions to set and retrieve
161
162         * assembly.h: Declare mono_register_machine_config().
163
164         * mono-config.h: Declare mono_get_machine_config() and
165         mono_config_string_for_assembly_file().
166
167         * icall.c: No declaration of environ necessary on Win32. It is
168         declared (as a macro expanding to a function call) in stdlib.h.
169         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
170         New internal mono function. Returns the value of
171         mono_get_machine_config() as a Mono string.
172
173         * icall-def.h: Add get_bundled_machine_config().
174
175 2007-01-04  Raja R Harinath  <rharinath@novell.com>
176
177         Remove redundant field
178         * class-internals.h (_MonoGenericContext.container): Remove field.
179         * loader.c (mono_method_get_signature_full): Don't parse a
180         "container" for a signature parse when the signature is inflated
181         immediately.
182         (method_from_methodspec): Likewise, for a generic_inst.
183         * class.c, metadata.c, reflection.c: Update to changes.
184
185 2006-01-04  Raja R Harinath  <rharinath@novell.com>
186
187         * class-internals.h (_MonoGenericClass): Rename 'context' field to
188         'cached_context', and change semantics -- it starts off NULL, and
189         is initialized on demand.
190         * class.c (mono_generic_class_get_context): New accessor to
191         replace 'context' field accesses.
192         (mono_class_get_context): New helper.
193         (*): Update to changes.
194         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
195
196 2007-01-03  Miguel de Icaza  <miguel@novell.com>
197
198         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
199         before the memcpy.   Fixes Marshal2 regression.
200
201 2007-01-02  Jb Evain  <jbevain@gmail.com>
202
203         * blob.h: add a MONO_TYPE_ENUM definition
204         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
205         fix the encoding of arrays of enums in custom attributes.
206
207         Fixes #79666.
208
209 2007-01-01  Miguel de Icaza  <miguel@novell.com>
210
211         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
212         string is null terminated, but only cut the string short if it
213         overflows the buffer.   
214         
215         (mono_string_to_byvalstr): Also fix this routine.   The code here
216         was not properly terminating a string (it was only terminated
217         because of the previous catch-all memset). 
218
219         I left the memset, because I do not know if applications expect
220         the runtime to clear this region. 
221
222         Fixes #79944.
223
224         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
225         Clear the error before returning to unmanaged code to prevent the
226         runtime from being confused later on (fixes  80420).
227         (ves_icall_type_from_name): Always call mono_loader_clear_error
228         after parsing a type that could have failed.
229         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
230
231         * loader.c (mono_loader_clear_error): Fix indentation.
232
233 2006-12-28  Martin Baulig  <martin@ximian.com>
234
235         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
236
237 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
238
239         * reflection.c: patch from Rolf Bjarne Kvinge to fix
240         getting a token for an EnumBuilder.
241
242 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
243
244         * reflection.c: be more careful in case resource generation
245         fails to create the data array.
246
247 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
248
249         * sgen-gc.c: write barrier for clone and fix unregister handles.
250
251 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
252
253         * reflection.c: some fixes needed in the generics code for the moving GC.
254
255 2006-12-22  Robert Jordan  <robertj@gmx.net>
256
257         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
258         account. Fixes bug #80299.
259
260 2006-12-21  Raja R Harinath  <rharinath@novell.com>
261
262         Fix WaitHandle usage in delegates.
263         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
264         * object.c (mono_wait_handle_new): Use the property set method to
265         initialize the handle.
266         (mono_wait_handle_get_handle): New.
267         * threadpool.c (mono_async_invoke): Use it.
268         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
269         Likewise.
270         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
271
272 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
273
274         * marshal.c (emit_marshal): Call emit_marshal_variant and
275         emit_marshal_com_interface when applicable.
276         (emit_marshal_variant, emit_marshal_com_interface): Add
277         methods for this case and remove if's from emit_marshal_object.
278         
279 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
280
281         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
282
283 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
284
285         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
286         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
287         and GlobalFree on Windows. Remove FIXME.
288
289 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
290
291         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
292         implementation for managed objects.
293
294 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
295
296         * object.c: implemented code to be used for checking
297         that no reference field overlaps with non-references.
298
299 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
300
301         * threadpool.c: fix queue code to be compatible with the
302         moving GC.
303
304 2006-12-18  Miguel de Icaza  <miguel@novell.com>
305
306         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
307         in structures by throwing ArgumentNullException.
308
309         (emit_marshal_safehandle): Also when they are null parameters.
310
311         (emit_marshal_safehandle): Add support for ref
312         SafeHandles parameters
313
314 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
315
316         * profiler.c: updated to use the mono-dl API instead of
317         gmodule.
318
319 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
320
321         * profiler.c: updated to use the mono-dl dynamic loading
322         API instead of gmodule.
323
324 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
325
326         * profiler.c: use readlink, older versions of glib don't have
327         g_file_read_link ().
328
329 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
330
331         * profiler.c: try to detect the path to mono if libc fails to provide
332         a useful name (bug #80286).
333
334 2006-12-16  Raja R Harinath  <rharinath@novell.com>
335
336         Fix #80242
337         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
338         instance, use the generic type definition instead.
339         (ves_icall_Type_GetNestedTypes): Likewise.
340         * class.c (mono_class_create_generic): Always set the
341         nested_classes of a generic instance to NULL, even if the generic
342         type definition has nested types.
343
344 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
345
346         * marshal.c (mono_string_from_bstr): Revert previous Windows change
347         and fix on Linux.
348         
349 2006-12-15  Miguel de Icaza  <miguel@novell.com>
350
351         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
352         my arguments were in the wrong order.   I also fixed the Windows
353         version which seems to have had the same issue.
354
355         (mono_free_bstr): On Unix, this is g_free.
356         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
357         conversions (for the tests in corlib to pass).
358
359 2006-12-14  Miguel de Icaza  <miguel@novell.com>
360
361         * marshal.c (emit_ptr_to_object_conv): For now, ignore
362         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
363         exception if a ref SafeHandle in a struct has changed).
364         
365         (emit_struct_conv): Do not perform layout checks for classes
366         derived from SafeHandle, as those are specially handled. 
367
368         (emit_object_to_ptr_conv): Add support for
369         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
370
371         (emit_marshal_safehandle): Implement conversion of return values
372         of safehandles (MARSHAL_ACTION_CONV_RESULT).
373         
374         * threads.c: WaitHandle now is compiled with two different handles
375         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
376         for 2.0.
377         
378         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
379         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
380         these routines to cope with both kinds of fields.
381
382 2006-12-12  Miguel de Icaza  <miguel@novell.com>
383
384         * metadata.c (mono_type_to_unmanaged): Handle the case where
385         type->data.klass is a SafeHandle, and in that case, return the
386         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
387         MONO_MARSHAL_CONV_SAFEHANDLE. 
388
389 2006-12-11  Miguel de Icaza  <miguel@novell.com>
390
391         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
392         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
393         calling emit_marshal_object.
394
395         (emit_marshal_safehandle): Implement marshalling of
396         SafeHandle parameters (no ref support yet).
397
398         (MarshalAction): Document the defines as I implement
399         them for SafeHandle.
400
401         (emit_marshal_object): indentation police.
402
403         * class-internals.h: Define MonoSafeHandle.
404         Add safehandle_class to MonoDefaults type.
405
406         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
407         list of classes to check for fields. 
408
409         * domain.c (mono_init_internal): Add SafeHandle to the list of
410         mono_defaults loaded.
411
412 2006-12-15  Raja R Harinath  <rharinath@novell.com>
413
414         Fix #80253
415         * reflection.c (mono_reflection_bind_generic_parameters): If the
416         generic type definition is a type builder, ensure that it is fully
417         initialized before instantiating it.  Kill some dead code.
418
419 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
420
421         * object.c: clear the loader_error () before loading
422         more metadata stuff (bug #80258).
423
424 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
425
426         * icall.c, icall-defs.h: type modifiers icalls for
427         parameters and properties.
428
429 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
430
431         * object.c, icall.c: fixed warnings.
432
433 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
434
435         * marshal.c: fixed a couple of leaks and coding style in a few places.
436
437 2006-12-08  Dick Porter  <dick@ximian.com>
438
439         * process.c: Cope with NULL ProcessStartInfo arguments on windows
440         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
441         80173.
442
443 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
444
445         * process.c: ProcessStartInfo may have only filename set and
446         arguments can be NULL.
447
448 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
449
450         * icall.c: fix leak found by Robert Jordan.
451
452 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
453
454         * marshal.c, marshal.h: generate managed method to access an element
455         of a multi-dimensional array.
456
457 2006-11-30  Paolo Molaro (lupus@ximian.com)
458
459         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
460
461 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
462
463         * icall.c: back out GetFields () fix until the serialization code is
464         fixed to not depend on the incorrect behaviour.
465
466 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
467
468         * profiler.c: provide defaults if none are set.
469
470 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
471
472         * Makefile.am, attrdefs.h: new public header file with
473         constants for attributes for use by embedders.
474
475 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
476
477         * icall.c: GetFields () fix for bug #80064.
478
479 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
480
481         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
482         removed long unused icalls.
483
484 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
485   
486         * marshal.c: 
487                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
488                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
489                 can be generated without a delegate class.
490                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
491         
492         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
493
494 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
495
496         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
497         #80069.
498
499 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
500
501         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
502         icall-def.h: added icalls needed by System.GC.
503
504 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
505
506         * loader.c: ensure the class in catch clauses is handled
507         correctly for generics methods (fixes bug#79980).
508
509 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
510
511         * monitor.h, monitor.c: added mono_locks_dump () function
512         to help debug deadlocks involving managed locks.
513
514 2006-11-13  Dick Porter  <dick@ximian.com>
515
516         * file-io.c (get_file_attributes): If the file is a symlink try
517         and get the stat data for the target, but also add the
518         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
519         the specs for the windows symlink support, but will probably have
520         to be reworked when I have test data from a vista machine.  Fixes
521         bug 79887.
522
523 2006-11-13  Dick Porter  <dick@ximian.com>
524
525         * gc.c (mono_domain_finalize): 
526         * marshal.c (mono_delegate_begin_invoke): 
527         * threadpool.c (socket_io_init, mono_thread_pool_init)
528         (mono_thread_pool_finish): 
529         * monitor.c (mono_monitor_try_enter_internal): 
530         * threads.c (mono_thread_resume, mono_thread_init)
531         (mono_thread_suspend_all_other_threads)
532         (mono_thread_execute_interruption): 
533         * appdomain.c (mono_domain_unload): Check for NULL error returns
534         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
535         75733.
536
537 2006-11-11  Miguel de Icaza  <miguel@novell.com>
538
539         * process.c
540         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
541         Only close the handle if the value of the handle is not
542         INVALID_HANDLE_VALUE.  This just makes the process a bit more
543         robust.
544
545         Improvement for #75733, so that we do not run into this problem. 
546
547         
548         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
549         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
550         internal variables.  Fixes #79462 
551         
552
553 2006-11-09  Dick Porter  <dick@ximian.com>
554
555         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
556         Use poll() not select().  Fixes bug 79397.
557
558 2006-11-09  Raja R Harinath  <rharinath@novell.com>
559
560         Fix #79872
561         * assembly.c (mono_assembly_load_from_full): Check that the given
562         image has an assembly manifest.
563
564 2006-11-09  Ankit Jain  <jankit@novell.com>
565
566         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
567         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
568         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
569
570 2006-11-07  Dick Porter  <dick@ximian.com>
571
572         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
573         Put the old resolver behaviour back for pre-2.0 profiles.
574
575 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
576
577         * threadpool.c: precise GC and locking fixes.
578
579 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
580
581         * class.c: don't load types that have an explicit unaligned
582         managed reference. Provide better info in the TypeLoad exception.
583         Part of the fix for bug #79744.
584         * object.c: use the correct check for class type load issues.
585
586 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
587
588         * class.c: enforce alignment of fields with managed references
589         even when Pack=1 is forced by the user (bug #77788).
590
591 2006-11-03  Dick Porter  <dick@ximian.com>
592
593         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
594         If the address reverse lookup fails, return it as the hostname
595         anyway.  Fixes bug 79721.
596
597 2006-11-03  Dick Porter  <dick@ximian.com>
598
599         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
600         Fix build on Windows.
601
602 2006-11-02  Dick Porter  <dick@ximian.com>
603
604         * icall-def.h: 
605         * object-internals.h: 
606         * exception.c (mono_get_exception_thread_interrupted): 
607         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
608         Fixes bug 74525.
609
610         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
611         Check for pending Thread.Interrupt.
612
613 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
614         * loader.c: Fixed bug 79684.
615
616 2006-10-27  Dick Porter  <dick@ximian.com>
617
618         * file-io.c (get_file_attributes): Force symlinks to directories
619         to be returned as a regular file.  Fixes bug 79733.
620 2006-10-26  Dick Porter  <dick@ximian.com>
621
622         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
623         CreateFile to open a directory then we need to set the
624         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
625
626 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
627
628         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
629         friends.
630
631 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
632
633         * sgengc.c: small cleanup of timer code.
634
635 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
636
637         * sgen-gc.c: fix some warnings and start adding support for
638         complete object removal on domain unload.
639
640 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
641
642         * assembly.c: build_assembly_name should not consider a version
643         number without build or revision number invalid. Fixes bug #79715.
644
645 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
646
647         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
648         call kernel32 function OutputDebugString directly.
649         
650         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
651         
652 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
653
654         * reflection.c: small cleanup, using a function to insert a MonoString
655         in the string heap.
656
657 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
658
659         * reflection.c: moving GC fixes.
660
661 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
662
663         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
664         all the objects with finalizers belonging to an unloading appdomain.
665
666 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
667
668         * sgen-gc.c: added ability to allocate even when the nursery is fully
669         pinned and fixed a couple of bugs.
670
671 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
672
673         * threads.h: Revert the last change for now.
674
675         * threads.h (mono_thread_get_pending_exception): Rename this to
676         mono_thread_get_undeniable_exception ().
677
678 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
679
680         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
681         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
682         when fname does not refer to valid assembly. This result in a more
683         meaningful error message.
684         * exception.c: added mono_get_exception_bad_image_format2 which 
685         constructs a BadImageFormatException using the ctor taking a custom
686         message and the file name. Passing in a NULL msg results in a default
687         message.
688         * exception.h: define mono_get_exception_bad_image_format2 function.
689         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
690         when file name pointed to an invalid IL image. Use 
691         mono_get_exception_file_not_found2 to construct FileNotFoundException,
692         as this results in a more meaningful error message.
693
694 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
695
696         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
697         #79465.
698
699 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
700
701         * metadata.c (mono_type_size): Change the align parameter to guint32 for
702         consistency with the other _size functions.
703         (mono_type_stack_size): Ditto.
704
705         * class.c object.c icall.c: Fix warnings caused by the above change.
706
707         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
708
709         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
710
711         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
712
713 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
714
715         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
716         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
717         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
718         threadpool.h, threads-types.h: mark more internal functions.
719
720 2006-10-11  Dick Porter  <dick@ximian.com>
721
722         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
723         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
724         reproduce the bug even before applying the fix.)
725
726 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
727
728         * reflection.c: allow retrieving attributes for arguments in generic
729         methods (bug #79241).
730
731 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
732
733         * debug-mono-symfile.c: properly check fopen () result (found by
734         coverity).
735
736 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
737
738         * reflection.c: make error message clearer and fixed two
739         issuelets found by Coverity.
740
741 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
742
743         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
744
745 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
746
747         * object-internals.h, gc-internal.h, profiler-private.h:
748         mark internal functions.
749
750 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
751
752         * reflection.c: put data in the text section.
753         * icall.c: recognize more types in type_from_typename ().
754         * process.c, marshal.c: added some GC FIXMEs.
755
756 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
757
758         * loader.c: check for NULL before initializing.
759
760 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
761
762         * gc.c (finalizer_thread): Use a non-alertable wait here.
763
764         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
765         until the correct solution is found.
766
767 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
768
769         * reflection.c (mono_module_get_object): Avoid an assert when operating on
770         modules with no metadata. Fixes #79596.
771
772         * image.c (load_metadata_ptrs): Put back the error message when
773         the #- heap is encountered since the support is not complete yet.
774
775 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
776
777         * gc.c: do not allow the user to SuppressFinalize () a
778         delegate because it would leak the trampoline if present.
779
780 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
781
782         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
783         PropertyPtr table.
784
785 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
786
787         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
788
789         * metadata.c (mono_metadata_get_param_attrs): Ditto.
790
791         * row-indexes.h: Add definitions for *Ptr tables.
792
793         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
794
795         * metadata.c (mono_metadata_translate_token_index): New helper function to
796         translate table indexes used in uncompressed metadata.
797         (mono_metadata_decode_table_row): Ditto.
798         (mono_metadata_decode_table_row_col): Ditto.
799
800         * metadata.c: Add table schema for *Ptr tables.
801
802         * class.c loader.c: Use the new helper function to access the affected metadata
803         tables.
804         
805         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
806         #38532.
807         
808 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
809
810         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
811         sequences which can be unbounded in size. Fixes #79583.
812
813 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
814
815         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
816         static initialization.
817
818         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
819
820         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
821
822         * domain.c (mono_domain_free): Free up type_init_exception_hash.
823
824         * object.c (mono_runtime_class_init): Implement correct semantics when a static
825         ctor fails, i.e. throw the same exception on subsequent accesses.
826         
827 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
828
829         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
830         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
831         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
832         Handle marshalling of interfaces and VARIANTs contained in structs.
833         
834         Code is contributed under MIT/X11 license.
835         
836 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
837
838         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
839         
840         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
841         mempool.
842
843 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
844
845         * console-io.c: ignore previous SIGINT handler.
846
847 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
848
849         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
850         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
851         #79460, #79461, #79485.
852
853         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
854
855         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
856         #79217.
857
858 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
859
860         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
861         could be generated from it.
862
863 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
864
865         * rand.c: fix read loop to correctly handle EINTR.
866
867 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
868
869         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
870         internal calls are defined to keep methods closer to the declaring
871         type and allow a significant reduction in runtime relocations and
872         memory usage.
873
874 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
875
876         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
877         exception message to have FileNotFoundException use the default
878         assembly load error message. Fixes bug #79426.
879         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
880
881 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
882
883         * threadpool.c: (start_thread_or_queue) use the root domain when
884         creating the thread instead of the async object one.
885
886 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
887
888         * class.c, object.c, class-internals.h, reflection.c:
889         for arrays, store element_size inside MonoClass (speedup
890         for array object creation).
891
892 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
893
894         * icall.c: fixed CodeBase to use the file name and not the module
895         name (bug #79365).
896
897 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
898
899         * mono-debug.c, mono-debug.h: export find_method as
900         mono_debug_find_method ().
901
902 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
903
904         * debug-helpers.c, class-internals.h: added a few functions useful
905         when debugging under gdb.
906
907 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
908
909         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
910         characters that need special handling.
911
912 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
913
914         * mono-config.c: make the os/cpu specification more flexible,
915         allowing lists and negation.
916
917 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
918
919         * marshal.c: COM Interop fixes. Handle case where method->klass.
920         is interface. Handle BSTR/MonoString when null. Use CDECL as 
921         calling convention on non-windows platforms. This is for
922         compatibility with XPCOM and MainWin COM.
923         
924         Code is contributed under MIT/X11 license.
925         
926
927 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
928
929         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
930         correctly. Fixes #79217.
931
932         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
933
934 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
935
936         * mono-config.c: allow both an os and cpu attribute for dllmap
937         and dllentry elemnets to enable a single config file to be used
938         for multiple architectures.
939
940 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
941
942         * loader.c: MonoLoaderError was cleared too soon on load failure.
943         Fixes bug #79424.
944
945 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
946
947         * icall.c: use the defining class vtable when accessing a
948         static field, not a pobblibly derived class.
949
950 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
951
952         * icall.c string-icalls.c: Remove references to unicode.h.
953
954         * unicode.h unicode.c Makefile.am: Remove these unused source files.
955
956         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
957
958         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
959         indicating the image where custom marshaller types should be looked up.
960         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
961         custom marshallers, instead of corlib. Fixes #79425.
962
963 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
964
965         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
966
967 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
968
969         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
970         Implement Environment.ProcessorCount.
971         
972         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
973         Implement Environment.ProcessorCount.
974         
975         * icall.c: 
976         Add Environment.ProcessorCount icall.
977         
978         Patch by Jason McFall.
979
980 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
981
982         * assembly.c: don't append .exe/.dll when the filename already contains
983         one of those extensions.
984
985 2006-09-12  Martin Baulig  <martin@ximian.com>
986
987         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
988         to array interfaces.
989
990 2006-09-11  Martin Baulig  <martin@ximian.com>
991
992         * reflection.c (mono_image_build_metadata): Create the
993         MethodImpl's after emitting all types and methods, so we don't
994         need another fixup pass for them.
995
996 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
997
998         * class.c (mono_class_from_name_case): Fix regression introduced by the last
999         change.
1000
1001 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
1002
1003         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
1004         unload.
1005
1006 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
1007
1008         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
1009         args is not set. Fixes #78926.
1010
1011 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
1012
1013         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
1014
1015         * image.c (load_class_names): Move this to class.c, and rename it to 
1016         'mono_image_init_name_cache'.
1017         (load_modules): Fix a warning.
1018
1019         * class.c icall.c image.c: Initialize image->name_cache lazily.
1020
1021         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
1022         on its name using information in the AOT file.
1023
1024         * class.c (mono_class_from_name): Use the new hook function.
1025
1026 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
1027
1028         * reflection.c (mono_param_get_objects): Handle enum default parameter values
1029         correctly.
1030
1031         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
1032         Fixes #79289.
1033         
1034 2006-09-06  Martin Baulig  <martin@ximian.com>
1035
1036         * icall.c (mono_lookup_internal_call): Small fix.
1037
1038 2006-09-05  Raja R Harinath  <rharinath@novell.com>
1039
1040         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
1041         double g_free.
1042
1043 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
1044
1045         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
1046         when --debug is specified.
1047
1048 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
1049
1050         * class.c (setup_generic_array_ifaces): Fix a warning.
1051
1052 2006-09-04  Miguel de Icaza  <miguel@novell.com>
1053
1054         * Temporarily remove the patch to assemly.c that checks the
1055         assembly versions as it breaks our gacutil.
1056
1057 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
1058
1059         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
1060
1061         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
1062         a net 1.0 runtime.
1063
1064         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
1065         created using the default ctor. Fixes #79152.
1066         (mono_string_builder_to_utf16): Ditto.
1067
1068 2006-09-01  Martin Baulig  <martin@ximian.com>
1069
1070         Fix handling of the generic array interfaces.
1071
1072         * class-internals.h
1073         (MonoDefaults): Removed `generic_array_class' and added
1074         `generic_ilist' class.
1075
1076         * class.c
1077         (mono_bounded_array_class_get): Add the new generic array interfaces.
1078         (setup_generic_array_ifaces): New static method; create vtable
1079         entries for each method in the generic array interfaces.
1080
1081         * metadata.c
1082         (select_container): Allow "parent-less" generic methods.
1083
1084         * marshal.c
1085         (mono_marshal_get_generic_array_helper): New public method.
1086
1087         * icall.c
1088         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
1089         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
1090         moved the interncall into System.Array.
1091
1092 2006-09-01  Raja R Harinath  <rharinath@novell.com>
1093
1094         A few more cases of avoiding work on types with ->byref set.
1095         Has the real fix for #79238
1096         * icall.c (is_generic_parameter): New helper.
1097         (ves_icall_Type_GetGenericParameterPosition): Use it.
1098         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
1099         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1100         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1101         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
1102         reference types.
1103         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
1104         reference types.
1105         (ves_icall_Type_get_IsGenericInstance): Likewise.
1106         (ves_icall_Type_get_IsGenericType): Likewise.
1107
1108 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
1109
1110         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
1111         class if possible.
1112
1113         * mempool.h (mono_mempool_get_allocated): New helper function.
1114
1115         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
1116         change.
1117
1118         * mempool.c: Fix warnings and the calculation of stats.
1119
1120         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
1121
1122         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
1123
1124         * loader.c (mono_get_method_from_token): Update method_count stat.
1125
1126         * class-internals.h (MonoStats): Add some stats.
1127
1128 2006-08-31 Robert Jordan  <robertj@gmx.net>
1129
1130         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
1131         with managed variants.
1132         All code is contributed under the MIT/X11 license.
1133         
1134 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
1135
1136         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
1137         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
1138
1139         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
1140
1141         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
1142         with cycles in classes.
1143
1144         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
1145
1146         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
1147         missing a [MarshalAs] directive. Fixes #79203.
1148
1149         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
1150         klass->marshal_info. Fixes #79217.
1151
1152 2006-08-30  Martin Baulig  <martin@ximian.com>
1153
1154         Committing a patch from Joachim Ante <joe@otee.dk>:
1155         Add support for binary data symbol stores.
1156
1157         * debug-mono-symfile.c
1158         (mono_debug_open_mono_symbol_file): Renamed into
1159         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
1160         arguments.
1161
1162         * mono-debug.c
1163         (mono_debug_open_image): Added `raw_contents' and `size' args.
1164         (mono_debug_init_2_memory): New public function.
1165
1166 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
1167
1168         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
1169
1170 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1171
1172         * appdomain.c: implement support for ShadowCopyFiles.
1173
1174 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
1175
1176         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
1177         when value is NULL (and should remove CID #51).
1178
1179 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1180
1181         * image.c: moved 2 functions to ../utils.
1182
1183 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
1184
1185         * gc.c: cope with the target object of a GC handle being NULL
1186         (bug #78877).
1187
1188 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
1189
1190         * class.c: recursively check parent's explicit implementations
1191         of interface methods (fixes bug #79125).
1192
1193 2006-08-19  Miguel de Icaza  <miguel@novell.com>
1194
1195         * filewatcher.c: Avoid warnings when building, do not redefine
1196         constants that are defined.
1197
1198         Remove warnings.
1199
1200 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1201
1202         * image.c: don't fail when the link points to an absolute path.
1203
1204 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
1205
1206         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
1207         Fix CID #3.
1208
1209 2006-08-17  Miguel de Icaza  <miguel@novell.com>
1210
1211         * image.c (full_path): A new method used to obtain the actual path
1212         of an assembly even in the presence of symbolic links.  
1213
1214         This is necessary for the case where we are running a binary that
1215         has been GACed, but we are using the "published" path name
1216         ($prefix/mono/1.0/blah.exe) which happens to point to the real
1217         file in the GAC.
1218
1219         This was the source of the failure for the `xsp' command with the
1220         recent AppDomain changes, as far as the runtime was concerned,
1221         there were two different assemblies: $prefix/mono/1.0/blah.exe and
1222         $prefix/mono/gac/blah/version/blah.exe.
1223
1224         (do_mono_image_open): use full path
1225
1226 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
1227
1228         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
1229
1230 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
1231
1232         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
1233         domain_id is supplied. Fix CID #241 and corlib's unit tests.
1234
1235 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
1236
1237         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
1238         small structures. Fixes #78990.
1239
1240 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
1241
1242         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
1243
1244         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
1245
1246 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1247
1248         * appdomain.c:
1249         * marshal.c: don't load all the assemblies from a domain into newly
1250         created ones. The new domains might have different rules and load
1251         assemblies from different locations. Fixes bug #76757.
1252
1253         Patch by Lluis. Conflicts resolved by Brian Crowell.
1254
1255 2006-08-16  Alp Toker  <alp@atoker.com>
1256
1257         * socket-io.c: First half of the fix for #79084.
1258         Set sa_size to the length of the content, not that of the struct.
1259         Don't add NULL suffix to the content, this should be done in
1260         managed code if needed.
1261
1262 2006-08-14  Raja R Harinath  <rharinath@novell.com>
1263
1264         Fix part of #79012
1265         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
1266         mono_metadata_parse_type returns NULL.
1267
1268 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
1269
1270         * normalization-tables.h : new file for string normalization data.
1271         * locales.c, locales.h, icall.c :
1272           added load_normalization_resource() for string normalization,
1273           and icall as well.
1274         * Makefile.am : added normalization-tables.h to the sources.
1275
1276 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
1277
1278         * marshal.c: Add more helper functions to reduce code duplication and use them
1279         everywhere.
1280
1281 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
1282
1283         * marshal.c: Fix non-x86 stdcall warnings.
1284         
1285         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
1286         them everywhere.
1287
1288 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
1289
1290         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
1291         type check on multi-dimensional arrays. Fixes #79000.
1292
1293 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
1294
1295         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
1296         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
1297         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
1298         * class-internals.h: add is_com_object to class structure.
1299         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
1300         null checks to COM object marshalling. Fix .ctor call on RCW.
1301         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
1302         
1303         All code is contributed under the MIT/X11 license.
1304
1305 2006-08-09  Dick Porter  <dick@ximian.com>
1306
1307         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
1308         racing mono_monitor_allocator_lock() somewhere, so don't delete
1309         the critical section for now.  Found by running and exiting
1310         monodevelop.
1311
1312 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
1315         (ves_icall_System_ComObject_FindInterface): Ditto.
1316         (ves_icall_System_ComObject_CacheInterface): Ditto.
1317
1318         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
1319         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
1320
1321 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1322
1323         * threadpool.c: treat pipes from process asynchronous reads as sockets
1324         when reading from them, so we get select/poll or epoll to wait for
1325         data.
1326
1327 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
1328
1329         * loader.c: Fix a typo (CID #233) in the null check.
1330
1331 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
1332
1333         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
1334         Hopefully fixes #78949.
1335         
1336         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
1337         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
1338         bytes. Fixes #78972.
1339
1340 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1341
1342         * filewatcher.c: we need to set errno here.
1343
1344 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1345
1346         * filewatcher.c: let Win32Exception get the error value.
1347
1348 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1349
1350         * filewatcher.c: translate errno into win32 errors for Win32Exception
1351         to know what happened.
1352
1353 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
1354
1355         * threadpool.c: Fix more warnings.
1356
1357         * assembly.c (search_loaded): Fix warnings.
1358
1359         * threadpool.c (mono_thread_pool_finish): Fix warnings.
1360         (mono_async_invoke): Ditto.
1361
1362 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
1363
1364         * object.c (mono_remote_class_vtable): Need to create proxy vtable
1365         entries for __ComObject type in addition to ComImport types.
1366         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
1367         about hash table.
1368         
1369         All code is contributed under the MIT/X11 license.
1370
1371 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
1372
1373         * image.c: avoid tentative loading of modulerefs that contain
1374         no metadata (P/Invoke library names).
1375
1376 2006-07-28  Dick Porter  <dick@ximian.com>
1377
1378         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
1379         mono_loader_lock() somewhere, so don't delete the critical section
1380         for now.  Found by running and exiting monodevelop.
1381
1382 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1383
1384         * filewatcher.c: define the inotify syscalls when we're building on
1385         linux and have sys/syscall.h. The build system might not have support
1386         for inotify but the target system might have it.
1387
1388 2006-07-26  Miguel de Icaza  <miguel@novell.com>
1389
1390         * domain.c: Documentation updates.
1391
1392         * loader.c (mono_free_method): Do not release the method
1393         information if we are being profiled, as profilers will use this
1394         information at shut down to present some data to the user.
1395
1396         This is needed so that the profiler does not crash, as the
1397         profiler tends to keep MonoMethods around, and they might become
1398         invalid if we free these.
1399
1400         (mono_get_method_constrained): Return the original CIL stream
1401         method as well, so verification can be performed against it.
1402
1403 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1404
1405         * filewatcher.[ch]: support for inotify file system watcher.
1406         * icall.c: add new internal calls for the inotify file system watcher.
1407
1408 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1409
1410         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
1411         #78888.
1412
1413 2006-07-20  Dick Porter  <dick@ximian.com>
1414
1415         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
1416         warning.
1417
1418 2006-07-20  Dick Porter  <dick@ximian.com>
1419
1420         * threads.c (start_wrapper): Do the thread cleanup while we still
1421         hold a reference to its object.  Fixes bug 78123.
1422
1423 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
1424
1425         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
1426         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
1427           "managed-to-managed".
1428         * icall.c: Redirect string constructors that take sbyte* to
1429           ves_icall_System_String_ctor_RedirectToCreateString.
1430         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
1431           to CreateString () methods with matching signature.
1432         * reflection.c: Use original security informations for
1433           MONO_WRAPPER_MANAGED_TO_MANAGED.
1434         * security-manager.c: Use original security informations for
1435           MONO_WRAPPER_MANAGED_TO_MANAGED.
1436         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
1437           that is a placeholder and only its address should be used.
1438         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
1439           that is a placeholder and only its address should be used.
1440
1441 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
1442
1443         Begin implementing COM Interop.
1444         * appdomain.c: Increment corlib version.
1445         * class.c: Set ComImport classes' parent to __ComObject.
1446         * loader.c: Mark cominterop methods as such.
1447         * domain.c: Add __ComObject class to MonoDefaults structure.
1448         * image.c: Add 2 hashtables to the image for COM Interop related methods
1449         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
1450         using the mempool allocator
1451         
1452         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
1453         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
1454         declaration for mono_metadata_type_dup_mp.
1455         
1456         * debug-helpers.c: Added strings for two additional wrapper types
1457         * object.c: Create proxy objects for ComImport classes
1458         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
1459         and added __ComObject class to MonoDefaults structure.
1460         
1461         * object-internals.h: Finish MonoRealProxy definition, and add definition of
1462         MonoComInteropProxy and MonoComObject.
1463         
1464         * marshal.c: Added support for COM Interop
1465         (signature_cominterop): Converts managed signature to corresponding
1466         unmanaged COM signature.
1467         (cominterop_get_function_pointer): gets unmanaged function pointer via
1468         COM object vtable
1469         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
1470         (cominterop_get_method_interface): returns interface type that method is defined on
1471         (mono_mb_emit_cominterop_call): emits native call to function pointer
1472         gotten from vtable
1473         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
1474         that matches signature of unmanaged function.
1475         (cominterop_get_native_wrapper): wrapper around adjusted method call.
1476         (cominterop_get_invoke): forwards call from proxy to __ComObject
1477         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
1478         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
1479         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
1480         
1481         * marshal.h: Added Marshal icall declarations.
1482         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
1483         so we can access them in finalizer
1484         
1485 2006-07-14  Dick Porter  <dick@ximian.com>
1486
1487         * object.c (mono_type_initialization_cleanup): Fix a race
1488         condition by temporarily commenting out the critical section
1489         deletion.
1490
1491 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
1492
1493         * reflection.c (create_custom_attr): Fix some warnings.
1494         (create_custom_attr_data): Ditto.
1495         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
1496         types. Fixes #78855.
1497
1498 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
1499
1500         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
1501
1502         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
1503
1504 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
1505
1506         * reflection.c (resolve_object): Add support for DynamicMethod.
1507
1508         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
1509         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
1510
1511 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
1512
1513         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
1514         don't leak GPtrArray's pdata has we have no use (nor free) for it.
1515
1516 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
1517
1518         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
1519         Fixes #77888.
1520
1521 2006-06-30  Raja R Harinath  <rharinath@novell.com>
1522
1523         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
1524         slightly: remove a shadow local variable.
1525
1526 2006-06-29  Raja R Harinath  <rharinath@novell.com>
1527
1528         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
1529         definition that introduces the virtual function slot.
1530         Also fix Coverity #105.
1531
1532 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
1533
1534         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
1535         for dynamic assemblies. Fixes #78724.
1536
1537 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
1538
1539         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
1540         Fixes #78722.
1541
1542 2006-06-21  Martin Baulig  <martin@ximian.com>
1543
1544         * reflection.c
1545         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
1546         fixes #76484.
1547
1548 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
1549
1550         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
1551
1552 2006-06-20  Raja R Harinath  <rharinath@novell.com>
1553
1554         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
1555         nor TYPEREFs.
1556         * class.c (mono_class_create_from_typespec): Add 'context' argument.
1557         Inflate result if necessary.
1558         (mono_class_get_full): Remove old version.  Rename from
1559         'mono_class_get' and add 'context' argument.  Pass it to
1560         ..._create_from_typespec.
1561         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
1562         (mono_ldtoken): Revert change below.
1563
1564 2006-06-20  Martin Baulig  <martin@ximian.com>
1565
1566         * class.c (mono_ldtoken): Don't pass the generic context to
1567         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
1568
1569 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
1570
1571         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
1572         and later freeing it. Fixes #78638.
1573
1574 2006-06-15  Miguel de Icaza  <miguel@novell.com>
1575
1576         * icall.c (mono_class_get_throw): Revert over-zealous error
1577         throwing, the caller for mono_class_get_throw will cope with
1578         errors when classes are not properly initialized already.
1579
1580         The code still copes with loader exceptions though.
1581
1582         Fixes the regression in reftype1 and reftype3 from the CAS tests.
1583         
1584 2006-06-14  Miguel de Icaza  <miguel@novell.com>
1585
1586         Fixes the `make run1' version of RuntimeAbort (to be commited,
1587         source is in Bugzilla).
1588         
1589         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
1590         FALSE on class loading failure instead of returning true.
1591
1592         * class.c (mono_class_create_from_typedef): It is possible for
1593         mono_metadata_interfaces_from_typedef_full to fail if a class is
1594         not found, cope with this.
1595         
1596
1597 2006-06-14  Dick Porter  <dick@ximian.com>
1598
1599         * socket-io.c: 
1600         * process.c: Fix a bunch of signed/unsigned warnings from gcc
1601         4.1.1
1602
1603 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
1604
1605         * culture-info-table.h : oops, forgot to make it nsync with r61548.
1606
1607 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
1608
1609         * icall.c: Another fix for building mono in Visual Studio.
1610
1611 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
1612
1613         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
1614         
1615 2006-06-09  Martin Baulig  <martin@ximian.com>
1616
1617         * debug-mono-symfile.c: Put this back and really fix it this
1618         time. Sorry for all the trouble.
1619
1620 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
1621
1622         * icall.c (mono_class_get_throw): Fix a warning.
1623         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
1624         ReflectionTypeLoadException if needed. Fixes #78606.
1625
1626         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
1627         (mono_class_init): Ditto.
1628
1629         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
1630         ref_only exceptions.
1631         (mono_loader_clear_error): Make this work even if there is no error.
1632
1633 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
1634
1635         * object-internals.h marshal.c marshal.h icall.c: Implement method 
1636         Marshal.GetComSlotForMethodInfo using internal call.
1637
1638 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
1639
1640         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
1641         a function for signalling it.
1642
1643         * class.c (mono_class_from_typeref): Use the new kind of loader error when
1644         a referenced assembly is not found.
1645
1646         * loader.c (mono_loader_error_prepare_exception): Add support for 
1647         LOADER_ERROR_ASSEMBLY. Fix formatting.
1648
1649 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
1650
1651         * domain.c appdomain.c class-internals.h marshal.c: Add support 
1652         for VARIANT marshalling on windows and increment corlib version
1653         since Variant struct was added.
1654
1655 2006-06-03  Miguel de Icaza  <miguel@novell.com>
1656
1657         * debug-mono-symfile.c: Revert Martin's previous patch which broke
1658         stack trace line information:
1659
1660         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
1661         (Martin) when looking up B which is between A and C, return A not C.
1662
1663         Bug is #78573.
1664
1665         Thanks to Alexander Olk for tracking this down.
1666
1667 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
1668
1669         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
1670         
1671         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
1672         avoid clobbering its value.
1673         (mono_string_to_lpstr): Fix a warning on windows.
1674
1675 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
1676
1677         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
1678
1679         * reflection.c loader.c: Removed references to 'dummy' flag.
1680
1681         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
1682
1683         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
1684         it gets GC tracking.
1685
1686         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
1687         GC tracking.
1688         
1689         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
1690
1691         * marshal.c threadpool.c: Update callers of mono_async_result_new.
1692
1693         * appdomain.c: Bump corlib version.
1694
1695 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
1696
1697         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1698         CEE_STIND_REF when working with object references.
1699
1700 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
1701
1702         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
1703         Fixes #78539.
1704
1705 2006-05-30  Miguel de Icaza  <miguel@novell.com>
1706
1707         * loader.c (method_from_memberref): Fix argument value for
1708         mono_loader_set_error_method_load (I was passing the MonoClass
1709         instead of the class name char *).
1710
1711 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
1712
1713         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
1714         CEE_STIND_REF when working with object references.
1715
1716 2006-05-30  Martin Baulig  <martin@ximian.com>
1717
1718         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
1719         mono_method_full_name() change and replace the ':' with a '.'
1720         here.
1721
1722 2006-05-30  Martin Baulig  <martin@ximian.com>
1723
1724         * debug-mono-symfile.c
1725         (mono_debug_symfile_lookup_location): Fix the algorithm:
1726         when looking up B which is between A and C, return A not C.
1727
1728 2006-05-29  Martin Baulig  <martin@ximian.com>
1729
1730         * mono-debug.h
1731         (MonoDebugMethodInfo): Make the typedef public.
1732         (MonoDebugSourceLocation): New public struct.
1733
1734         * mono-debug.c
1735         (mono_debug_source_location_from_address): Removed.
1736         (mono_debug_source_location_from_il_offset): Removed.
1737         (mono_debug_il_offset_from_address): Removed.
1738         (mono_debug_address_from_il_offset): Removed.
1739         (mono_debug_lookup_method): New public function.
1740         (mono_debug_lookup_source_location): New public function; replaces
1741         the old mono_debug_source_location_from_*() functions; see the
1742         inline documentation.
1743         (mono_debug_free_source_location): New public function.
1744         (mono_debug_print_stack_frame): New public function; see the
1745         inline documentation.
1746
1747         * debug-mono-symfile.c
1748         (mono_debug_find_source_location): Renamed into
1749         mono_debug_symfile_lookup_location(); only take a
1750         `MonoDebugMethodInfo *' and an `offset' argument; added inline
1751         documentation.
1752         (mono_debug_find_method): Renamed into
1753         mono_debug_symfile_lookup_method().
1754
1755 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
1756
1757         * assembly.c (mono_assembly_open_full): Dont overwrite the status
1758         returned by mono_image_open_full ().
1759
1760         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
1761         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
1762         #78517.
1763
1764         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
1765         #78518.
1766
1767 2006-05-27  Miguel de Icaza  <miguel@novell.com>
1768
1769         * class.c (mono_class_from_typeref): handle missing images
1770         earlier, deals with bug #78418.   Refactor code; 
1771
1772         Fix a warning introduced in my previous commit (some stale code
1773         from before I revisited my patch).
1774
1775         * class.c (mono_class_create_from_typedef): On failure, remove the
1776         class from the MonoImage->class_cache as the class is not
1777         initialized;   Fixes the leak pointed out by Paolo.
1778
1779 2006-05-25  Dick Porter  <dick@ximian.com>
1780
1781         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
1782         DeleteCriticalSections until I figure out which one may still be
1783         sometimes locked when mono_thread_cleanup is called.
1784
1785 2006-05-24  Dick Porter  <dick@ximian.com>
1786
1787         * threads.c (mono_thread_cleanup): Move the threading cleanup out
1788         of mono_thread_manage and back into its own function, so it can be
1789         called after the finalizer thread has finished.
1790
1791         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
1792
1793 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
1794
1795         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
1796         Fixes #78495.
1797
1798         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
1799         with non-blittable elements.
1800         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
1801
1802 2006-05-24  Martin Baulig  <martin@ximian.com>
1803
1804         * mono-debug-debugger.h (MonoDebuggerEvent): Added
1805         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
1806
1807         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
1808         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
1809         `mono_debugger_event_handler' to NULL.
1810
1811 2006-05-24  Martin Baulig  <martin@ximian.com>
1812
1813         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
1814
1815 2006-05-24  Martin Baulig  <martin@ximian.com>
1816
1817         * mono-debug-debugger.h
1818         (mono_debugger_create_notification_function): Added
1819         `MonoCodeManager *' argument.
1820
1821 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
1822
1823         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
1824
1825 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
1826
1827         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
1828         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
1829         implementation.
1830
1831 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
1832
1833         * icall.c: precise GC support: objects can't be stored in unmanaged
1834         memory anymore, even if they are kept alive by other references: since
1835         they can move the GC needs to be able to always find them.
1836
1837 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
1838
1839         * object.c: precise GC support for static fields. Support
1840         for moving GCs: write barriers and pinned allocation for interned
1841         strings.
1842
1843 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
1844
1845         * domain.c, domain-internals.h: precise GC support for the MonoDomain
1846         structure.
1847
1848 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
1849
1850         * class.c, gc.c: sgen and precise GC updates.
1851
1852 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
1853
1854         * marshal.h, marshal.c: added write barrier wrapper and precise type
1855         fixes.
1856
1857 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
1858
1859         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
1860         support.
1861
1862 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
1863
1864         * reflection.c: precise and sgen GC updates.
1865
1866 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
1867
1868         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
1869
1870 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
1871
1872         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
1873
1874 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
1875
1876         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
1877         MONO_TYPE_OBJECT. Fixes #78462.
1878
1879 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
1880
1881         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
1882         and blittable types.
1883
1884 2006-05-17  Miguel de Icaza  <miguel@novell.com>
1885
1886         * class.c (mono_class_get_exception_for_failure): Implement parts
1887         of a TODO: if the loader error is set (instead of the class
1888         error), we return a Loader exception that can be properly thrown
1889         elsewhere.
1890
1891         This was exposed by some Winforms 2.0 code that I tried to run
1892         (Atsushi pointed me to it).
1893
1894 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
1895
1896         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
1897         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
1898         
1899         * marshal.c (emit_marshal_vtype): Add limited support for 
1900         UnmanagedType.LPStruct. Fixes #78427.
1901
1902         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
1903         Applied a patch from kangaroo to fix #77523.
1904
1905 2006-05-17  Martin Baulig  <martin@ximian.com>
1906
1907         * threads.c
1908         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
1909         (debugger_thread_created): Removed.
1910         (debugger_thread_exited): Removed.
1911
1912 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
1913
1914         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1915
1916         * object-internals.h (MonoReflectionResource): Sync with managed version.
1917
1918 2006-05-12  Wade Berrier <wberrier@novell.com>
1919
1920         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
1921
1922 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
1923
1924         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
1925         functions try to allocate from the image mempool.
1926
1927 2006-05-12  Dick Porter  <dick@ximian.com>
1928
1929         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
1930
1931 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
1932
1933         * object.c: The FieldGetter and FieldSetter methods require the full
1934         name of the class, not only the name. Fixes bug #78277.
1935
1936 2006-05-11  Miguel de Icaza  <miguel@novell.com>
1937
1938         * loader.c (method_from_memberref): Do not pass the NULL klass to
1939         mono_loader_set_error_() methods.  Pass the non-NULL value
1940         (class). 
1941
1942 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
1943
1944         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
1945         (mono_assembly_close): Null out assembly->image->references after freeing it.
1946
1947         * image.c (mono_image_close): Free image->references.
1948         
1949         * reflection.c (mono_image_basic_init): Fix a small memory leak.
1950
1951 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1952
1953         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
1954         before checking if it's NULL (g_assert).
1955
1956 2006-05-10  Martin Baulig  <martin@ximian.com>
1957
1958         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
1959         I thought I already killed that two months ago, but now it somehow reappeared.
1960
1961 2006-05-10  Martin Baulig  <martin@ximian.com>
1962
1963         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
1964
1965 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
1966
1967         * reflection.c: Allocate memory for dynamically created methods in the image
1968         mempools.
1969
1970 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
1971
1972         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
1973         don't use the ad pointer before checking if it's NULL (g_assert).
1974
1975 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
1976
1977         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
1978         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
1979
1980         * marshal.c: Allocate all signatures from mempools.
1981
1982         * marshal.c: Allocate some more signatures from mempools.
1983
1984 2006-05-09  Miguel de Icaza  <miguel@novell.com>
1985
1986         * object.c (mono_load_remote_field): The code used to provide a
1987         temporary variable for returning results if the user did not
1988         provide a result pointer.  But our temporary variable was allocted
1989         on the satck.
1990
1991         Fix calling code to always pass a result area.   Coverity ID 103.
1992
1993 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
1994
1995         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
1996         value, not the old. Fixes #78312.
1997         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
1998
1999         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
2000         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
2001         per-image cache.
2002
2003         * assembly.c (mono_assembly_close): Free image->references.
2004
2005         * assembly.c (mono_assembly_names_equal): Fix a warning.
2006         (mono_assemblies_cleanup): Cleanup more global data.
2007
2008         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
2009
2010         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
2011         ptr_cache and image->modules.
2012
2013         * image.c (mono_image_init): Allocate array_cache lazily.
2014         
2015 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2016
2017         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
2018         behavior was changed recently and has bad side effects.
2019
2020 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
2021
2022         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
2023         
2024         * assembly.c (mono_assembly_close): Remove a debug printf.
2025
2026         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
2027
2028         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
2029         to also allow for temporary references between mono_image_open ()/close ().
2030
2031         * domain.c (get_runtimes_from_exe): Add a FIXME.        
2032
2033 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
2034
2035         * marshal.c: Fix support for dynamic methods.
2036
2037         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
2038
2039         * marshal.c (mono_marshal_cleanup): New cleanup function.
2040
2041         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
2042         image mempools.
2043
2044         * class.c (mono_class_init): Fix leaking class->nested_classes.
2045
2046         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
2047
2048         * image.c (mono_image_init): Initialize the new cashes.
2049
2050         * image.c (mono_image_close): Destroy the new cashes.
2051
2052         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
2053
2054         * mempool.c (mono_mempool_strdup): New helper function.
2055
2056         * class-internals.h: Add prototype for mono_loader_unlock ().
2057
2058         * domain.c (mono_jit_info_table_find): Fix a warning.
2059         (mono_debugger_check_runtime_version): Ditto.
2060
2061         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
2062         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
2063         functions to these modules.
2064
2065         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
2066         metadata modules.
2067         
2068         * marshal.c (mono_free_bstr): Fix a warning.
2069
2070         * assembly.c (mono_assembly_open_full): Fix another small leak.
2071
2072         * object.c: Fix some unload leaks in the remoting code.
2073
2074         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
2075         function.
2076
2077         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
2078
2079         * reflection.c: Fix some unload leaks in dynamic assemblies.
2080
2081 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
2082
2083         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
2084         * marshal.h: Add BSTR support on Win32
2085         * icall.c: Add BSTR icalls
2086         * metadata.h: Add BSTR enums
2087
2088 2006-04-28  Miguel de Icaza  <miguel@novell.com>
2089
2090         Work to catch the crash from #76795 and turn it into an
2091         exception.   As I stubbed out pieces of the VisualBasic support,
2092         I found a number of places where the code was failing and I added
2093         checks to those places. 
2094         
2095         * metadata.c (do_mono_metadata_parse_generic_class): Make this
2096         function return a status code.  If we fail to parse the signature
2097         from mono_metadata_parse_generic_inst, return FALSE.
2098
2099         * loader.c (mono_get_method_from_token): If we fail to load the
2100         method (mono_class_get) return NULL.   
2101
2102         * (method_from_memberref): Return NULL if we are unable to parse
2103         the method signature
2104
2105         (mono_loader_error_prepare_exception): Since we now use the
2106         loader_error flag internally to stop processing, and obtaining
2107         exceptions that might be thrown will walk this code path the
2108         proper way of going from a MonoLoaderError into a
2109         MonoException was convoluted.   This new routine encapsulates the
2110         process of turning the error into an exception and *clearing* the
2111         error afterwards.
2112         
2113 2006-04-27  Miguel de Icaza  <miguel@novell.com>
2114
2115         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
2116         with missing assemblies), and to cope with:
2117
2118                 * Missing fieldref from a non-existing assembly.
2119                 * Missing methodref from a non-existing assembly.
2120
2121         The first batch of work to address *some* of the issues from 76661.
2122         
2123         * object.c (mono_class_create_runtime_vtable): If we fail to
2124         initialize the class raise the exception here. 
2125
2126         * metadata.c (mono_class_get_overrides_full): If any methods fail
2127         to load return the failure to the caller.
2128
2129         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
2130         flagging assemblies that failed to load.   
2131
2132         Do not crash if we are unable to load the assembly.
2133
2134         (mono_assembly_close): Do nothing with REFERENCE_MISSING
2135         assemblies. 
2136
2137         * loader.c (mono_loader_set_error_type_load): Change the
2138         convention to always pass unallocated strings, so we make our own
2139         copies (I know our own code had duplicated strings before, but
2140         this keeps the normal conventions).
2141         (method_from_memberref): Call mono_loader_set_error_method_load
2142         for all possible failures of loading the class. 
2143         Remove assert, turn into a loader error.
2144
2145         (mono_loader_error_to_exception): Move this routine from mini
2146         (mini_loader_error_to_exception) there was no need to have that in
2147         mini. 
2148
2149         * class.c (mono_class_from_typeref): If we were not able to load
2150         the assembly with mono_assembly_load_reference, call the
2151         mono_loader_set_error_type_load to register the problem.
2152
2153         (mono_class_setup_fields): If we fail to load the type from
2154         mono_metadata_parse_type_full, call mono_class_set_failure and
2155         break from the loop.
2156
2157         If class->exception_type is set, we do not layout the fields as
2158         that might crash the runtime, and instead return (from breaking
2159         from the previous loop).
2160
2161         (mono_class_setup_vtable): This now returns a boolean indicating
2162         whether the table was properly setup.   The decision is driven by
2163         mono_class_get_overrides_full which might run into non-existing
2164         methods. 
2165         
2166         (mono_class_init): Returns TRUE on success or FALSE if there was a
2167         problem in loading the type (incorrect assemblies, missing
2168         assemblies, methods, etc).
2169
2170         When we call mono_class_setup_fields we also check for a potential
2171         error inside this call (either a class exception or a general
2172         loader exception).
2173
2174         (mono_class_create_from_typedef): If the parent fails to load
2175         (calling mono_class_get_full) return NULL.
2176         
2177         ** Important **
2178
2179         calls to mono_metadata_parse_type_full should be checked
2180         everywhere and set the mono_class_set_failure
2181         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
2182
2183         The current patch checks the places where my manually constructed
2184         tests show the errors are showing up, but we should do it
2185         everywhere. 
2186
2187         ** Important2 **
2188
2189         mono_class_init return values should be tested everywhere, like
2190         the previous case this is something that we should audit
2191         everywhere and not only on the cases exposed by the tests I
2192         created. 
2193
2194 2006-04-26  Miguel de Icaza  <miguel@novell.com>
2195
2196         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
2197         boolean parameter and instead pass the information on `options'
2198         parameter (FileOptions).
2199
2200         * icall.c: Register the new signature for MonoIO.Open.
2201
2202         * debug-helpers.c (dis_one): Trying to understand how coverity
2203         works.  Fix Run 5, item 78.
2204
2205 2006-04-26  Dick Porter  <dick@ximian.com>
2206
2207         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
2208         dereference.
2209
2210 2006-04-25  Martin Baulig  <martin@ximian.com>
2211
2212         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
2213
2214         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
2215         debugger_thread_created().
2216         (debugger_gc_push_all_stacks): Don't handle the main thread in any
2217         special way.
2218         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
2219         (mono_debugger_finalize_threads): New function; undo the effects
2220         of mono_debugger_init_threads().
2221         (mono_debugger_create_all_threads): Removed.
2222
2223 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
2224
2225         * image.c (mono_image_close): Tidy up trace messages.
2226
2227         * assembly.c (mono_assembly_close): Ditto.
2228
2229         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
2230         no longer references an already freed assembly. Fixes #78168.
2231
2232 2006-04-21  Dick Porter  <dick@ximian.com>
2233
2234         * threads.c (mono_thread_detach): Fix reference counting when
2235         detaching threads.
2236
2237 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
2238
2239         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
2240         #78155.
2241
2242 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
2243
2244         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
2245         (mono_type_to_stind): Ditto.
2246
2247         * marshal.c: Use the new helper functions to simplify code.
2248
2249         * image.c (mono_image_close): Add some code for help debug assembly unloading
2250         problems.
2251
2252         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
2253         image mempool.
2254
2255         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
2256         assembly was already loaded in another appdomain. Fixes #78083.
2257
2258 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
2259
2260         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
2261         referenced assemblies.
2262         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
2263
2264         * domain.c (mono_domain_free): Add a trace message.
2265
2266         * appdomain.c (add_assemblies_to_domain): Ditto.        
2267
2268         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
2269         field.  
2270
2271 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
2272
2273         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
2274
2275 2006-04-12  Martin Baulig  <martin@ximian.com>
2276
2277         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
2278         `USE_INCLUDED_LIBGC'.   
2279
2280 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
2281
2282         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
2283         the patch contains ../ and a small directory name later. Hopefully fixes
2284         #78035.
2285
2286 2006-04-10  Martin Baulig  <martin@ximian.com>
2287
2288         Clean up the debugger's thread-handling code.
2289
2290         The debugger's thread-handling code has been moved from
2291         ../mini/debug-debugger.c to threads.c.  We now iterate directly
2292         over the `threads' hash, keep track of exiting threads and also
2293         use proper locking.
2294
2295         We can now debug XSP and XSP based applications with the debugger.
2296
2297         * object-internals.h (MonoThread): Added `gpointer end_stack'.
2298
2299         * threads.h
2300         (MonoThreadCallbacks): Removed; this was only used by the debugger.
2301         (mono_install_thread_callbacks): Likewise.      
2302
2303         * threads.c (mono_thread_callbacks): Removed.
2304         (debugger_thread_created, debugger_thread_exited): New static functions.
2305         (start_wrapper): Call debugger_thread_created().
2306         (thread_cleanup): Call debugger_thread_exited().
2307         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
2308         (mono_debugger_init_threads): New public function.
2309         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
2310         iterate directly over the `threads' hash and also use proper locking.
2311
2312         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
2313
2314         * mono-debug-debugger.h
2315         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
2316
2317 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
2318
2319         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
2320         argument type=array. Fixes #78057.
2321
2322 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
2323
2324         * culture-info-table.h : regenerated. Fixed bug #69652.
2325
2326 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
2327
2328         * loader.c metadata.c: Reapply a variant r59116.
2329         
2330         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
2331
2332         * class.c (mono_class_setup_interface_offsets): New internal function.
2333
2334         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
2335         interfaces too. Fixes #77398.
2336
2337         * reflection.c (encode_cattr_value): Add support for 
2338         parameter type=object, argument type=array.
2339         (load_cattr_value): Ditto. Fixes #77916.
2340
2341         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
2342         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
2343
2344         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
2345         a byval char array and CharSet is Ansi.
2346
2347         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
2348
2349 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
2350
2351         * metadata.c: Add some locking comments.
2352         
2353         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
2354         mempool.
2355         (mono_metadata_free_method_signature): Don't free the signature itself.
2356
2357         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
2358
2359         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
2360         reference the same MonoImage.
2361         (mono_assembly_load_from_full): Add an assert.
2362
2363 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
2364
2365         * image.c (mono_image_close): Don't put the image we are about to free into the
2366         loaded_images_guid_hash.
2367
2368         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
2369         to reduce code duplication.
2370
2371         * marshal.c: Register the native functions called by this module as icalls, to
2372         somewhat centralize the creation of MonoMethodSignature's.
2373
2374         * loader.c (mono_method_signature): Add a cache for method signatures.
2375
2376         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
2377         the parameter attributes of a method.
2378         (mono_metadata_parse_method_signature_full): Refactored the computation of
2379         parameter attributes into a separate function. Also avoid one allocation in
2380         most cases.
2381
2382         * assembly.c (mono_assembly_close): Ditto.
2383
2384         * image.c (mono_image_close): Log trace messages with INFO level.
2385
2386         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
2387
2388         * image.c reflection.c: Correct reference counting of image modules.
2389         
2390         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
2391         of this function from the image mempool.
2392         
2393         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
2394         to allow more cached types to be used.
2395
2396         * mono-debug.c (mono_debug_add_method): Appled patch from
2397         David S. Miller  <davem@sunset.davemloft.net>: Access 
2398         minfo->lexical_blocks[] entry elements using read32().
2399
2400 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
2401
2402         * loader.c (mono_free_method): No longer free the method header for non-dynamic
2403         methods as it is allocated from the mempool.
2404
2405         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
2406         image mempool.
2407
2408         * metadata-internals.h: Add comments describing the reference counting scheme
2409         used for MonoImage and MonoAssembly.
2410
2411         * image.c assembly.c reflection.c: Rework reference counting of images and 
2412         assemblies so they are freed when the runtime is shut down. Free some 
2413         additional memory structures when an image is unloaded.
2414         
2415 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
2416
2417         * class.c loader.c reflection.c: Allocate more data structures in
2418         the image mempool.
2419
2420 2006-03-31  Miguel de Icaza  <miguel@novell.com>
2421
2422         * icall.c
2423         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
2424         build on pre glib 2.4 systems.
2425
2426 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
2427
2428         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
2429
2430         * icall.c: Fix some warnings.
2431
2432 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
2433
2434         * culture-info-table.h : regenerated.
2435
2436 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
2437
2438         * threads.c, object-internals.h, verify.c: changed the culture caching
2439         code to use a normal MonoArray for storage so the GC can keep track of
2440         them easily. Fixed bits of the cache logic, too and simplified the
2441         code.
2442
2443 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
2444
2445         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
2446         thread for non-Boehm GCs.
2447
2448 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
2449
2450         * domain.c, object.c, domain-internals.h: reduce the amount of memory
2451         needed to keep track of the data for static fields.
2452
2453 2006-03-29  Raja R Harinath  <rharinath@novell.com>
2454
2455         Fix #75172
2456         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
2457         for interface classes.  Use 'num_methods' instead.
2458         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
2459         before using '->vtable_size' field.
2460
2461 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
2462
2463         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
2464         doesn't contain managed pointers, so use a normal hashtable.
2465
2466 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
2467
2468         * reflection.c, class-internals.h, domain.c: fixed handling of types
2469         used as values for objects in custom attributes (bug #77915):
2470
2471 2006-03-24  Martin Baulig  <martin@ximian.com>
2472
2473         * class.c (mono_class_setup_fields): Added support for generic
2474         instances; fixes #77580.
2475
2476 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2477
2478         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
2479
2480 2006-03-24  Dick Porter  <dick@ximian.com>
2481
2482         * file-io.c (get_file_attributes): More stat macro breakage.
2483         Fixes bug 77759.
2484
2485 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
2486
2487         * profiler.c: added the file=filename option in the default profiler
2488         to output the profile data to filename.
2489
2490 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2491
2492         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
2493         bug #77877.
2494
2495 2006-03-22  Martin Baulig  <martin@ximian.com>
2496
2497         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
2498         allocated `MonoClassField *' in `fb->handle'.
2499
2500 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2501
2502         * class.c, image.c, metadata-internals.h: implemented new mechanism to
2503         allocate interface ID to save memory and allow better ID reuse on
2504         appdomain unload. setup_generic_vtable () removal from Martin.
2505
2506 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2507
2508         * object.h, appdomain.c, domain.c, exception.c, icall.c,
2509         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
2510         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
2511         write barriers for reference stores with managed objects accessed with
2512         C structures in the runtime and in embedding programs.
2513
2514 2006-03-20  Raja R Harinath  <rharinath@novell.com>
2515
2516         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
2517         'interface_id' and 'max_interface_id' fields of MonoClasses
2518         representing open generic types.
2519
2520 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
2521
2522         * object.h, object.c, icall.c: added functions to deal with
2523         storing valuetypes that contain references in managed objects.
2524         * reflection.c, string-icalls.c, threads.c, marshal.c: small
2525         fixes and comments around uses of mono_array_addr ().
2526
2527 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
2528
2529         * object.h, icall.c, monitor.c: object.GetHashCode ()
2530         implementation that supports the moving garbage collector.
2531
2532 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
2533
2534         * icall.c, threads-types.h, threads.c: implemented finalizer for
2535         LocalDataStoreSlot.
2536
2537 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
2538
2539         * metadata.c (mono_type_size): Add a fixme.
2540         (mono_type_stack_size): Ditto.
2541
2542         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
2543         'type_forwarders' field.
2544
2545         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
2546         attribute from net 2.0.
2547
2548         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
2549         from class.c.
2550
2551         * class.c (mono_class_setup_fields): Fix a warning.
2552         
2553         * class.c (mono_class_from_name): Add support for assemblyref entries
2554         in the EXPORTEDTYPE table.
2555
2556         * reflection.c: Add support for handling type forwarders under net 2.0.
2557
2558         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
2559         
2560 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
2561
2562         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
2563         overwriting entries in ModuleBuild->types, also clean up the code
2564         a little. Fixes #77774.
2565
2566 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
2567
2568         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
2569         load friend assembly info when present.
2570
2571 2006-03-14  Raja R Harinath  <rharinath@novell.com>
2572
2573         Fix crasher on gtest-158.cs.
2574         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
2575         the return value if the MonoClass we want is yet in an
2576         inconsistent state.
2577         * class.c (mono_class_create_from_typedef): Add an comment
2578         explaining an order dependency between mono_class_setup_parent and
2579         mono_class_setup_mono_type.
2580
2581 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
2582
2583         * class.c: documentation updates and events bug fix.
2584
2585 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
2586
2587         * class.c: some cleanup, locking fixes.
2588
2589 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2590
2591         * class.c: fix the generics code to setup nested
2592         type info to the instantiated type (bug #77770).
2593
2594 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
2595
2596         * marshal.c: fixed a few type correctness issues.
2597
2598 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2599
2600         * loader.c: the Set/Get/Addrtess array methods should be public.
2601
2602 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
2603
2604         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
2605         
2606         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
2607         info->wrapper.
2608
2609 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
2610
2611         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
2612
2613         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
2614
2615         * mempool.c (mono_mempool_alloc): Speed this up a bit.
2616         (mono_mempool_alloc0): Ditto.
2617
2618 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2619
2620         * socket-io.c:
2621         (create_object_from_sockaddr): it was allocating 4 extra bytes
2622         for the AF_UNIX data. Fixes bug #77747.
2623
2624 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
2625
2626         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
2627
2628 2006-03-09  Dick Porter  <dick@ximian.com>
2629
2630         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
2631         Fixes bug 76966 again.
2632
2633 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
2634
2635         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
2636         names from r57532
2637         * appdomain.c: Bumped corlib version to 48 (due to r57532)
2638
2639 2006-03-07  Martin Baulig  <martin@ximian.com>
2640
2641         * object.c
2642         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
2643
2644 2006-03-07  Martin Baulig  <martin@ximian.com>
2645
2646         * class.c
2647         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
2648         regression introduced in r56970; see gtest-252.cs.
2649
2650         * loader.c (mono_get_method_constrained): Correctly handle generic
2651         methods; see gtest-253.cs.
2652
2653 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
2654
2655         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
2656
2657 2006-03-04  Martin Baulig  <martin@ximian.com>
2658
2659         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
2660         compute the parent type at runtime, just like we're already doing
2661         it for interfaces.
2662
2663         * reflection.c
2664         (mono_reflection_bind_generic_parameters): Don't compute the
2665         parent type anymore.
2666
2667         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
2668
2669 2006-03-04  Martin Baulig  <martin@ximian.com>
2670
2671         * mono-debug-debugger.h
2672         (mono_debugger_create_notification_function): Allocate memory at
2673         runtime and return a pointer to it.
2674
2675 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
2676
2677         * assembly.c: Fix windows build.
2678         
2679         * assembly.c: Fix build.
2680
2681         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
2682
2683         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
2684         
2685 2006-03-03  Dick Porter  <dick@ximian.com>
2686
2687         * process.c
2688         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2689         Check parameters before dereferencing them.  Fixes Aaron's part of
2690         bug 77393.
2691
2692 2006-03-03  Raja R Harinath  <rharinath@novell.com>
2693
2694         Fix performance regression.
2695         * loader.c (find_method_in_class): Add 'from_class' argument.
2696         Rename 'klass' argument to 'in_class'.  The signature is compared
2697         against the method in 'in_class', and the corresponding method is
2698         returned from 'from_class'.
2699         (find_method): Walk both 'in_class' and 'from_class' in parallel.
2700         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
2701         type definition and generic instantiation in parallel.
2702         (mono_get_method_constrained): Update to changes.
2703
2704 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
2705
2706         * threads.c: make sure the domain is correct, too when doing
2707         mono_thread_attach ().
2708
2709 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
2710
2711         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
2712         windows. Fixes #77683.
2713
2714 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
2715
2716         * object.h, *: introduced specific way to set elements of an array
2717         of references to be used as write barrier. Still need to audit the
2718         uses of mono_array_addr.
2719
2720 2006-03-01  Miguel de Icaza  <miguel@novell.com>
2721
2722         * object-internals.h: New field to cache the assmebly name, patch
2723         from Tambet Ingo (tambet@ximian.com)
2724
2725 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
2726
2727         * decimal.h, class-internals.h, metadata-internals.h,
2728         file-io.h: mark a few function declarations as internal, to
2729         reduce the number of PLT entries.
2730
2731 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2732
2733         * file-io.c: fix typo in warning message.
2734
2735 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
2736
2737         * loader.c: on unix, lookup the "*A" version of a function
2738         if charset is auto as a second option before failing.
2739
2740 2006-02-28  Raja R Harinath  <rharinath@novell.com>
2741
2742         * class.h (mono_class_inflate_generic_method): Revert to two
2743         argument version.
2744         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
2745         (mono_class_inflate_generic_method_full): Add.
2746         * class.c (mono_class_inflate_generic_method_full): Rename from
2747         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
2748         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
2749         * loader.c, reflection.c: Update to changes.
2750
2751 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
2752
2753         * icall.c: const fixes and small improvements.
2754
2755 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2756
2757         * threadpool.c: for asynchronous connect(), enable the same workaround
2758         for BSD 6 as for the Mac. Fixes bug #77637.
2759
2760 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
2761
2762         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
2763         formatted classes. Fixes #77524.
2764
2765 2006-02-24  Raja R Harinath  <rharinath@novell.com>
2766
2767         * class.c (inflate_generic_type): Add a couple more
2768         micro-optimizations.
2769         (inflate_generic_context): Don't use the 'gmethod' from
2770         'inflate_with'.
2771         (mono_class_inflate_generic_method): If the method has generic
2772         parameters, but the passed-in context doesn't have a 'gmethod',
2773         create one.  Use the possibly simplified generic instantiation
2774         from the declaring class instead of the one passed in.
2775
2776 2006-02-24  Raja R Harinath  <harinath@gmail.com>
2777
2778         Make generic method signature and method header handling lazy.
2779         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
2780         (inflate_generic_header): Likewise.
2781         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
2782         parameter to avoid inflating types.
2783         (mono_get_inflated_method): Empty out.
2784         * class.h (mono_class_inflate_generic_method): Update to changes.
2785         * loader.c (mono_get_method_from_token): Don't parse signature for
2786         generic methods, nor methods of generic classes.
2787         (mono_method_signature): Rename from 'mono_method_signature'.
2788         Inflate signature on demand.
2789         (mono_method_get_header): Inflate method header on demand.
2790         * reflection.c: Update to changes.
2791
2792 2006-02-23  Raja R Harinath  <rharinath@novell.com>
2793
2794         * metadata.c (mono_metadata_inflate_generic_inst): If the
2795         instantiation is closed, don't bother expanding it in the new
2796         context.
2797         * class.c (inflate_generic_class): If the generic instantiation
2798         doesn't change after inflation, return the argument itself.
2799         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
2800         Add bounds checks.
2801         (inflate_generic_context): If neither the generic class nor the
2802         generic method instantiations change, return the original context.
2803         * reflection.c (mono_method_get_object): Do
2804         'mono_get_inflated_method' before accessing the ->klass field.
2805         (inflate_mono_method): Don't create a MonoGenericMethod unless
2806         necessary.
2807         (inflate_method): Don't pass a constructed type as the declaring
2808         type of a methodbuilder.
2809
2810 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
2811
2812         * object.c: fix memory overwrite.
2813
2814 2006-02-22  Dick Porter  <dick@ximian.com>
2815
2816         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
2817         it doesn't work any more.
2818         (mono_threads_request_thread_dump): Fix unused variable warnings.
2819
2820 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2821
2822         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
2823         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
2824         the public header file.
2825
2826 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
2827
2828         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
2829
2830 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2831
2832         * class-internals.h, object.c: reduce the size of MonoVTable
2833         and store the interface_offsets array at negative offsets.
2834
2835 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
2836
2837         * metadata.c: tweak table descriptors data structures to reduce
2838         size and runtime relocations.
2839
2840 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2841
2842         * marshal.c: fix some types and opcodes to be type-safe
2843         in marshaling wrappers.
2844
2845 2006-02-21  Ankit Jain  <jankit@novell.com>
2846
2847         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
2848
2849 2006-02-21  Raja R Harinath  <rharinath@novell.com>
2850
2851         * metadata.c (get_constraints): Relax debugging checks for monodis.
2852
2853 2006-02-21  Ankit Jain  <jankit@novell.com>
2854
2855         * metadata.c (mono_metadata_load_generic_params): Move the code
2856         checking for ambiguous generic params from here to mono/dis/get.c
2857         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
2858
2859 2006-02-21  Raja R Harinath  <harinath@gmail.com>
2860
2861         Fix assertion triggered when compiling nemerle.
2862         * class.c (mono_get_shared_generic_inst): Rename from
2863         get_shared_inst and make non-static.
2864         * loader.c (mono_get_shared_generic_method): New.  Used to create
2865         the MonoGenericContext-equivalent of a MonoGenericContainer.
2866         (mono_get_method_from_token): Initialize the 'context' field of
2867         the created MonoGenericContainer.
2868         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
2869         * metadata.c (get_constraints): Add sanity check.
2870         * class-internals.h: Add new internal methods.
2871
2872         * reflection.c (verify_safe_for_managed_space): New sanity check.
2873         Currently checks that owner-less generic parameters aren't allowed
2874         in managed space.
2875         (mono_type_get_object): Use it.
2876         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
2877         that are now in mono_type_get_object.
2878         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
2879
2880 2006-02-19  Raja R Harinath  <harinath@gmail.com>
2881
2882         * metadata.c (mono_type_create_from_typespec): Rename from
2883         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
2884         argument and caching of types in the generic container.
2885         (unwrap_arrays, find_generic_param): Remove.
2886         * metadata-internals.h: Update.
2887         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
2888
2889 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
2890
2891         * class.c (mono_class_get_exception_for_failure): Fix a warning.
2892
2893         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
2894         return values. Fixes #77581.
2895
2896         * class.c (mono_fnptr_class_get): Switch name and name_space.
2897
2898         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
2899         classes and add support for [In, Out] attributes.
2900         (mono_marshal_free_asany): Ditto. Fixes #77524.
2901
2902 2006-02-18  Raja R Harinath  <harinath@gmail.com>
2903
2904         * class.c (mono_class_from_generic_parameter): Make more robust to
2905         incomplete MonoGenericContainers from monodis.
2906
2907 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
2908
2909         * class-internals.h: added some more exception types.
2910         * class.c, metadata.c: added a few checks to handle missing
2911         types.
2912
2913 2006-02-17  Raja R Harinath  <rharinath@novell.com>
2914
2915         Use owner-less generic-params some more.
2916         * class.c (my_mono_class_from_generic_parameter): Remove.
2917         (mono_class_from_generic_parameter): Handle null image,
2918         param->name and param->owner.
2919         (mono_class_from_mono_type): Update.
2920         (mono_class_create_from_typespec): Remove 'container' parameter.
2921         If that parameter is non-null, the result is always inflated by
2922         'mono_class_get_full' anyway.
2923         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
2924         parameter.
2925         (mono_class_get_full): Update.
2926
2927         * class.c (inflate_generic_type) [GENERICINST]: If the generic
2928         instance is not open, don't bother inflating.
2929         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
2930         parse metadata for inflated classes.
2931         (_mono_class_get): Change GenericContext* parameter to
2932         GenericContainer*.
2933         (mono_class_create_from_typespec): Likewise.  Simplify, and
2934         implement trivially.  All the cases are handled in
2935         mono_class_from_mono_type.  Don't inflate returned class.
2936         (mono_class_get_full): Delegate GENERICINST optimization to
2937         inflate_generic_type.
2938         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
2939
2940 2006-02-16  Dick Porter  <dick@ximian.com>
2941
2942         * socket-io.c (create_object_from_sockaddr): Fix typo.
2943         (create_sockaddr_from_object): Check array lengths before
2944         potentially accessing items off the end.
2945         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
2946         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
2947         (ves_icall_System_Net_Sockets_Socket_Send_internal)
2948         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
2949         length checks to avoid wraparound overflows.
2950         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
2951         contents of the array of sockets
2952         (hostent_to_IPHostEntry2)
2953         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
2954         Check return value of inet_ntop ().
2955         (addrinfo_to_IPHostEntry): Fix typo
2956
2957 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2958
2959         Type metadata parsing doesn't use generic-instantiation information.
2960         * metadata.c (mono_metadata_parse_array_full): Change
2961         MonoGenericContext* parameter to MonoGenericContainer*.
2962         (mono_metadata_parse_type_full): Likewise.
2963         (mono_type_create_from_typespec_full): Likewise.
2964         (mono_metadata_parse_mh_full): Likewise.
2965         (mono_metadata_parse_generic_inst): Likewise.
2966         (do_mono_metadata_parse_generic_class): Likewise.
2967         (do_mono_metadata_parse_type): Likewise.
2968         * metadata-internals.h: Update to changes.
2969         * class.c (mono_class_find_enum_basetype): Likewise.
2970         (mono_class_setup_fields): Likewise.
2971         (mono_class_create_from_typespec): Likewise.
2972         * loader.c (method_from_methodspec): Likewise.
2973         (mono_get_method_from_token): Likewise.
2974         (mono_method_get_header): Likewise.
2975
2976 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2977
2978         * marshal.c: handle additional GENERICINST case (patch from
2979         Thong Nguyen <tum@veridicus.com>).
2980         Fix a few cases where LDIND_I/STIND_I was used for references.
2981
2982 2006-02-16  Raja R Harinath  <rharinath@novell.com>
2983
2984         * reflection.c (mono_reflection_get_token): Remove unused variable.
2985
2986 2006-02-16  Martin Baulig  <martin@ximian.com>
2987
2988         * reflection.c (mono_reflection_get_token): Add support for fields
2989         in instantiated generic types.
2990
2991         * icall.c
2992         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
2993
2994 2006-02-15  Martin Baulig  <martin@ximian.com>
2995
2996         * icall.c
2997         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
2998         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
2999         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
3000         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
3001
3002 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
3003
3004         * class.c, metadata.c, metadata.h, object.c, icall.c,
3005         marshal.c: changed mono_type_get_underlying_type () to do
3006         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
3007         Fixed handling of instantiated generic valuetypes (bug #75479).
3008
3009 2006-02-15  Raja R Harinath  <rharinath@novell.com>
3010
3011         * metadata.c (mono_metadata_decode_signed_value): Simplify.
3012         Delegate to mono_metadata_decode_value, and work on the returned value.
3013
3014         * icall.c (ves_icall_MonoType_GetGenericArguments):
3015         Add consistency check here too.
3016         
3017 2006-02-15  Ankit Jain  <jankit@novell.com>
3018
3019         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
3020         char/short etc.
3021
3022 2006-02-15  Ankit Jain  <jankit@novell.com>
3023
3024         * metadata.c (mono_metadata_decode_signed_value): New function to decode
3025         signed values, used only for representing lower bounds of arrays.
3026         (mono_metadata_parse_array_full): Use new
3027         mono_metadata_decode_signed_value to decode lower bounds.
3028
3029 2006-02-14  Martin Baulig  <martin@ximian.com>
3030
3031         * reflection.c
3032         (mono_reflection_get_token): Support "MonoGenericMethod" and
3033         "MonoGenericCMethod" and allow generic instances / methods.
3034
3035 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
3036
3037         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
3038         to obtain the terminal size using an ioctl.
3039
3040         * object.c (mono_nullable_init): Revert this as nullable reference
3041         types are not valid.
3042         (mono_nullable_box): Ditto.
3043
3044 2006-02-09  Dick Porter  <dick@ximian.com>
3045
3046         * threads.c (mono_thread_detach): Drop a reference to the thread
3047         we're detaching.
3048
3049 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
3050
3051         * object.c (mono_nullable_init): Handle nullable reference types.
3052         (mono_nullable_box): Ditto. Fixes #77446.
3053
3054 2006-02-07  Martin Baulig  <martin@ximian.com>
3055
3056         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
3057
3058 2006-02-07  Ankit Jain  <jankit@novell.com>
3059
3060         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
3061         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
3062         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
3063         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
3064         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
3065         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
3066
3067 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
3068
3069         * class.c (mono_class_create_generic): Set type_token as well.
3070
3071         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
3072         compatible with MS.
3073
3074 2006-02-02  Martin Baulig  <martin@ximian.com>
3075
3076         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
3077         has never been used so far.
3078
3079 2006-02-02  Martin Baulig  <martin@ximian.com>
3080
3081         * mono-debug-debugger.h: Changed comment at the top of this file;
3082         the header is not installed, but it's safe to #include it from
3083         within the JIT.
3084
3085         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
3086         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
3087
3088 2006-02-02  Martin Baulig  <martin@ximian.com>
3089
3090         * mono-debug.h
3091         (MonoSymbolTable): Removed the `metadata_info' field.
3092
3093         * mono-debug.c
3094         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
3095
3096         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
3097         (mono_debugger_add_builtin_types): Removed.
3098         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
3099         (mono_debugger_create_notification_function): We now operate on a
3100         pre-allocated area; take a `gpointer' and return `void'.
3101
3102         * mono-debug-debugger.c
3103         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
3104         (mono_debugger_add_builtin_types): Removed.
3105
3106 2006-02-02  Martin Baulig  <martin@ximian.com>
3107
3108         * threads.c (mono_debugger_create_all_threads): New public method.
3109
3110 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
3111
3112         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
3113         breaks on several platforms.
3114
3115 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
3116
3117         * assembly.c: the VS.NET build doesn't supply default values for
3118         MONO_ASSEMBLIES and MONO_CFG_DIR.
3119
3120 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
3121
3122         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
3123         helper function.
3124
3125         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
3126
3127         * loader.c (method_from_memberref): Fix a warning.
3128
3129         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
3130
3131         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
3132         with explicit layout. Fixes #77433.
3133
3134 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
3135
3136         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
3137         max_interface_id is initialized before using it. Fixes #77398.
3138         (ves_icall_Type_GetInterfaces): Ditto.
3139
3140 2006-01-30  Raja R Harinath  <rharinath@novell.com>
3141
3142         * metadata.c (mono_metadata_parse_method_signature_full): Don't
3143         allocate memory for parameter attributes when parsing memberref
3144         signatures.
3145         * loader.c (mono_loader_set_error_method_load): Don't warn.
3146         (method_from_memberref): Ensure MissingMethodException gets thrown
3147         if method is not found.  Make warning more informative.
3148
3149 2006-01-29  Raja R Harinath  <harinath@gmail.com>
3150
3151         Fix #77397
3152         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
3153         return true if is byref.
3154         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
3155         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
3156         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
3157
3158 2006-01-27  Raja R Harinath  <rharinath@novell.com>
3159
3160         Fix tests/find-method.2.il
3161         * loader.c (find_method, find_method_in_class): Remove is_inflated
3162         argument.  Revert 2006-01-18 change.
3163         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
3164         is generic, search for method in its generic definition.
3165         * class.c (mono_class_setup_vtable_general): Print generic
3166         arguments of generic types in debugging printf.
3167
3168 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
3169
3170         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
3171
3172         * threads.c (mono_threads_request_thread_dump): New helper function.
3173
3174 2006-01-25  Raja R Harinath  <rharinath@novell.com>
3175
3176         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
3177
3178 2006-01-25  Ankit Jain  <jankit@novell.com>
3179
3180         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
3181         move definition to ..
3182         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
3183         
3184 2006-01-25  Ankit Jain  <jankit@novell.com>
3185             Raja R Harinath  <rharinath@novell.com>
3186
3187         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
3188         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
3189         as necessary.
3190
3191 2006-01-25  Martin Baulig  <martin@ximian.com>
3192
3193         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
3194         `MonoDebuggerThread' into debug-debugger.c.
3195
3196 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
3197
3198         * profiler.c: fix printing of data.
3199
3200 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
3201
3202         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
3203           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
3204
3205 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
3206
3207         * object.c: fix deadlock related to string interning.
3208
3209 2006-01-23  Martin Baulig  <martin@ximian.com>
3210
3211         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
3212
3213         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
3214
3215 2006-01-23  Martin Baulig  <martin@ximian.com>
3216
3217         * mono-debug.h: Moved the prototypes of some functions which are
3218         used by the JIT here from mono-debug-debugger.h.
3219
3220 2006-01-21  Martin Baulig  <martin@ximian.com>
3221
3222         * Makefile.am: Don't install mono-debug-debugger.h.
3223
3224 2006-01-21  Martin Baulig  <martin@ximian.com>
3225
3226         * mono-debug-debugger.h: Enforce the private status of this header
3227         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
3228         Moved some stuff from mono-debugger-jit-wrapper.h here.
3229
3230 2006-01-20  Raja R Harinath  <rharinath@novell.com>
3231
3232         * class.c (mono_class_from_typeref): Add a sanity test to help
3233         catch lack of assembly load/search hooks.
3234
3235 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
3236
3237         * marshal.c (emit_struct_conv): Relax the fields with same offset
3238         check even more. Fixes #77230.
3239
3240 2006-01-18  Martin Baulig  <martin@ximian.com>
3241
3242         * loader.c (find_method_in_class): Added `gboolean is_inflated'
3243         argument; if false, we compare the uninstantiated signatures.
3244         (method_from_memberref): Compare the uninstantiated signatures;
3245         fixes #76417.
3246
3247 2006-01-18  Robert Jordan  <robertj@gmx.net>
3248
3249         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
3250         Clear the weak link. Fixes bug #77170.
3251
3252         * gc.c (mono_gchandle_free):
3253         Reflect *-gc.c changes (tiny optimization).
3254
3255 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
3256
3257         * metadata.c (mono_metadata_signature_dup): Applied patch from
3258         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
3259         Fixes #77288.
3260
3261 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
3262
3263         * marshal.c (emit_struct_conv): Allow fields with the same offset when
3264         marshalling from native to managed code. Fixes #77230.
3265
3266 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3267
3268         * threadpool.c: fix problem (Mac only) when more than one asynchronous
3269         connect. Fixes bug #77020.
3270
3271 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
3272
3273         * class.c: fixed id assignement for nested interfaces (bug #77275).
3274         Added also better info for --print-vtable debugging.
3275
3276 2006-01-12  Martin Baulig  <martin@ximian.com>
3277
3278         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
3279         interfaces on-the-fly; fixes #76625.
3280
3281         * class-internals.h
3282         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
3283         don't need that anymore.
3284
3285 2006-01-12  Miguel de Icaza  <miguel@novell.com>
3286
3287         * socket-io.c
3288         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3289         To avoid initing the nested_classes when not needed I turned the
3290         PeerCredData as a toplevel internal class, as it has to be shared
3291         anyways. 
3292
3293         Fixes the CASA issue.
3294
3295 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
3296
3297         * domain.c: Accessors for MonoJitInfo
3298
3299         * profiler-private.h: Add jitinfo to the end jit hook
3300
3301         * profiler.[ch]: Define new hooks, called after jitting which give
3302         the MonoJitInfo that was compiled
3303
3304 2006-01-10  Martin Baulig  <martin@ximian.com>
3305
3306         * class.c (mono_class_setup_events): Add support for generic
3307         classes; fixes #76440.
3308
3309 2006-01-06  Raja R Harinath  <rharinath@novell.com>
3310
3311         Fix #77160.
3312         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
3313         on passed-in method.
3314
3315 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
3316
3317         * object.c (mono_runtime_invoke_array): Add Nullable support.
3318
3319         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
3320
3321 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
3322
3323         * file-io.c: Don't consider sockets as directory and avoid an endless
3324         loop. Fix bug #76966.
3325
3326 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
3327
3328         * object.c (mono_nullable_init): New helper function.
3329         (mono_nullable_box): Ditto.
3330
3331         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
3332
3333         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
3334
3335         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
3336         
3337 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
3338
3339         * class.c (mono_class_is_assignable_from): Make T assignable to 
3340         Nullable<T>.
3341
3342 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
3343
3344         * appdomain.c: Bump corlib version to 46.
3345         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
3346         serialization purpose) and changed ves_icall_System_Reflection_
3347         Assembly_get_code_base signature to accept a boolean (to escape, or 
3348         not, the assembly code base).
3349
3350 2005-12-23  Dick Porter  <dick@ximian.com>
3351
3352         * icall.c: 
3353         * threads-types.h: 
3354         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
3355         CreateEvent icall now returns "created" boolean parameter.
3356
3357 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
3358
3359         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
3360         #76967.
3361
3362         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
3363         when attr_klass is an interface. Fixes #77045.
3364
3365 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
3366
3367         * marshal.c (emit_struct_conv): Fix previous patch.
3368         
3369         * marshal.c (emit_struct_conv): Add a check for fields with the same
3370         offset.
3371
3372 2005-12-20  Raja R Harinath  <rharinath@novell.com>
3373
3374         Fix regression in Mono.C5.
3375         * class.c (mono_class_create_generic): If 'klass' is an interface
3376         set up the interface offsets.
3377         (mono_class_is_assignable_from): Don't throw away generic arguments.
3378
3379 2005-12-19  Raja R Harinath  <rharinath@novell.com>
3380
3381         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
3382         type parameters.
3383
3384 2005-12-15  Raja R Harinath  <rharinath@novell.com>
3385
3386         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
3387         dead store.
3388         (do_mono_metadata_parse_generic_class): Don't pass the current
3389         generic context when parsing the type being instantiated: it
3390         cannot use it, anyway.
3391
3392         * loader.c (method_from_memberref): Don't inflate a signature if
3393         it doesn't contain any type parameters.
3394
3395 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
3396
3397         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
3398
3399 2005-12-14  Martin Baulig  <martin@ximian.com>
3400
3401         * class.c
3402         (mono_type_get_name_recurse): Don't return null for type
3403         parameters and open generic classes.
3404         (mono_class_setup_methods): Don't exclude generic instances.
3405         (mono_get_unique_iid): Use different IDs for different
3406         instantiations of the same generic type.
3407         (mono_class_setup_vtable): Only use setup_generic_vtable() for
3408         open generic instances; create a normal vtable for closed generic
3409         instances.
3410         (mono_class_setup_vtable_general): We're now also called for
3411         closed generic instances.
3412
3413         * reflection.c
3414         (mono_reflection_bind_generic_parameters): Correctly use
3415         mono_metadata_lookup_generic_inst() everywhere.
3416
3417 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
3418
3419         * object.c (mono_class_create_runtime_vtable): Call 
3420         mono_class_setup_vtable ().
3421
3422         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
3423         function.
3424         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
3425         #76959.
3426
3427         * loader.c (mono_loader_set_error_type_load): Print the type load
3428         warnings to the console so they are more visible to the user.
3429         (mono_loader_set_error_method_load): Ditto.
3430
3431         * reflection.c (ensure_runtime_vtable): Revert the last change as it
3432         is still broken.
3433         
3434         * reflection.c (ensure_runtime_vtable): Fix build.
3435
3436         * reflection.c (ensure_runtime_vtable): Disable an optimization which
3437         doesn't work in all cases.
3438
3439 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
3440
3441         * object.c (mono_array_new_full): Treat a single dimensional array
3442         with 0 lower bounds as an szarray. Fixes #76973.
3443
3444         * reflection.c (custom_attr_visible): Really fix this.
3445
3446 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
3447
3448         * reflection.c (custom_attr_visible): Allow nested public attributes
3449         as well.
3450
3451         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
3452         interface check.
3453
3454 2005-12-12  Raja R Harinath  <harinath@gmail.com>
3455
3456         * class.c (set_generic_param_owner): Delete.
3457         (mono_class_create_from_typedef): Don't set ->owner field of
3458         generic parameters to "param containers" of enclosing classes.
3459         * reflection.c (mono_reflection_initialize_generic_parameter):
3460         Likewise.
3461
3462 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
3463
3464         * reflection.c (custom_attr_visible): Fix build.
3465
3466 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
3467
3468         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
3469         private attributes.
3470         
3471         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
3472         handling of null parameter defaults.
3473
3474 2005-12-09  Raja R Harinath  <rharinath@novell.com>
3475
3476         * class.c (mono_class_from_generic_parameter): Don't set
3477         klass->generic_container.
3478         (my_mono_class_from_generic_parameter): Likewise.
3479
3480 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
3481
3482         * reflection.c (load_public_key): Fix a warning.
3483         (method_encode_code): Fix unaligned accesses.
3484
3485 2005-12-07  Martin Baulig  <martin@ximian.com>
3486
3487         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
3488
3489         * reflection.c
3490         (write_generic_param_entry): Encode our custom attrs.
3491
3492         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
3493
3494 2005-12-07  Martin Baulig  <martin@ximian.com>
3495
3496         * reflection.c (encode_new_constraint): Removed; we don't use the
3497         `NewConstraintAttribute' anymore.
3498
3499 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
3500
3501         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
3502         not fire a TypeResolve event when Assembly.GetType () is called.
3503
3504 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
3505
3506         Beginning of support for nullable types in the runtime. Parts of
3507         this patch are from Martin.
3508
3509         * appdomain.c (MONO_CORLIB_VERSION): Bump
3510
3511         * domain.c (mono_init_internal): get the nullable type
3512
3513         * class.c (mono_class_is_nullable): New method
3514         (mono_class_get_nullable_param): New mehod
3515         (mono_class_create_generic): In types T? set cast_class to T
3516
3517         * class-internals.h (MonoDefaults): new nullable default class
3518         (mono_class_get_nullable_param, mono_class_get_nullable_param):
3519         new methods.
3520
3521 2005-12-05  Raja R Harinath  <rharinath@novell.com>
3522
3523         * metadata.c (select_container): New.  Refactor code to select the
3524         appropriate GenericContainer given the type of generic parameter
3525         we are looking for.
3526         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
3527         not a MonoGenericContext.  Use select_container.  Update parameters.
3528         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
3529         and MONO_TYPE_MVAR.
3530         (unwrap_arrays): Remove duplicate tests.
3531         (find_generic_param): Rename from 'has_same_context'.  Now walks a
3532         generic instantiated class to find any arguments that are generic
3533         parameters.
3534         (mono_type_create_from_typespec_full): Use find_generic_param to
3535         avoid evicting some generic instantiations from the typespec
3536         cache.
3537
3538 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
3539
3540         * reflection.c: fixed writing of doubles on ARM FPA.
3541
3542 2005-12-02  Robert Jordan  <robertj@gmx.net>
3543
3544         * icall.c: Fixed EventInfo.ReflectedType (#76829).
3545
3546 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3547
3548         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
3549         least on SUSE 10 they are not the same (on debian, they are just the
3550         same thing).
3551
3552 2005-12-01  Raja R Harinath  <rharinath@novell.com>
3553
3554         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
3555         DeclaringType for VARs and MVARs.
3556         * class.c (set_generic_param_owner): Fix initialization of owner
3557         fields.
3558
3559 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3560
3561         * icall.c: fixed Enum.ToObject() to correctly convert the values.
3562
3563 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3564
3565         * threadpool.c: workaround for a bug that shows up on the Mac:
3566         select()+connect() on a blocking socket is not like it should
3567         be, so we proceed to connect() in that case, wasting the I/O
3568         threadpool thread until connect succeedes. Fixes bug #75436.
3569
3570 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3571
3572         * threadpool.c: fix typo when setting file descriptor states.
3573
3574 2005-11-28  Raja R Harinath  <rharinath@novell.com>
3575
3576         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
3577         * metadata.c (mono_metadata_parse_method_signature_full): Don't
3578         create a temporary signature container.
3579         (mono_metadata_parse_generic_param): Update to changes.
3580         (mono_type_create_from_typespec_full): Update to changes.
3581         * loader.c (method_from_memberref): Don't use a
3582         MonoGenericContainer while parsing a memberref signature.
3583         (method_from_methodspec): Remove dead-store of the 'container'
3584         variable.  It's overwritten before use.
3585
3586         * metadata.c (mono_type_create_from_typespec_full): Make debugging
3587         checks tighter.
3588         (mono_metadata_parse_generic_param): Likewise.
3589         * loader.c (find_method_in_class): Does not need a
3590         MonoGenericContainer.  Use 'mono_method_signature' rather than
3591         'mono_method_signature_full'.
3592         (find_method, mono_get_method_constrained, method_from_memberref):
3593         Update to changes.
3594
3595         * metadata.c (mono_type_create_from_typespec_full): Ensure that
3596         owner-less generic-parameters are never evicted from the typespec
3597         cache.
3598
3599         * loader.c (method_from_memberref): Don't use the current context
3600         when parsing signatures.
3601         (method_from_methodspec, mono_get_method_from_token): Update to changes.
3602
3603         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
3604         side-effects in g_assert.
3605         * loader.c (mono_get_method_from_token): Resolve klass earlier so
3606         that we don't potentially lose information.
3607
3608 2005-11-26  Dick Porter  <dick@ximian.com>
3609
3610         * icall.c:
3611         * threads.c: icalls to implement basic (ie, not named)
3612         System.Threading.Semaphore.
3613
3614 2005-11-24  Dick Porter  <dick@ximian.com>
3615
3616         * process.c
3617         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
3618         Use GetProcessId() if it's available.
3619
3620 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
3621
3622         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
3623
3624 2005-11-23  Raja R Harinath  <rharinath@novell.com>
3625             Ankit Jain  <jankit@novell.com>
3626
3627         * loader.c (mono_get_method_from_token): Initialize 'method' field
3628         of all generic parameters before parsing the signature.  Remove
3629         code that "fixed"-up MVAR references.
3630
3631 2005-11-23  Ankit Jain  <jankit@novell.com>
3632
3633         * metadata.c (mono_metadata_has_generic_params):
3634         (mono_metadata_load_generic_param_constraints):
3635         (mono_metadata_load_generic_params): Move duplicate code ...
3636         (mono_metadata_get_generic_param_row): ... here. Returns the
3637         first row-id in GenericParam table for a given owner (token).
3638         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
3639         prototype.
3640
3641 2005-11-23  Raja R Harinath  <rharinath@novell.com>
3642             Ankit Jain  <jankit@novell.com>
3643
3644         * metadata.c (mono_metadata_class_equal): Pass signature_only when
3645         comparing VARs too.
3646         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
3647         type->data.generic_param only if the type is an MVAR.
3648         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
3649         leak owner-less VARs and MVARs into managed space.
3650
3651 2005-11-21  Martin Baulig  <martin@ximian.com>
3652
3653         * class-internals.h
3654         (MonoMethod): Moved the `generic_container' here from
3655         `MonoMethodNormal' since we now also need it for
3656         `MonoMethodPInvoke';
3657         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
3658         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
3659         an union containing both `MonoMethodNormal' and
3660         `MonoMethodPInvoke'.
3661
3662         * loader.c
3663         (mono_get_method_from_token): Allow implementing generic methods
3664         as interncalls.
3665
3666         * threads.c
3667         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
3668         icall.
3669
3670 2005-11-17  Dick Porter  <dick@ximian.com>
3671
3672         * icall.c: 
3673         * process.h: 
3674         * process.c: Split the Process Start_internal icall into
3675         ShellExecuteEx_internal and CreateProcess_internal, which are
3676         called depending on whether UseShellExecute is true.  Fixes bug
3677         76670.
3678
3679         * appdomain.c (MONO_CORLIB_VERSION): Incremented
3680
3681 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
3682
3683         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
3684         'msize' parameters, use the information in 'mspec' instead.
3685         (emit_object_to_ptr_conv): Ditto.
3686
3687         * marshal.c (emit_struct_conv): Handle explicit layout structs with
3688         fields out of order. Fixes #76733.
3689
3690 2005-11-17  Ankit Jain  <jankit@novell.com>
3691
3692         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
3693
3694 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
3695
3696         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
3697           bug #76575.
3698
3699 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
3700
3701         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
3702         for types with non-auto layout. Fixes #76717.
3703
3704 2005-11-16  Ankit Jain  <jankit@novell.com>
3705
3706         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
3707         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
3708         if generic_context is null.
3709           (mono_metadata_generic_param_equal): param->owner can be null.
3710           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
3711         null.
3712
3713 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
3714
3715         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
3716         the correct value.
3717
3718 2005-11-15  Martin Baulig  <martin@ximian.com>
3719
3720         * object.c (set_value): Use mono_class_from_mono_type() instead of
3721         the hack for generic instances; fixes #76136.
3722
3723 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
3724
3725         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
3726         fields.
3727
3728         * image.c (load_metadata_ptrs): Initialize the new fields.
3729
3730         * reflection.c (create_dynamic_mono_image): Ditto.
3731
3732         * reflection.c (build_compressed_metadata): Use the new fields.
3733
3734         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
3735         icall.
3736
3737         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
3738         icall.
3739         
3740 2005-11-15  Ankit Jain  <jankit@novell.com>
3741             Raja R Harinath  <harinath@gmail.com>
3742
3743         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
3744         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
3745         new per-generic_container cache if the cached MonoType's context matches
3746         the current context.
3747           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
3748         to the expected context.
3749           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
3750
3751 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3752
3753         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
3754         we changed the signature of an icall.
3755         * icall.c: Modify to mono_double_ParseImpl return true/false 
3756         depending on the success, instead of throwing the exception. This will
3757         help us in Double.TryParse methods.
3758         
3759 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
3760
3761         * marshal.c (emit_marshal_object): Throw an exception when
3762         marshalling 'object' instead of crashing. Fixes #76696.
3763
3764 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
3765
3766         * class-internals.h: Add prototype for mono_type_get_full_name ().
3767
3768 2005-11-11  Dick Porter  <dick@ximian.com>
3769
3770         * threads.c (mono_thread_manage): Make sure the main thread has
3771         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
3772
3773 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
3774
3775         * loader.c (mono_loader_set_error_type_load): Log a warning to the
3776         console about the missing type.
3777         (mono_loader_set_error_method_load): Ditto.
3778
3779 2005-11-09  Miguel de Icaza  <miguel@novell.com>
3780
3781         * mono-config.c (mono_get_config_dir): Set the system defaults if
3782         none is specified.
3783
3784         * assembly.c (mono_set_dirs): New API entry point to set the
3785         assembly and the config directory in one call
3786
3787 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
3788
3789         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
3790         the ftnptr was created from a delegate in a domain other than the
3791         current domain. Fixes #75377.
3792
3793         * exception.h exception.c: Add mono_get_exception_not_supported ().
3794
3795 2005-11-08  Martin Baulig  <martin@ximian.com>
3796
3797         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
3798
3799 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
3800
3801         * security-manager.h: Added definitions to deal with strongname key 
3802         pairs bigger (and smaller) than 1024 bits.
3803         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
3804         adjust wrt the public key length being used.
3805
3806 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
3807
3808         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
3809           Windows build (r51396-51397).
3810
3811 2005-11-03  Martin Baulig  <martin@ximian.com>
3812
3813         * class.c (mono_class_setup_vtable_general): Also add generic
3814         methods to the vtable; fixes #76581.
3815
3816 2005-11-01  Miguel de Icaza  <miguel@novell.com>
3817
3818         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
3819         sure that we lookup GetString method from the System.Text.Encoding
3820         class, not the derived class or we get an empty method.
3821
3822         Fixed class #76612.
3823
3824 2005-10-25  Miguel de Icaza  <miguel@novell.com>
3825
3826         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
3827         if it has been previously set (embedders). 
3828
3829         Make mono_set_rootdir available also on Unix.
3830
3831 005-10-24  Robert Jordan  <robertj@gmx.net>
3832
3833         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
3834
3835 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
3836
3837         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
3838         only calls which are made to native code use this flag.
3839
3840         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
3841
3842 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
3843
3844         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
3845         Add support for FieldBuilders.
3846
3847 2005-10-29  Martin Baulig  <martin@ximian.com>
3848
3849         * mono-debug.c
3850         (mono_debug_using_mono_debugger): New public method; returns
3851         whether we're running inside the debugger.
3852
3853 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
3854
3855         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
3856         for Method/Constructor/FieldBuilders.
3857
3858 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
3859
3860         * reflection.c (module_add_cattrs): Save custom attributes for global methods
3861         and fields as well.
3862
3863 2005-10-26  Martin Baulig  <martin@ximian.com>
3864
3865         * mono-debug-debugger.c
3866         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
3867
3868 2005-10-24  Raja R Harinath  <harinath@gmail.com>
3869
3870         * icall.c (base64_to_byte_array): Don't pass an out-of-range
3871         integer to isspace.
3872
3873 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
3874
3875         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
3876         when passing valuetypes byref. Fixes #76502.
3877
3878 2005-10-19  Jackson Harper  <jackson@ximian.com>
3879
3880         * profiler.c: Don't put a . in front of types that are not in a
3881         namespace.
3882
3883 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
3884
3885         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
3886
3887 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
3888
3889         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
3890         #76436.
3891         (mono_marshal_get_ldflda_wrapper): Fix a warning.
3892
3893 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3894
3895         * assembly.c metadata-internals.h icall.c: Define an additional
3896         parameter for mono_assembly_name_parse_full, so we can avoid creating
3897         S.R.AssemblyName.Version when no version info wasn't passed.
3898         
3899 2005-10-09  Miguel de Icaza  <miguel@novell.com>
3900
3901         * class.c (mono_type_get_full_name): Reimplement method that was
3902         removed. 
3903
3904         * image.c: Some docs
3905
3906 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
3907
3908         * profiler.c (output_newobj_profile): Fix printing of Total memory
3909         on x86.
3910
3911 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
3912
3913         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
3914
3915 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
3916
3917         * threads.c: remove debug output.
3918
3919 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
3920
3921         * threads.c (mono_thread_manage): Fix crashes if more than 64
3922         threads need to be aborted. Hopefully fixes #75899.
3923
3924         * assembly.c (mono_stringify_assembly_name): New helper function.
3925
3926         * class.c: Use mono_stringify_assembly_name instead of the similar
3927         static function.
3928
3929         * assembly.h assembly.c: Add support for calling a postload search 
3930         hook if an assembly cannot be loaded.
3931
3932         * appdomain.c: Register new search hooks which call the AssemblyResolve
3933         events in AppDomain. Fixes #75231
3934
3935 2005-10-07  Martin Baulig  <martin@ximian.com>
3936
3937         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
3938         methods without debug info.
3939
3940 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
3941
3942         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
3943         wrappers.
3944
3945 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3946
3947         * file-io.c: now that we return symlinks, use lstat and, when the file
3948         is a symbolic link, stat, to get the file attributes. Also avoid the
3949         conversion to/from utf16/external.
3950
3951 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
3952
3953         * class.c (mono_class_layout_fields): Compute klass->has_references
3954         correctly if an embedded valuetype is not yet initialized. Fixes
3955         #76331.
3956
3957 2005-10-04  Martin Baulig  <martin@ximian.com>
3958
3959         * metadata.c
3960         (mono_metadata_load_generic_param_constraints): New public
3961         function; splitted the constraints loading out from
3962         mono_metadata_load_generic_params().
3963
3964         * class.c (mono_class_create_from_typedef): Call
3965         mono_metadata_load_generic_param_constraints() after setting up
3966         the type and creating our parent; fixes #75329.
3967
3968 2005-10-04  Martin Baulig  <martin@ximian.com>
3969
3970         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
3971         non-dynamic parent classes.
3972
3973 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
3974
3975         * file-io.c : win32 build fix (ETXTBSY seems not found).
3976
3977 2005-10-04  Martin Baulig  <martin@ximian.com>
3978
3979         * reflection.c
3980         (mono_image_get_methodspec_token): Make the cache actually work;
3981         fixes #75974.
3982
3983 2005-10-04  Martin Baulig  <martin@ximian.com>
3984
3985         * class.c (mono_class_name_from_token): Removed the unneccessary
3986         `MonoGenericContext *' argument.
3987
3988 2005-10-04  Martin Baulig  <martin@ximian.com>
3989
3990         * loader.c
3991         (method_from_methodspec): Make the caching work again; fixes the
3992         performance regression from #76262.
3993
3994 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3995
3996         * file-io.c:
3997         * file-io.h:
3998         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
3999         GetFileSystemEntries that performs the same work but without going
4000         into io-layer, locking, etc.
4001
4002 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
4003
4004         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
4005         ThreadState_Stopped as well. Fixes #76047.
4006
4007 2005-09-29  Martin Baulig  <martin@ximian.com>
4008
4009         * class.c
4010         (inflate_generic_context): If the new context has a `gmethod', set
4011         its `container' that that gmethod's `container'.
4012
4013         * metadata.c
4014         (mono_metadata_parse_generic_param): Simplify things;
4015         `generic_container = generic_context->container;' is just fine.
4016
4017         * loader.c (method_from_methodspec): Code cleanups.
4018
4019 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
4020
4021         * decimal.c: fix warning (and let gcc generate correct
4022         code on ARM with optimizations).
4023
4024 2005-09-28  Martin Baulig  <martin@ximian.com>
4025
4026         * loader.c
4027         (method_from_memberref): Added `MonoGenericContext *class_context'
4028         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
4029         (method_from_methodspec): If we're a memberref, use the enclosing
4030         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
4031
4032 2005-09-28  Martin Baulig  <martin@ximian.com>
4033
4034         * object.c (mono_runtime_invoke_array): Added support for
4035         MONO_TYPE_GENERICINST; fixes #75917.
4036
4037 2005-09-27  Martin Baulig  <martin@ximian.com>
4038
4039         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
4040         `k->byval_arg.type' to determine the actual type.
4041
4042         * loader.c (method_from_methodspec): Removed some hacks.
4043
4044 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
4045
4046         * class-internals.h (mono_field_is_deleted): Do the test for
4047         rtspecialname before we check the actual name of the field. This
4048         prevents us from dereferencing a pointer into the string table,
4049         saving us from accessing a few pages
4050
4051         * *.c: Replace the use of {Enter,Leave}CriticalSection with
4052         macros. This will allow a deadlock debugger to easily be plugged
4053         in.
4054
4055 2005-09-27  Martin Baulig  <martin@ximian.com>
4056
4057         * loader.c (method_from_methodspec): Create a "signature"
4058         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
4059
4060 2005-09-27  Martin Baulig  <martin@ximian.com>
4061
4062         * class.c
4063         (inflate_generic_class): Correctly set the new context's
4064         container.
4065
4066         * loader.c
4067         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
4068         instead of a `MonoGenericContext *'.
4069         (mono_method_signature_full): Take a `MonoGenericContainer *'
4070         instead of a `MonoGenericContext *'.
4071
4072         * metadata.c
4073         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
4074         instead of a `MonoGenericContext *'.
4075         (mono_metadata_parse_method_signature_full): Likewise.
4076
4077 2005-09-26  Martin Baulig  <martin@ximian.com>
4078
4079         * class.c
4080         (mono_class_from_generic_parameter): Set `klass->generic_container'
4081         (mono_class_from_generic_parameter): Likewise.
4082         (mono_bounded_array_class_get): We inherit the generic container
4083         from the element class.
4084
4085         * loader.c
4086         (find_method, find_method_in_class): Take a `MonoGenericContext *'
4087         argument rather than computing it here.
4088         (method_from_memberref): Correctly set the generic context before
4089         parsing the signature.  Fixes #75681.
4090
4091 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
4092
4093         * object.c (mono_class_has_special_static_fields): Fix warnings.
4094
4095 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4096
4097         * assembly.c: Add parse_public_key function, to
4098         par the public keys. Also added mono_assembly_name_parse_full,
4099         to define it the parsed key should be freed or not.
4100         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
4101         to parse a long format assembly name.
4102         * metadata-internals.h: Keep mono_assembly_name_parse_full as
4103         private, since calling it to preserve the key requires
4104         freeing it manually.
4105         
4106 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
4107
4108         * locales.c : removed HAVE_ICU part.
4109
4110 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
4111
4112         * object.c (mono_class_create_runtime_vtable): Avoid calling 
4113         field_is_special_static if the klass has no special static fields.
4114
4115         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
4116         (MonoCachedClassInfo): Likewise.
4117
4118         * object.c (mono_class_has_special_static_fields): New helper function.
4119
4120 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
4121
4122         * class.c (mono_class_create_from_typedef): Don't call 
4123         interfaces_from_typedef_full for enums.
4124         (mono_class_create_from_typedef): Compute the base types of enums directly
4125         without calling mono_class_setup_fields ().
4126         (mono_class_find_enum_basetype): New helper function.
4127
4128         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
4129         one place inside the string heap.
4130         
4131 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
4132
4133         * class.c: locking fixes, code cleanups, some docs added.
4134         Allocate some data structures in the image mempool.
4135
4136 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
4137
4138         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
4139         the example code.
4140         
4141 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
4142
4143         * class-internals.h, class.c, reflection.c: reduce memory taken by
4144         MonoClass.
4145
4146 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
4147
4148         * metadata.c, metadata.h, loader.h: documentation updates, code and
4149         API cleanups.
4150
4151 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
4152
4153         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
4154         the example code.
4155
4156         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
4157         page faults caused by the runtime while reading metadata.
4158
4159 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4160
4161         * socket-io.c: the field names were changed 3 months ago and no one
4162         realized until bug #76077 got filed!
4163
4164 2005-09-20  Martin Baulig  <martin@ximian.com>
4165
4166         * icall.c (assembly_icalls): Removed some unused debugger icalls.
4167
4168 2005-09-20  Martin Baulig  <martin@ximian.com>
4169
4170         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
4171         write the rank into the class entry.
4172
4173 2005-09-20  Martin Baulig  <martin@ximian.com>
4174
4175         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
4176
4177 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
4178
4179         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4180
4181         * icall.c (custom_attrs_defined_internal): New icall.
4182
4183         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
4184         function.
4185         (mono_custom_attrs_construct_by_type): New helper function.
4186
4187 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
4188
4189         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
4190         terminate the resulting string. Fixes #76123.
4191
4192 2005-09-16  Martin Baulig  <martin@ximian.com>
4193
4194         * mono-debug.c
4195         (mono_debug_add_method): Ignore inflated methods for the moment.
4196
4197 2005-09-14  Martin Baulig  <martin@ximian.com>
4198
4199         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
4200
4201 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
4202
4203         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
4204         return a success/failure indication.
4205         (mono_metadata_interfaces_from_typedef_full): Ditto.
4206         (get_constraints): Ditto.
4207
4208 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
4209
4210         * marshal.c (emit_marshal_array): Fix handling of null arrays.
4211         
4212         * marshal.c (emit_marshal_array): Add support for returning string
4213         arrays from delegates. Fixes #76063.
4214
4215         * marshal.c: Use the emit_ldloc/stloc macros where possible.
4216
4217 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
4218
4219         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
4220         icall.
4221
4222 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
4223
4224         * reflection.c icall.c: Fix after mono_get_exception_type_load
4225         signature change.
4226
4227         * assembly.c (mono_assembly_get_assemblyref): New helper function.
4228         (mono_assembly_load_reference): Use the new helper.
4229
4230         * class-internals.h (MonoLoaderError): New structure containing 
4231         information about type loading errors.
4232
4233         * class-internals.h loader.c: Add APIs to store per-thread loader
4234         error information.
4235
4236         * loader.c class.c: Set the loader error if needed.
4237
4238         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
4239
4240 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
4241
4242         * decimal.c: fixed to handle the broken ARM fp format.
4243
4244 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
4245
4246         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
4247         broken.
4248
4249 2005-09-06  Martin Baulig  <martin@ximian.com>
4250
4251         * domain.c (supported_runtimes): Added v2.0.50727.
4252
4253 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
4254
4255         * culture-info.h: reduce the size of some structures.
4256
4257 2005-09-05  Martin Baulig  <martin@ximian.com>
4258
4259         Reflect latest API changes in the August CTP.
4260
4261         * icall.c
4262         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
4263         ("MonoType.HasGenericArguments"): Removed.
4264         ("MonoMethod.BindGenericParameters"): Renamed to
4265         "MakeGenericMethod".
4266         ("MethodBuilder.BindGenericParameters"): Renamed to
4267         "MakeGenericMethod".    
4268
4269 2005-09-05  Martin Baulig  <martin@ximian.com>
4270
4271         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
4272
4273 2005-09-05  Martin Baulig  <martin@ximian.com>
4274
4275         Applying a patch from Michal Moskal <malekith@nemerle.org>.
4276
4277         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
4278         generic_container is non-NULL.
4279
4280 2005-09-05  Martin Baulig  <martin@ximian.com>
4281
4282         Applying a patch from Michal Moskal <malekith@nemerle.org>.
4283
4284         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
4285
4286 2005-08-29  Michal Moskal  <malekith@nemerle.org>
4287
4288         * reflection.c (encode_locals,
4289         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
4290         for large generic types.
4291
4292 2005-09-05  Martin Baulig  <martin@ximian.com>
4293
4294         Applying a patch from Michal Moskal <malekith@nemerle.org>.
4295
4296         * class.c (mono_dup_array_type): New public method.
4297         (mono_metadata_signature_deep_dup): New public method.
4298         (dup_type): Correctly duplicate array and function types.
4299
4300 2005-09-05  Martin Baulig  <martin@ximian.com>
4301
4302         Applying a patch from Michal Moskal <malekith@nemerle.org>.
4303
4304         * reflection.c (get_default_param_value_blobs): Handle generic types
4305         and generic methods.
4306
4307 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
4308
4309         * class.c: Fixed error reporting (method/class were inversed) for 
4310         inheritance demands.
4311         * security-manager.c|h: Added the AppDomain when calling the managed
4312         System.Security.SecurityManager.InheritanceDemand method.
4313
4314 2005-09-01  Raja R Harinath  <rharinath@novell.com>
4315
4316         * reflection.c (encode_marshal_blob): 'marshaltype' and
4317         'marshaltyperef' are alternate sources for the custom marshaler
4318         name.
4319
4320 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
4321
4322         * class.c: fix creation of array classes with rank == 1
4323         (patch by Ankit Jain <jankit@novell.com>).
4324
4325 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
4326
4327         * object.c: fix check for creating the bound data for arrays vs
4328         szarrays.
4329
4330 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4331
4332         * object.c: configuration file name is now based on the executable name,
4333         not the image name. Fixes bug #75931.
4334
4335 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
4336
4337         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
4338         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
4339
4340 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
4341
4342         * rand.c: Use wincrypt.h instead of WinCrypt.h.
4343
4344 2005-08-24  Ankit Jain  <jankit@novell.com>
4345             Raja R Harinath  <rharinath@novell.com>
4346
4347         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
4348           called by it recursively.
4349           (mono_class_init): Remove special case in pending_init handling, since it's
4350           superseded by the fix to mono_class_from_typeref.
4351
4352 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
4353
4354         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
4355         BROKEN_THREAD_START stuff.
4356
4357 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
4358
4359         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
4360         trampoline.
4361
4362         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
4363         
4364         * object.c (mono_delegate_ctor): Replace the original function address with
4365         a delegate trampoline.
4366
4367 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
4368
4369         * icall.c: add boolean argument to base64_to_byte_array and 
4370         InternalFromBase64String to control whether a whitespace-only string
4371         is allowed (or should casue a FormatException to be thrown). We need
4372         this as the behavior has changed between MS.NET 1.x and 2.0, and we
4373         to match the MS behaviour in both profiles.
4374         * appdomain.c: Bump corlib version.
4375
4376 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4377
4378         This patch implements a big portion of publisher policy
4379         support, used to bind assembly versions and redirect
4380         one assembly from version A to version B.
4381
4382         * assembly.c:
4383         New GSList loaded_assembly_bindings, for storing the cached
4384         assembly bindings.
4385         (assembly_binding_maps_name): New static function for checking if a 
4386         assembly binding information maps an assembly name.
4387         (mono_assembly_binding_info_free): New function for freeing
4388         assembly binding information resources.
4389         (get_publisher_policy_info): New static function for retrieving 
4390         assembly binding information from a MonoImage.
4391         (compare_versions): New static function for comparing an assembly
4392         binding information data and the version of an assembly name.
4393         (check_policy_versions): New static function for checking if an
4394         assembly binding info mapping an assembly name is valid for it.
4395         (mono_assembly_load_publisher_policy): New static function for
4396         loading the 'policy.major.minor.MyAssembly' image for an assembly
4397         with an assembly name 'aname'.
4398         (mono_assembly_bind_version): New static function for updating
4399         assembly redirection.
4400         (mono_assembly_apply_binding): New static function for applying
4401         assembly binding.
4402         (search_binding_loaded): New static function for searching 
4403         loaded assembly binding infos in the cache domain.
4404         (mono_assembly_load_full): Don't apply assembly binding for
4405         reflection only assemblies.
4406
4407         * metadata-internals.h: Add MonoAssemblyBindingInfo,
4408         which contains information about assembly binding. Also
4409         declare signature for mono_config_parse_publisher_policy ()
4410         function, used to retrieve pub policy info.
4411         
4412         * mono-config.c:
4413         (publisher_policy_start): New static function used to parse publisher 
4414         policy config files.
4415         (publisher_policy_parser): New static MonoParseHandler containing 
4416         the functions used when parsing config files.
4417         (mono_config_parse_publisher_policy): New function for parsing
4418         publisher policy files.
4419         
4420 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
4421
4422         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
4423
4424         * marshal.c (mono_delegate_free_ftnptr): Ditto.
4425
4426         * object.c (mono_get_addr_from_ftnptr): New helper function.
4427
4428         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
4429
4430         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4431
4432 2005-08-19  Dick Porter  <dick@ximian.com>
4433
4434         * threads.c, threads.h, appdomain.c, appdomain.h,
4435         profiler-private.h, monitor.c, object.c, object-internals.h,
4436         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
4437         store the thread ID, so it can hold a 64 bit value if needed.
4438
4439 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
4440
4441         * reflection.c (mono_reflection_create_dynamic_method): Store the
4442         handle class into the method references as well so ldtoken works in
4443         dynamic methods.
4444
4445         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
4446         types.
4447
4448 2005-08-19  Ankit Jain <jankit@novell.com>
4449
4450         Fix #75847.
4451         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
4452           here rather than using the method signature of a arbitrary function
4453           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
4454           two arguments.
4455           Hack done with Harinath.
4456
4457 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4458
4459         * threadpool.c: disable printing stack traces when we get a exception
4460         in a threadpool thread. I need to do more testing to figure out which
4461         cases actually print this. Fixes bug #75828.
4462
4463 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4464
4465         * icall.c: there might be ignored whitespace after the last '='. This
4466         fixes length computation and bug #75840.
4467
4468 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
4469
4470         * assembly.c (mono_assembly_load_full): Consider .exe extension as
4471         well. Fixes #75809.
4472
4473         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
4474         #75784.
4475         
4476         * reflection.c (create_custom_attr_data): Ditto.
4477
4478 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
4479
4480         * locales.c, culture-info.h : removed RegionLCIDMap.
4481         * culture-info-tables.h : regenerated.
4482
4483 2005-08-16  Martin Baulig  <martin@ximian.com>
4484
4485         * class.c (mono_type_get_name_recurse): Small fix.
4486
4487 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
4488
4489         * locales.c : indentation fixie.
4490
4491 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
4492
4493         * object-internals.h,
4494           locales.h,
4495           locales.c,
4496           culture-info.h,
4497           icall.c : added RegionInfo table support.
4498         * culture-info-table.h : regenerated for region support.
4499
4500 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
4501
4502         * reflection.c (resolve_object): handle all kinds of MonoMethod
4503         including generic ones
4504
4505 2005-08-12  Ankit Jain <jankit@novell.com>
4506
4507         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
4508           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
4509
4510 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
4511
4512         * process.c: Don't close a thread handle when it's NULL. This is a
4513         workaround for bug #75733.
4514
4515 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
4516
4517         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
4518
4519 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
4520
4521         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
4522
4523 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4524
4525         * threadpool.c: if a work item in the thread pool has a callback that
4526         catches a exception, don't propagate it after invoking the callback.
4527         Fixes bug #75336.
4528
4529 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
4530
4531         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
4532
4533         * class-internals.h (MonoCachedClassInfo): Add some new fields.
4534
4535         * class.c (mono_class_init): Load field info lazily in the AOT case.    
4536
4537         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
4538
4539 2005-08-03  Ankit Jain  <jankit@novell.com>
4540
4541         Fix #75683.
4542         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
4543           PInvoke calling convention is 0.
4544
4545 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
4546
4547         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
4548         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
4549
4550 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
4551
4552         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
4553         to handle threads not started by the GC (patch by Michael Meeks
4554         <michael.meeks@novell.com>).
4555
4556 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
4557
4558         * reflection.c: Make buffer used in emitting types larger for some
4559         big generic types (patch by Michal Moskal).
4560
4561 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
4562
4563         * mono-debug.c: Fix some (not all) alignment problems.
4564
4565 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4566
4567         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
4568         Invoke mono_image_load_from_data_full passing the refonly
4569         parameter.
4570
4571         * assembly.c
4572         (mono_assembly_open_from_bundle): Add the refonly argument, 
4573         in order to pass it to other methods it calls to.
4574         (do_mono_assembly_open): Add the refonly argument, in order 
4575         to pass it to other methods it calls to.
4576         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
4577         the refonly parameter to it.
4578
4579         * image.c: Add loaded_images_refonly_hash and
4580         loaded_images_refonly_guid_hash to cache the reflection
4581         only loaded images.
4582         (mono_images_init): Initialize the hash tables used for
4583         caching the reflection only images.
4584         (load_modules): Invoke mono_image_open_full passing the refonly
4585         parameter to load the modules the correct way.
4586         (build_guid_table): Add the refonly argument, to re-build the 
4587         correct hash table.
4588         (do_mono_image_open): Added the refonly argument, in order to
4589         define it for the loaded image.
4590         (mono_image_loaded_full): New function, which receives an
4591         additional parameter to look for the image in the refonly or
4592         non-refonly section.
4593         (mono_image_loaded): Updated, using mono_image_loaded_full.
4594         (mono_image_loaded_by_guid_full): The same case that happens
4595         with mono_image_loaded_full.
4596         (mono_image_loaded_by_guid): Likewise.
4597         (register_image): Use the ref_only variable inside MonoImage
4598         to decide in which hash table store the current image.
4599         (mono_image_open_from_data_full): Rename
4600         mono_image_open_from_data to mono_image_open_from_data_full,
4601         adding the refonly argument, to define the ref_only variable 
4602         inside MonoImage.
4603         (mono_image_open_from_data): Return 
4604         mono_image_open_from_data_full.
4605         (mono_image_open_full): Rename mono_image_open to
4606         mono_image_open_full, receiving the new refonly argument,
4607         to pass it to inner methods.
4608         (mono_pe_file_open): Update this function, to open
4609         a MonoImage as a non-refonly image.
4610         (mono_image_close): Use the refonly variable inside
4611         MonoImage to remove the image from the correct caches.
4612
4613         * image.h: Add the signatures of mono_image_open_full,
4614         mono_image_open_from_data_full, mono_image_loaded_full,
4615         mono_image_loaded_by_guid_full.
4616
4617         * metadata-internals.h: Add the ref_only field to 
4618         MonoImage.
4619         
4620 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
4621
4622         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
4623         Fix the last behavior, which used to load the assemblies and
4624         extract MonoReflectionAssemblyName information, instead of
4625         extract it from the metadata tables. Needed for Reflection
4626         Only assemblies.
4627         
4628 2005-07-29  Martin Baulig  <martin@ximian.com>
4629
4630         * mono-debug-debugger.c
4631         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
4632         not initialized.
4633
4634         * mono-debug.c
4635         (mono_debug_address_from_il_offset): Check whether we have
4636         debugging support before attempting to take the lock.
4637         (mono_debug_source_location_from_address): Likewise.
4638         (mono_debug_source_location_from_il_offset): Likewise.
4639         (mono_debug_il_offset_from_address): Likewise.
4640         (mono_debug_address_from_il_offset): Likewise.
4641
4642 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
4643
4644         * class.c (mono_class_from_name_case): Add support for dynamic images.
4645         Fixes #75650.
4646
4647         * object.c (mono_class_compute_gc_descriptor): Add a workaround
4648         for #75479.
4649
4650 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
4651         
4652         * reflection.c (mono_method_get_object): Fix warning.
4653
4654 2005-07-28  Martin Baulig  <martin@ximian.com>
4655
4656         * mono-debug.c
4657         (mono_debug_add_wrapper): Also write the wrapper type.
4658
4659 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
4660
4661         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
4662         
4663         * class.c (mono_class_init): Avoid reading nested classes if the AOT
4664         data indicates the class has none.
4665
4666 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
4667
4668         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
4669         loader lock with the debugger lock. Prevents deadlocks for beagle.
4670
4671         Beagle can now run on an smp box for a weekend without any
4672         issues. Woohoo!
4673
4674 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
4675
4676         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
4677         in a module. Fixes #75629.
4678
4679 2005-07-26  Martin Baulig  <martin@ximian.com>
4680
4681         * mono-debug.c (mono_debug_add_wrapper): New static method.
4682         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
4683         interncall or a wrapper.
4684
4685         * mono-debug.h (MonoDebugWrapperData): New public typedef.
4686         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
4687         (MONO_DEBUGGER_VERSION): Bump to 51.
4688
4689         * mono-debug-debugger.c
4690         (mono_debugger_add_type): Removed this empty function.
4691         (mono_debugger_add_method): Likewise.
4692
4693 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
4694
4695         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
4696         before accessing method->slot.
4697
4698 2005-07-21  Jb Evain  <jbevain@gmail.com>
4699
4700         * reflection.c (method_encode_clauses/class): Handle filters clauses.
4701         Fixes #75010.
4702
4703 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
4704
4705         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
4706         #75587.
4707
4708 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
4709
4710         * image.h image.c: Add mono_image_get_guid () API function.
4711
4712 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
4713
4714         There were issues when multiple threads tried to load
4715         assemblies. A deadlock was created between assemblies_mutex and
4716         mono_domain_assemblies_lock. This fixes the issue by making the
4717         assembly ref counting be lock free. See bug 75586.
4718         
4719         * image.c (mono_image_close): The add ref function here was using
4720         Interlocked operations while the unref was using a mutex and a
4721         --. I don't think this was ever a bug that would be exposed in a
4722         non-pendantic way (ie, by an embedder doing a ref on one thread
4723         and an unref on another), but for the sake of correctness, this is
4724         now Interlocked.
4725
4726         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
4727         (mono_assembly_load_reference): Call mono_assembly_addref rather
4728         than touching the refcount ourselves.
4729         (mono_assembly_close): Use InterlockedDecrement to unref the
4730         assembly. Don't acquire the lock unless it is actually needed.
4731
4732 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
4733
4734         * class.c (mono_class_layout_fields): Fix calculation of has_references
4735         for generic types.
4736
4737 2005-07-12  Martin Baulig  <martin@ximian.com>
4738
4739         Applying a patch from Michal Moskal <malekith@nemerle.org>.
4740
4741         * metadata.c
4742         (mono_type_hash): Provide better hashing for generic instances.
4743         (mono_generic_inst_hash): Improve hashing.
4744         (mono_generic_class_hash): Likewise.
4745
4746         * reflection.c (mymono_metadata_type_hash): Improve hashing for
4747         generic instances.
4748
4749 2005-07-12  Martin Baulig  <martin@ximian.com>
4750
4751         * reflection.c (mono_reflection_create_runtime_class): Remove the
4752         hack for generic type definitions and non-`Run' assemblies.
4753         (mono_reflection_bind_generic_parameters): Also use
4754         `klass->wastypebuilder' to check for TypeBuilders.
4755
4756 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
4757
4758         * class.c (mono_class_layout_fields): Fix calculation of has_references
4759         for generic types.
4760
4761         * class.c (inflate_generic_class): Fix a leak.
4762         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
4763         for generic types.
4764
4765 2005-07-11  Martin Baulig  <martin@ximian.com>
4766
4767         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
4768         on error.
4769
4770 2005-07-11  Martin Baulig  <martin@ximian.com>
4771
4772         * loader.c (find_method): Also lookup in
4773         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
4774
4775 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
4776
4777         * appdomain.c (mono_domain_unload): Don't free the error message
4778         before passing it to mono_get_exception_...
4779
4780         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
4781         
4782 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
4783
4784         * threads.c: try to better guess an available RT signal (bug #75387).
4785
4786 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
4787
4788         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
4789         and CACHE_OBJECT.
4790
4791 2005-07-07  Martin Baulig  <martin@ximian.com>
4792
4793         * class.c (mono_type_get_name_full): Return NULL for
4794         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
4795         fixes #75408.
4796
4797 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
4798
4799         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
4800         exit the appdomain as well being aborted.
4801
4802         * threadpool.c: Create all threadpool threads inside the root appdomain, and
4803         change back to the root domain after calling managed code. This enables
4804         appdomains using threadpools to be unloaded.
4805
4806 2005-07-07  Martin Baulig  <martin@ximian.com>
4807
4808         * class-internals.h
4809         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
4810         into `MonoDynamicGenericClass' since we only need it for dynamic
4811         types.
4812
4813         * reflection.c (mono_class_bind_generic_parameters): We don't need
4814         to compute the `parent' here.
4815
4816 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
4817
4818         * culture-info-table.h : regenerated.
4819
4820 2005-07-06  Martin Baulig  <martin@ximian.com>
4821
4822         * icall.c
4823         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
4824
4825         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
4826
4827 2005-07-06  Martin Baulig  <martin@ximian.com>
4828
4829         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
4830         we're doing a signature-only comparision; fixes #74945.
4831
4832 2005-07-06  Martin Baulig  <martin@ximian.com>
4833
4834         * class-internals.h (MonoGenericClass): Moved some things out into
4835         a new `MonoInflatedGenericClass' type.  
4836         (MonoInflatedGenericClass): New type; the `klass' of a
4837         `MonoGenericClass' is now computed lazyly in
4838         mono_get_inflated_generic_class().      
4839
4840         * class.c (mono_get_inflated_generic_class): New public function.
4841         (mono_class_inflate_generic_method): Removed the unused
4842         `MonoClass *' argument.
4843         (setup_generic_vtable): Don't call mono_get_inflated_method() on
4844         all the methods.
4845         (mono_class_create_generic): Make this static and merge it with
4846         mono_class_create_generic_2(); we're now called automatically from
4847         mono_get_inflated_generic_class().
4848
4849         * loader.c (mono_method_signature): Call
4850         mono_get_inflated_method() here.
4851
4852 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
4853
4854         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
4855         type of fields with RVA.
4856
4857         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
4858         for this pseudo class.
4859         (my_mono_class_from_generic_parameter): Likewise.
4860         (mono_class_init): Allow interfaces to have cctors.
4861
4862 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
4863
4864         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
4865         lazily for AOT methods.
4866
4867 2005-07-05  Martin Baulig  <martin@ximian.com>
4868
4869         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
4870         returns FALSE for a successful match, not TRUE.
4871
4872 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
4873
4874         * loader.c (mono_method_get_index): Optimize this a bit.
4875
4876 2005-07-04  Martin Baulig  <martin@ximian.com>
4877
4878         * class.c
4879         (class_compute_field_layout): Move the check for generic type
4880         definitions into mono_class_layout_fields().  Fixes #74684.
4881         (mono_class_from_generic_parameter): Correctly compute
4882         `klass->parent'; fixes #75457.
4883
4884         * reflection.c (register_assembly, register_module): Make sure
4885         `domain->rejobject_hash' is already created.
4886
4887 2005-07-02  Martin Baulig  <martin@ximian.com>
4888
4889         * class-internals.h
4890         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
4891         `MonoDynamicGenericClass'.      
4892
4893 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
4894
4895         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
4896         returned by a field getter is null, since null is a valid value.
4897
4898 2005-07-01  Martin Baulig  <martin@ximian.com>
4899
4900         * reflection.c (mono_reflection_generic_class_initialize): Update
4901         the `dgclass->fields [i].parent' to the correct class.
4902         (mono_image_get_fieldref_token): Use the declaring type, not the
4903         reflected type.
4904
4905 2005-07-01  Martin Baulig  <martin@ximian.com>
4906
4907         * loader.c (find_method): Also look in the interfaces; fixes #75429.
4908
4909 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
4910
4911         * threads.c (thread_cleanup): assert that thread != NULL
4912         (wait_for_tids_or_state_change): We were using the wrong variable
4913         when accessing wait->threads. `i' was always out of the bounds of
4914         the array.
4915
4916 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4917
4918         * loader.c: map user32 and kernel32 to libMonoSupportW
4919
4920 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
4921
4922         * appdomain.c (unload_thread_main): Mark this as WINAPI.
4923
4924 2005-06-28  Martin Baulig  <martin@ximian.com>
4925
4926         * loader.c (method_from_methodspec): Fix #75334.
4927
4928 2005-06-28  Martin Baulig  <martin@ximian.com>
4929
4930         Fix #74953 - Arrays now implement the generic IList<T> interface
4931         on the 2.0 platform.
4932
4933         * class-internals.h (MonoDefaults): Added `generic_array_class'.
4934
4935         * reflection.c (mono_class_bind_generic_parameters): New public
4936         function; similar to mono_reflection_bind_generic_parameters(),
4937         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
4938
4939         * domain.c (mono_init_internal): Try to initialize.
4940         `mono_defaults.generic_array_class' here; this'll only succeed if
4941         we're using the 2.0 corlib.
4942
4943         * icall.c
4944         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
4945         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
4946         (mono_lookup_internal_call): Added support for nested classes.
4947
4948         * loader.c
4949         (mono_get_method_from_token): Set `result->signature->pinvoke' if
4950         we're an interncall and have generic arguments.
4951
4952         * class.c
4953         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
4954         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
4955         instance of System.Array.InternalArray<T> for arrays, so they
4956         implement the generic IList<T> interface.
4957
4958 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
4959
4960         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
4961         (chastamar@yahoo.com). Fixes #75374.    
4962
4963 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
4964
4965         * culture-info-table.h: regenerated.
4966
4967 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4968
4969         * icall.c: handle spaces correctly for base64 strings.
4970
4971 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
4972
4973         * *.c: Kill some warnings.
4974
4975 2005-06-23  Duncan Mak  <duncan@novell.com>
4976
4977         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
4978         that this builds on Solaris 10 (x86).
4979
4980 2005-06-23  Martin Baulig  <martin@ximian.com>
4981
4982         * class.c
4983         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
4984         generic type definitions.
4985
4986 2005-06-23  Martin Baulig  <martin@ximian.com>
4987
4988         Fix #75331.
4989
4990         * metadata.c (mono_class_get_overrides): Renamed to
4991         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
4992         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
4993         pass it to mono_get_method_full().
4994
4995 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
4996
4997         * reflection.c (mono_reflection_create_runtime_class): take the
4998         mono_domain_lock in this method. Prevents deadlocks
4999
5000 2005-06-22  Martin Baulig  <martin@ximian.com>
5001
5002         * loader.c (method_from_methodspec): Fix #75330.
5003
5004 2005-06-22  Martin Baulig  <martin@ximian.com>
5005
5006         * reflection.c (type_get_qualified_name): Use
5007         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
5008         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
5009         argument; use it if we don't have an assembly name.
5010
5011 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
5012
5013         * object.c: In mono_message_init, set "copy out" flag for in
5014         parameters with the [Out] flag.
5015
5016 2005-06-21  Martin Baulig  <martin@ximian.com>
5017
5018         * class.c
5019         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
5020         and MONO_TYPE_PTR.
5021
5022 2005-06-21  Martin Baulig  <martin@ximian.com>
5023
5024         * class.c (mono_class_init): Don't initialize `class->fields' for
5025         generic instances since they're initialized again in
5026         compute_field_layout(). 
5027         (compute_field_layout): Set the field's `generic_info' here; fix
5028         #75320. 
5029
5030 2005-06-21  Martin Baulig  <martin@ximian.com>
5031
5032         * class-internals.h
5033         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
5034
5035         * metadata.c (mono_metadata_generic_method_equal): Also
5036         distinguish the `generic_class'; fixes #75334.
5037
5038 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5039
5040         * domain.c:
5041         * appdomain.c:
5042         * domain-internals.h:
5043         * reflection.c: 'domain_assemblies' field is now protected by its own
5044         lock. Don't call into managed code to run the AssemblyLoad event if we
5045         now there are no registered delegates for it.
5046
5047 2005-06-20  Martin Baulig  <martin@ximian.com>
5048
5049         * class.c (mono_class_is_assignable_from): Use a custom version of
5050         mono_class_has_parent() to make things work for generic instances;
5051         fix #75300.
5052
5053 2005-06-20  Martin Baulig  <martin@ximian.com>
5054
5055         * loader.c (method_from_methodspec): Apply a patch from
5056         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
5057
5058 2005-06-20  Martin Baulig  <martin@ximian.com>
5059
5060         * class.c (mono_class_init): Reverted Zoltan's last change; it
5061         breaks generics.
5062
5063 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
5064
5065         * threads.c (wait_for_tids_or_state_change): Add missing locking.
5066
5067 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5068
5069         * socket-io.c: fix the index in the socket array for writable/error
5070         sockets. Fixes bug #75306.
5071
5072 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
5073
5074         * class.c (mono_class_init): Allow interfaces to have static ctors.
5075
5076 2005-06-17  Martin Baulig  <martin@ximian.com>
5077
5078         * loader.c (method_from_methodspec): Use `context->container' when
5079         parsing the `gmethod->inst'.
5080
5081 2005-06-17  Martin Baulig  <martin@ximian.com>
5082
5083         * class.c (mono_type_get_name_recurse): Don't add the assembly
5084         name for type arguments.
5085
5086 2005-06-15  Martin Baulig  <martin@ximian.com>
5087
5088         * reflection.c (mono_image_get_inflated_method_token): Encode
5089         correct klass; fixes #75260.
5090
5091 2005-06-13 Michal Moskal <malekith@nemerle.org>
5092
5093         * icall.c: Make GetCorrespondingMethod/Constructor take
5094         MonoReflectionMethod method not MonoMethod. Removed
5095         MonoType.GetCorrespondingField, and make
5096         MonoGenericType.GetCorrespondingField take name not
5097         MonoClassField.
5098
5099 2005-06-13  Michal Moskal <malekith@nemerle.org>
5100
5101         * reflection.c (field_encode_signature, encode_locals):
5102          Make sizes of buffers for types larger (for big generic types).
5103          (create_generic_typespec,
5104          mono_reflection_sighelper_get_signature_local,
5105          mono_reflection_sighelper_get_signature_field):
5106          Add asserts for too small buffers.
5107
5108 2005-06-15  Martin Baulig  <martin@ximian.com>
5109
5110         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
5111         if our parent is not a dynamic type.
5112
5113 2005-06-15  Martin Baulig  <martin@ximian.com>
5114
5115         * class-internals.h (MonoTypeNameFormat): New enum.
5116
5117         * class.c
5118         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
5119         (mono_type_get_full_name): Removed.
5120         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
5121         argument instead of the boolean's.
5122
5123         * icall.c (ves_icall_System_MonoType_getFullName):
5124         Added `gboolean assembly_qualified'.    
5125
5126         * reflection.h
5127         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
5128
5129         * reflection.c (mono_reflection_parse_type): Parse the new type
5130         name format.
5131
5132 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5133
5134         * icall.c: no need to convert from utf16 to utf8 and then back again
5135         after the call to GetLogicalDrives.
5136
5137 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5138
5139         * icall.c: frombase64. Fix problems exposed by new tests.
5140
5141 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5142
5143         * icall.c: added internal calls for converting char [] and strings in
5144         base64 into byte [].
5145
5146 2005-06-10  Martin Baulig  <martin@ximian.com>
5147
5148         * class.c (mono_class_create_generic_2): Read the nested classes
5149         from the metadata rather than from `gklass->nested_classes' since
5150         `gklass' might not be initialized yet.
5151
5152 2005-06-09  Duncan Mak  <duncan@novell.com>
5153
5154         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
5155         all public headers. Fixes #74919.
5156
5157 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
5158
5159         * domain.c: The key for proxy_vtable_hash is now a pointer
5160         array. Added new GHashFunc and GCompareFunc functions for this.
5161
5162         * class.h: The list of interfaces in MonoRemoteClass is known in
5163         advance and can't grow (we create a new MonoRemoteClass if needed),
5164         so now the interface array can be allocated together with
5165         MonoRemoteClass.
5166         
5167         * object.c: Added a new method create_remote_class_key.
5168         Fixed mono_remote_class so it does not depend on
5169         mono_upgrade_remote_class.
5170         Removed extend_interface_array.
5171         Added new method clone_remote_class(), which makes a copy of a remote
5172         class and adds a new interface or class to it.
5173         mono_upgrade_remote_class() now creates a new remote class (or gets
5174         it from the cache) if an vtable upgrade is needed. In this way
5175         we make sure that other objects sharing the same remote class
5176         don't get the new vtable with unwanted interfaces.
5177         
5178         * object-internals.h:
5179         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
5180         
5181         * marshal.c: Track changes in mono_upgrade_remote_class().
5182
5183 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
5184         * icall.c: Add runtime methods for obtaining members of inflated
5185         class, which were created from supplied non-inflated members. It
5186         is used in internal Get{Method,Constructor,Field} methods in
5187         System.Type
5188
5189 2005-06-09  Martin Baulig  <martin@ximian.com>
5190
5191         * reflection.c
5192         (mono_reflection_bind_generic_method_parameters): Fix #75169.
5193
5194 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5195         * reflection.c (mono_image_basic_init): Define
5196         Version in MonoDynamicAssembly. 
5197         
5198 2005-06-08  Martin Baulig  <martin@ximian.com>
5199
5200         Fix #75136.
5201
5202         * loader.c
5203         (mono_method_signature_full): New public method; takes a
5204         `MonoGenericContext *'.
5205         (find_method): Use mono_method_signature_full() and pass the
5206         klass'es context to it.
5207
5208         * class.c (mono_class_is_inflated_method): Use
5209         mono_method_signature_full() and pass the context to it.
5210
5211 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
5212
5213         * object.c: add proper locking in mono_remote_class_vtable(),
5214         fixes possible memory corruption.
5215
5216 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
5217
5218         * marshal.c (mono_remoting_marshal_init): set
5219         initialized after initialization.
5220
5221 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
5222
5223         * locales.c : hush.
5224
5225 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
5226
5227         * object.c (extend_interface_array): fix really silly
5228         memory corrupting / comparison bug.
5229
5230 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5231
5232         * reflection.c: Functions added to support the creation
5233         of CustomAttributeData, which includes Attribute data
5234         used by ReflectionOnly methods.
5235
5236         * reflection.h:  mono_reflection_get_custom_attrs_data and
5237          mono_custom_attrs_data_construct added (functions exposed).
5238
5239          * icall.c: Added mono_reflection_get_custom_attrs_data
5240          as icall.
5241         
5242 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
5243
5244         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
5245         lupus's request.
5246
5247 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
5248
5249         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
5250
5251         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
5252         dynamic DllImportAttribute.
5253
5254         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
5255         dynamic DllImportAttribute.
5256
5257         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
5258         Fixes #75162.
5259
5260 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5261
5262         * threads.c: avoid segfault when an unstarted thread is aborted.
5263
5264 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
5265
5266         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
5267         Returns the name and version of the runtime for reporting.
5268
5269 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5270
5271         * appdomain.c: bump corlib version.
5272         * object-internals.h: new field in MonoReflectionAssembly.
5273
5274 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5275
5276         * object-internals.h: Carlos forgot to add this field.
5277
5278 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
5279
5280         * icall.c: Added create_version to create instances
5281         of Version of MonoReflectionAssemblyName. This change helps
5282         the AssemblyName tests to keep running fine.
5283         
5284 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
5285   
5286         * object.c (mono_method_return_message_restore): A somehow less
5287         intrusive fix for #75138.
5288
5289 2005-06-03  Raja R Harinath  <rharinath@novell.com>
5290
5291         * object.c (mono_method_return_message_restore): Fix computation
5292         of expected number of out args.
5293
5294 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
5295
5296         * reflection.c (mono_image_get_method_info): Fix the case when the
5297         charset is empty.
5298
5299 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
5300
5301         * object.c: Added missing null check in
5302           mono_method_return_message_restore.
5303
5304 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
5305
5306         * reflection.c (mono_image_get_method_info): Handle the case when
5307         dllentry is empty.
5308
5309 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
5310
5311         * object.c: When creating the vtable for a proxy, take into account
5312         all inherited interfaces, not only the ones registered in
5313         iclass->interfaces. This fixs bug #74996.
5314         Also, in mono_method_return_message_restore, verify that the array
5315         of out args has the expected lengh.
5316
5317 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5318
5319         * socket-io.c: update the timeout in Poll when the call is interrupte.
5320
5321 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5322
5323         * socket-io.c: support abort/suspend in Select_internal after last
5324         change.
5325
5326 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5327
5328         * threadpool.c: remove warning.
5329
5330 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5331
5332         * icall.c:
5333         * socket-io.[ch]: Select_internal uses poll() now when available, thus
5334         removing the 1024 limit from select(). Runtime part of the fix for
5335         bug #71203.
5336
5337 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5338
5339         * socket-io.c: when resolving the addresses for the same
5340         host returned by gethostname(), get the local IPs from the interface
5341         list. Loopback addresses are discarded if the are interfaces up with
5342         non-loopback ones. Fixes bug #63265.
5343
5344 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
5345
5346         * appdomain.c, verify.c, object-internals.h, reflection.c:
5347         bumped corlib number to 36, and added new extra_flags field
5348         to ReflectionMethodBuilder and friends.  Fixes #75060.
5349
5350 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
5351
5352         * gc.c: register a new weak link only if the object is non-null
5353         (fixes bug#75047).
5354
5355 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
5356
5357         * culture-info.h : short time pattern too.
5358
5359 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
5360
5361         * culture-info.h : expand long time pattern string length.
5362
5363 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
5364
5365         * culture-info-table.h : update (more French date format; #72788).
5366
5367 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
5368
5369         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
5370         the method is static. Fixes #75029.
5371
5372 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
5373
5374         * reflection.c: Update the table_idx field of method builders after
5375         saving the module, since it can change. This is a workaround for
5376         bug #74914. 
5377
5378 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
5379
5380         * culture-info-table.h : update (additional French date format).
5381
5382 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
5383
5384         * icall.c (ves_icall_type_Equals): Revert last change.
5385         
5386         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
5387
5388         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
5389
5390 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
5391
5392         * class-internals.h: Added executioncontext_class field to 
5393         MonoDefaults structure.
5394         * domain.c: Cache System.Threading.ExecutionContext class in 
5395         mono_defaults.
5396         * object.c: Capture the ExecutionContext for asynchroneous calls in
5397          mono_async_result_new.
5398         * object-internals.h: Added execution_context and original_context 
5399         fields to MonoAsyncResult. Added execution_context to MonoThread.
5400         * security-manager.c|.h: Added mono_get_context_capture_method to 
5401         return the capture method (if required by the security manager or by
5402         the framework version used).
5403         * threadpool.c: Apply capture (if present) ExecutionContext in 
5404         mono_async_invoke and revert to original context after it completes.
5405
5406 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
5407
5408         * culture-info-table.h : updated (real hacky solution for zh-CHT).
5409
5410 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
5411
5412         * culture-info-table.h : zh-CHT related workaround.
5413
5414 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
5415
5416         * marshal.c (emit_marshal_custom): Add some error checking and call the
5417         methods in the ICustomMarshaler interface. Fixes #74875.
5418         
5419         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
5420         native->managed wrappers.
5421
5422 2005-05-12  Martin Baulig  <martin@ximian.com>
5423
5424         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
5425         here and use the loader lock.
5426
5427         * mono-debug.c: Properly lock when the debugger is not attached.
5428         (mono_debug_init): Release the initial lock if we're not running
5429         in the debugger.
5430
5431 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
5432
5433         * marshal.c (emit_marshal_custom): Pass through NULL values without
5434         calling the custom marshalling routines.
5435
5436         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
5437         conversion in structures. Fixes #74882.
5438
5439 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
5440
5441         * culture-info-table.h : zh-* cultures were missing.
5442
5443 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
5444
5445         * threads.c: Added a new event background_change_event which is signaled
5446         when a thread changes its background mode.
5447         Moved here several checks previously done in managed code. The checks
5448         require the thread lock, and using the thread lock in managed code
5449         can result in deadlocks.
5450         Merged Start_internal and Thread_internal into a single method. Now 
5451         Thread_internal does all work of creating and starting a thread.
5452         Added icalls for setting and getting the state of the object. Moved from
5453         managed code to avoid locking there.
5454         Added wait_for_tids_or_state_change() which is called instad of
5455         wait_for_tids when waiting for non-backround threads to end. This method
5456         will return if one of the threads ends or the background_change_event
5457         is signaled.
5458         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
5459         the background mode. This method signals the background_change_event
5460         event.
5461         * icall.c:
5462         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
5463         removed Start_internal.
5464         
5465 2005-05-11  Martin Baulig  <martin@ximian.com>
5466
5467         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
5468         to order of some fields to get proper alignment on 64-bit machines.
5469
5470 2005-05-11  Martin Baulig  <martin@ximian.com>
5471
5472         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
5473         changes as they're broken and completely fuck up the debugger.
5474
5475         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
5476
5477 2005-05-10  Martin Baulig  <martin@ximian.com>
5478
5479         * reflection.c (mono_reflection_generic_class_initialize): Don't
5480         call mono_class_setup_parent() here.
5481
5482 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5483
5484         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
5485         send/receive timeout use an integer in milliseconds. We were using a
5486         struct timeval.
5487
5488 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5489
5490         * locales.c:
5491         (internal_get_cultures): reserve the first slot of the array for the
5492         InvariantCulture, which will be filled in managed code.
5493
5494 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
5495
5496         * reflection.c (mono_image_fill_module_table): Initialize the
5497         GENERATION field as well.
5498
5499 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5500
5501         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
5502         Monitor.Enter on the object.
5503
5504 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
5505
5506         * threads.c: Enable the wait for running threads when exiting.
5507         * icall.c: Suspend all threads before exiting.
5508
5509 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
5510
5511         * assembly.c (mono_assembly_load_reference): Fix warning.
5512
5513 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5514
5515         * threadpool.c: changed the default number of threads per cpu. From now
5516         on, the default will be 20 + (5 * number of cpus) instead of 50.
5517
5518 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
5519
5520         * loader.c (mono_method_get_signature_full): Add locking here.
5521
5522 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
5523
5524         * appdomain.c: Moved methods for parsing and freeing assembly
5525         names to assembly.c.
5526         * assembly.c, domain-internals.h: Created public methods for parsing
5527         assembly names. Fixed mono_assembly_load_with_partial_name:
5528         it now finds the best match, taking into account the version,
5529         token and culture specified in the partial name. Also return
5530         the latest version if no version information is specified.
5531
5532 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
5533
5534         * threadpool.c: replace check for SocketAsyncCall class.
5535
5536 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5537
5538         * threadpool-internals.h:
5539         * Makefile.am: added threadpool-internals.h
5540
5541         * threadpool.c: call mono_unhandled_exception on exceptions not handled
5542         that happen in threadpool threads (tested on MS).
5543         (mono_thread_pool_remove_socket): new function that dispatch any pending
5544         AIO call on a socket that is closing. By now only epoll really needs it,
5545         as select/poll wake up when the socket closes.
5546
5547
5548         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
5549
5550 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
5551
5552         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
5553
5554 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
5555
5556         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
5557
5558 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
5559
5560         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
5561         has an abort request, convert it into a suspend request.
5562
5563 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
5564
5565         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
5566         warning for the usage of `UnmanagedFunctionPointerAttribute' which
5567         is not supported yet.
5568
5569 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5570
5571         * image.c: register assemblies loaded from data (bundles) in the loaded
5572         assemblies hash. Fixes bug #74772.
5573
5574 2005-04-29  Martin Baulig  <martin@ximian.com>
5575
5576         * class.c (mono_type_get_name_recurse): Update to the new naming
5577         schema from the latest .NET 2.x beta2.
5578         (mono_class_setup_vtable_general): If we're a generic instance,
5579         copy the vtable from our generic type definition and inflate all
5580         the methods in it.
5581
5582         * loader.c (find_method): Update to the new naming schema from the
5583         latest .NET 2.x beta2.
5584
5585 2005-04-29  Raja R Harinath  <harinath@gmail.com>
5586
5587         * class.c (mono_class_init): Add a mono_loader_unlock to the
5588         #74734 fix.
5589
5590 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
5591
5592         * icall.c (ves_icall_System_Environment_Exit): Remove the 
5593         suspend_all_other_threads () call for the time being, since it can hang.
5594
5595         * threads.c (mono_thread_manage): Similarly, disable the waiting for
5596         the background threads to exit, since it can also hang.
5597
5598         * class.c (mono_class_init): Applied patch from Ankit Jain 
5599         (radical@gmail.com). Avoid pending init errors when a field refers
5600         to a nested class using a typeref. Fixes #74734.
5601
5602         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
5603         this for dynamic modules.
5604
5605 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5606
5607         * threads.c: don't wait for threads that are in the process of aborting
5608         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
5609         and waiting for background threads to finish. This makes xsp and
5610         mod-mono-server exit without random length delays and/or hangs.
5611
5612 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5613
5614         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
5615
5616 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
5617
5618         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
5619         dynamic types to prevent infinite loops. Fixes #74727.
5620
5621         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
5622         ..._is_assignable_to.
5623
5624 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
5625
5626         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
5627
5628 2005-04-25  Martin Baulig  <martin@ximian.com>
5629
5630         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
5631
5632         * domain.c
5633         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
5634
5635         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
5636
5637         * reflection.c (build_compressed_metadata): Set metadata header
5638         version to 2.0.
5639
5640 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
5641
5642         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
5643         number into an integral and a decimal part. Fixes #70473.
5644
5645         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
5646
5647 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
5648
5649         * culture-info-table.h : reflected the latest locale-builder output.
5650
5651 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5652
5653         * threadpool.c: check for SuspendRequested too when deciding if
5654         mono_thread_interruption_checkpoint should be called.
5655
5656 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5657
5658         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
5659         * threads.c: remove interruption_mutex and use Interlocked instead. When
5660         suspending all the threads, wait for all the suspended events at once.
5661         If we're shutting down and get an APC that is going to be queued,
5662         call mono_thread_execute_interruption immediately, as the thread might
5663         be sleeping on a pthread condition or mutex.
5664
5665         * icall.c: call mono_runtime_set_shutting_down before suspending the
5666         threads.
5667
5668         Fixes bug #74693. And now xsp is happier when exiting.
5669
5670 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
5671
5672         * loader.c (mono_stack_walk): Fix #74690.
5673
5674 2005-04-22  Martin Baulig  <martin@ximian.com>
5675
5676         * mono-debug.h (MonoDebugMethodJitInfo): Added
5677         `MonoDebugMethodJitInfo *jit'.
5678
5679         * mono-debug.c (mono_debug_read_method): Cache the
5680         MonoDebugMethodJitInfo in `address->jit'.
5681         (mono_debug_free_method_jit_info): New public method.
5682
5683 2005-04-22  Martin Baulig  <martin@ximian.com>
5684
5685         * class.c (mono_class_is_assignable_from): Disallow
5686         type parameter -> interface.
5687
5688 2005-04-21  Dick Porter  <dick@ximian.com>
5689
5690         * threads.c (mono_thread_create): Turn an assertion into an error.
5691
5692 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
5693
5694         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
5695         
5696         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
5697         Fix some gcc 4.0 warnings.
5698
5699 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
5700
5701         * file-io.c: fix alt dir separator char on unix systems
5702         and cleanup (fixes bug #71214).
5703
5704 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
5705
5706         * marshal.c: Use CALLVIRT instead of CALL when dispatching
5707         a call to a remote domain, since the method may be an
5708         interface method in the client domain. This fixes bug #74192.
5709
5710 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5711
5712         * threadpool.c: recv/send are now performed before going back to managed
5713         code to save one transition.
5714
5715 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5716
5717         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
5718
5719         * metadata/threadpool.c: removed hack to workaround the bug above.
5720
5721         Fixes bug #74618.
5722
5723 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
5724
5725         * reflection.c reflection.h: Fix handling of parameter defaults in
5726         dynamic methods. Also fixes handling of parameter attributes.
5727         Fixes #74609.
5728
5729         * mono-debug.c (mono_debug_close_image): Fix warning.
5730
5731 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5732
5733         * socket-io.h: replaced old unused field with new 'blocking'.
5734         * threadpool.c: restore socket blocking state on windows(tm).
5735
5736 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
5737
5738         * icall.c: don't return the codebase in the AssemblyName[] returned by
5739         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
5740         * object-internals.h: Removed FIXME (fields were presents) and fixed
5741         versioncompat declaration.
5742
5743 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5744
5745         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
5746         not closed, so don't cleanup when it happens.
5747
5748 2005-04-13  Chris Toshok  <toshok@ximian.com>
5749
5750         * mono-debug-debugger.h: change prototype for
5751         mono_debugger_lookup_type.
5752
5753         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
5754         this function, although it should probably be named
5755         mono_debugger_init_type.
5756
5757 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5758
5759         * threadpool.c: fix non-AIO case.
5760
5761 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
5762
5763         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
5764         the built-in profiler to measure just JIT compilation times.
5765
5766 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5767
5768         * threadpool.c: the epollfd might be closed by another thread at
5769         any time, so ignore EBADF at treat it as a "we're closing" sign.
5770
5771 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5772
5773         * threadpool.c: release the semaphores with a count equals to the number
5774         of working threads in both IO and regular pools. Fixed typo that messed
5775         up the count of IO pool threads. Don't initialize the pipe handles if
5776         we're using epoll.
5777
5778 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5779
5780         * threadpool.c: some systems don't like a NULL when deleting the socket
5781         from epoll.
5782
5783 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5784
5785         * threadpool.c: fix semaphore allocation.
5786
5787 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5788
5789         * threadpool.c: added epoll() based implementation for asynchronous IO
5790         that is used instead of the default poll() when available.
5791         It can be disabled by setting MONO_DISABLE_AIO.
5792
5793 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5794
5795         * threadpool.c: windows needs 'closesocket' and instead of returning
5796         0 when the stream is closed while in select, it returns -1. Fixes bug
5797         #74573.
5798
5799 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
5800
5801         * class.c (class_compute_field_layout): Fix the regression caused by
5802         the previous try.
5803
5804 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5805
5806         * threadpool.c: separate pool for socket async. IO.
5807         * threadpool.h: mono_max_worker_threads is not a global any more.
5808
5809 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
5810
5811         * class.c (class_compute_field_layout): Fix #74549.
5812
5813 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5814
5815         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
5816         use 2 connected sockets instead.
5817
5818 2005-04-08  Miguel de Icaza  <miguel@novell.com>
5819
5820         * mono-config.c: Add new entry point for mkbundle
5821         mono_config_parse_memory. 
5822
5823 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5824
5825         * threadpool.c: removed another unused function.
5826
5827 2005-04-08  Ankit Jain  <radical@corewars.org>
5828
5829         * reflection.c (get_default_param_value_blobs): Add 'types'
5830         parameter to get the types encoded in the constant table.
5831         (mono_param_get_objects): Use the type from the constant table,
5832         not the type of the parameter, when creating default values.
5833         Handle null default values correctly.
5834
5835 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5836
5837         * file-io.c:
5838         * file-io.h:
5839         * threadpool.c:
5840         * threadpool.h:
5841         * icall.c:
5842         * socket-io.c: removed dead code for async IO.
5843
5844 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5845
5846         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
5847
5848         * threadpool.c: intercept socket async. calls and pass them to a thread
5849         that is polling and dispatching the job items to the threadpool as
5850         socket become ready. Fixes bugs #71217, #71933.
5851
5852         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
5853         between char and short/ushort arrays.
5854
5855         * socket-io.c: remove dead code.
5856
5857 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
5858
5859         * locales.c,
5860           icall.c : removed InternalToUpper_Comp() and
5861           InternalToLower_Comp().
5862
5863 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
5864
5865         * char-conversions.h : The tables were incorrectly generated. Should
5866           be generated against invariant culture.
5867
5868 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
5869
5870         * object.c (mono_runtime_invoke_array): Fix return value when 
5871         passing pre-created valuetype objects to ctors.
5872
5873         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
5874         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
5875         Fixes #74338.
5876
5877 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
5878
5879         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
5880         only used with --security and hides the wrong corlib version error.
5881
5882 2005-03-30  Joshua Tauberer  <tauberer@for.net>
5883
5884         * class.c: Changed mono_class_name_from_token so that types
5885         outside of a namespace don't have an initial period.  Improved
5886         the g_warning message used in _mono_class_get when loading
5887         fails.
5888         * assembly.c: In mono_assembly_load_reference, when an assembly
5889         can't be found, "No such file or directory" is misleading and
5890         unhelpful because a few paths were checked for the presence of
5891         the assembly.  When that happens (ENOENT), display a nicer
5892         message indicating the directories that were searched.  In all
5893         cases, the warning is made easier to read for non-hackers.
5894
5895 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
5896
5897         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
5898         project/solution.
5899         * appdomain.h|domain.c: Removed inline from functions.
5900         * appdomain.c: Reduced warnings when compiling on windows.
5901         * icall.c: Fixed output_debug declaration to gunichar2*.
5902         * mono-config.c: Reduced warnings when compiling on windows.
5903         * rand.c: Added missing "windows.h". Added missing return value.
5904         * rawbuffer.c: Added missing winsock2.h for windows.
5905         * sysmath.h: Added mono-compiler.h header to allow/ease 
5906         compilation with non-GCC compilers.
5907         * threads.c: Fixed declarations to compile with VS.NET C compiler.
5908         Removed cast warnings.
5909
5910         Adapted from the work of J Lothian (for VC6).
5911
5912 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
5913
5914         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
5915         from default_path.
5916
5917 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
5918
5919         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
5920         the 2.0 profile.
5921
5922 2005-03-27  Raja R Harinath  <harinath@gmail.com>
5923
5924         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
5925         has to be in $(exec_prefix).  $(prefix) is for arch-independent
5926         stuff, and it would probably use $(prefix)/share rather than
5927         $(prefix)/lib.
5928
5929 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5930
5931         * console-io.c: added 2 includes that might be missing.
5932
5933 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
5934
5935         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
5936         profile.
5937
5938         * reflection.c (create_custom_attr): Allocate the params array using
5939         alloca so it gets GC tracking.
5940
5941 2005-03-23  Chris Toshok  <toshok@ximian.com>
5942
5943         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
5944         out some spew.
5945
5946 2005-03-24  Raja R Harinath  <rharinath@novell.com>
5947
5948         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
5949         changes to pick up any changes in prefix, etc.
5950
5951 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5952
5953         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
5954         
5955         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
5956         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
5957
5958 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5959
5960         * class-internals.h object-internals.h class.c reflection.c: Extend the
5961         mono_lookup_dynamic_token () function to return the class of the
5962         token as well. 
5963
5964         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
5965         well. Fixes #73848.
5966
5967 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
5968
5969         * security-manager.c: Skip inheritance checks for intra-corlib
5970         class inheritance and method overrides. This skips a lot of checks
5971         and (anyway) permissions cannot work until corlib is loaded.
5972
5973 2005-03-23  Martin Baulig  <martin@ximian.com>
5974
5975         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
5976         MONO_TYPE_GENERICINST.  
5977
5978 2005-03-23  Martin Baulig  <martin@ximian.com>
5979
5980         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
5981
5982 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5983
5984         * class.c: added locking comments to some functions.
5985         Cache the interface offsets arrays (saves about 20 KB
5986         of runtime memory in a typical app).
5987         Reduce the time overhead in mono_class_setup_supertypes ().
5988
5989 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
5990
5991         * icall.c: speedup and fix leaks in GetMethodsByName and
5992         GetPropertiesByName.
5993
5994 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5995
5996         * reflection.c: some locking fixes.
5997
5998 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5999
6000         * metadata.c: added missing break in case statement.
6001
6002 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
6003
6004         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
6005         typedbyref return values. Fixes #73941.
6006
6007 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
6008
6009         * security-manager.c|h: Added demandunmanaged method and 
6010         suppressunmanagedcodesecurity class to MonoSecurityManager.
6011         Renamed aptc class to allowpartiallytrustedcallers.
6012
6013 2005-03-17  Martin Baulig  <martin@ximian.com>
6014
6015         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
6016
6017 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6018
6019         * file-io.c: disabled file async. IO using aio_*. It uses the
6020         threadpool now. Workaround for bug #73718.
6021
6022 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6023
6024         * assembly.h, mono-config.c: added code to deal with bundled configs
6025         for bundled assemblies.
6026
6027 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
6028
6029         * *.c, private.h: cleanup, removing old private.h header file.
6030
6031 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
6032
6033         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
6034         and throw_on_unmappable_char attributes.
6035
6036 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
6037
6038         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
6039         _ProcessName_internal.
6040
6041 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
6042
6043         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
6044         #73631.
6045
6046         * icall.c threads.c threads-types.h: Remove slothash icalls as they
6047         are no longer used.
6048
6049 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
6050
6051         * object.c (compute_class_bitmap): Add support for generics. Fixes
6052         #73527.
6053
6054 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
6055
6056         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
6057
6058 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6059
6060         * filewatcher.c: commented out the code for windows watcher, as we don't
6061         use it (we use the managed implementation instead).
6062
6063 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
6064
6065         * object-internals.h (MonoThread): Remove 'unused1' field.
6066
6067         * appdomain.c: Bump corlib version.
6068
6069         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
6070
6071         * reflection.c (mono_reflection_create_runtime_class): Remove the
6072         AssemblyBuilder.Save optimization since it causes too many problems.
6073
6074 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
6075
6076         * exception.c|h: Added mono_get_exception_reflection_type_load to
6077         create a ReflectionTypeLoadException object.
6078         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
6079         to return NULL is a InheritanceDemand fails during reflection. Updated
6080         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
6081         ReflectionTypeLoadException if an InheritanceDemand fails during 
6082         reflection. Added icall mapping for GetLinkDemandSecurity.
6083         * security-manager.c|h: Added ves_icall_System_Security_
6084         SecurityManager_GetLinkDemandSecurity internal call to return the
6085         class and methods permissions set for a LinkDemand. Removed unused
6086         fields in MonoSecurityManager.
6087
6088 2005-03-10  Martin Baulig  <martin@ximian.com>
6089
6090         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
6091         it's a generic instance.
6092
6093 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
6094
6095         * reflection.c (mono_get_object_from_blob): Applied patch from
6096         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
6097
6098         * class.c (mono_class_is_assignable_from): Another try at fixing 
6099         #73469 without breaking anything.
6100
6101 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
6102
6103         * class.c: (mono_class_is_assignable_from): Revert the last changes
6104         since they don't work with generics.
6105         
6106         * class.c (mono_class_is_assignable_from): Fix build bustage.
6107
6108         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
6109         the managed IsAssignableFrom method. Fixes #73469.
6110
6111         * reflection.c (mono_reflection_call_is_assignable_from): New helper
6112         function.
6113
6114 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
6115
6116         * object.c (mono_load_remote_field_new): Fix returning uninitialized
6117         memory when the remoting callback does not sets the out arguments.
6118         Fixes #73007.
6119
6120         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
6121         by mistake.
6122
6123         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
6124
6125         * object-internals.h (MonoStackFrame): Sync with managed object layout.
6126
6127         * appdomain.c: Bump corlib version.
6128
6129 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
6130
6131         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
6132         function.
6133
6134         * threads.c (mono_thread_attach): Detect threads which are not started
6135         by the GC pthread wrappers.
6136
6137 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
6138
6139         * icall.c: Added new icall for RNG.
6140         * rand.c|h: Added new icall to open the RNG. This allows to share a 
6141         single handle on Linux to access /dev/urandom and fix #73183.
6142
6143 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
6144
6145         * object.c: setting the new vtable in a transparent proxy object must
6146         not change the GC descriptor.
6147
6148 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6149
6150         * object.c: fixed compilation without GCJ support.
6151         * reflection.c: for runtime-created types ensure klass->has_references
6152         is correct (bug #73215).
6153
6154 2005-03-02  Martin Baulig  <martin@ximian.com>
6155
6156         * class.c (mono_class_is_assignable_from): Make this work if
6157         `oklass' is a generic instance; fixes #72831.
6158
6159 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
6160
6161         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
6162         with hasthis set.
6163         
6164         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
6165
6166         * marshal.c: Reorganize native->managed marshalling code to also use
6167         the emit_marshal_... functions.
6168
6169 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
6170
6171         * object.c: typed allocs have issues with bitmap sizes > 30,
6172         so check for max_set >= 30.
6173
6174 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
6175
6176         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
6177         managed code. Fixes #73012.
6178
6179         * metadata.h (MonoMarshalSpec): Add elem_mult field.
6180
6181         * metadata.c reflection.c: Load/Emit elem_mult as well.
6182         
6183         * metadata.h (MonoMarshalSpec): Add comment.
6184
6185         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
6186
6187         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
6188         num_elem to -1 if not given.
6189
6190         * object-internals.h (MonoReflectionMarshal): Add has_size field.
6191
6192         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
6193         given values.
6194
6195 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
6196
6197         * null-gc.c (mono_gc_free_fixed): Was not compilable.
6198
6199 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
6200
6201         * reflection.c (encode_marshal_blob): Encode param_num field as well.
6202
6203         * object-internals.h (MonoReflectionMarshal): Add param_num field.
6204
6205 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
6206
6207         * object.c: generalized the reference bitmap creation
6208         and added hooks for the new GC.
6209         * class-internals.c: removed the gc_bitmap field from MonoClass.
6210
6211 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6212
6213         * domain.c: help the compiler to produce better code
6214         in mono_jit_info_table_find ().
6215
6216 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
6217
6218         * object.c: make all allocations look typed.
6219
6220 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6221
6222         * socket-io.c: load Mono.Posix if it's not loaded already
6223         (fixes bug#73033).
6224
6225 2005-02-24  Martin Baulig  <martin@ximian.com>
6226
6227         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
6228         * reflection.c (dup_type): Likewise.
6229
6230 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
6231
6232         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
6233         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
6234
6235 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6236
6237         * domain.c, threads.c, object-internals.h: make the critical thread
6238         local vars use the fast access mode (even when we're compiled in
6239         a lib). Provide accessors to be used by the jit during codegen.
6240
6241 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
6242
6243         * appdomain.c: Changed hook functios behavior to include
6244         support for the reflection only assemblies. Some icalls were changed
6245         to support the mentioned assemblies too. Signatures of static methods
6246         try_assembly_resolve and real_load now have an additional parameter:
6247         refonly.
6248
6249         * assembly.c: General changes to mono_assembly_ methods to support
6250         reflection only api. Functions mono_assembly_open, mono_assembly_load,
6251         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
6252         suffix, to support an additional gbool parameter to specify whether
6253         the assembli is reflection only or not. Created some new hook functions 
6254         to add support for reflection only assemblies. Signatures of static 
6255         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
6256         have now an additional parameter: refonly.
6257
6258         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
6259         indicating whether the assembly is reflection only or not.
6260
6261         * exception.c: Add mono_get_exception_invalid_operation.
6262
6263         * icall.c: Throw an InvalidOperationException when trying to invoke
6264         a property/method/event, or trying to set/get the value of a field.
6265         Also add an icall to retrieve the ref_only flag to the
6266         MonoReflectionAssembly.
6267
6268 2005-02-23  Chris Toshok  <toshok@ximian.com>
6269
6270         Part of fix for #72827.
6271         * mono-debug.c (mono_debug_add_method): add lexical block data to
6272         the info we write.  Kind of a hack at the moment - we copy the
6273         lexical block info from the MonoDebugMethodInfo to the
6274         MonoDebugMethodJitInfo here, before writing it.
6275         (mono_debug_read_method): read the lexical block info.
6276
6277         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
6278
6279         * debug-mono-symfile.h: add lexical block support.
6280
6281         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
6282         support.
6283
6284 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
6285
6286         * loader.c (mono_lookup_pinvoke_call): Fix warning.
6287
6288         * object.c (mono_runtime_free_method): Call mono_free_method () and
6289         put the TODOs there.
6290
6291         * loader.c (mono_free_method): Free up most memory allocated for 
6292         dynamic methods.
6293
6294 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6295
6296         * reflection.c: properly flag a Type argument to a
6297         named custom attr value (bug #72248).
6298
6299 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6300
6301         * reflection.c: reduce code duplication in named custom
6302         attribute encoding.
6303
6304 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
6305
6306         * reflection.c: properly encode custom attrs of type object
6307         (bug #72649).
6308
6309 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
6310
6311         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
6312
6313 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
6314
6315         * socket-io.c: load System.dll if it's not loaded already
6316         (bug #72850 and #70477).
6317
6318 2005-02-21  Martin Baulig  <martin@ximian.com>
6319
6320         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
6321         generic instances.
6322
6323 2005-02-21  Martin Baulig  <martin@ximian.com>
6324
6325         * reflection.c (mono_image_build_metadata): We also need to
6326         "fixup" the MethodImpl table after we computed the final method
6327         indices.  Call fixup_methodimpl() to do that.
6328         (fixup_methodimpl): New private method.
6329
6330 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
6331
6332         * assembly.c: special case mscorlib.dll (bug#72536),
6333         patch from Carlos Alberto Cortez.
6334
6335 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
6336
6337         * threads-types.h threads.c: Fix build bustage.
6338
6339         * threads.c: Use a union for long<->double conversions.
6340
6341         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
6342         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
6343
6344         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
6345         containing the checkpoint call with NOT_TAKEN.
6346         
6347         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
6348         checkpoint before pushing the arguments, so they won't have to be
6349         spilled to stack.
6350
6351 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6352
6353         * domain.c, assembly.c, domain-internals.h: make some data
6354         const and relocation-free.
6355
6356 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
6357
6358         * object.c, appdomain.c, class-internals.h: introduce the
6359         MonoClassRuntimeInfo structure to hold the info needed to
6360         use a class at runtime. Made mono_class_vtable() lock-free
6361         for all the appdomains.
6362
6363 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
6364
6365         * metadata-internals.h, image.c: introduce a per-image mempool to
6366         be used for memory that has the same lifetime as the image.
6367
6368 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
6369
6370         * domain.c: In mono_init_internal(), instead of selecting the first
6371         runtime version supported by an executable, get a list of all
6372         supported versions and select the one for which an mscorlib exists
6373         (since even if the runtime supports a given version, it doesn't mean
6374         that the framework for that version is installed).
6375         Modified get_runtimes_from_exe to support this behavior.
6376         In supported_runtimes, added information about additional system
6377         assembly versions.
6378         
6379         * assembly.c: Added support for more than one system assembly version
6380         per runtime version. Updated the assembly list.
6381         In mono_assembly_remap_version, removed the initial version check,
6382         since we don't know to which version we need to compare until we
6383         get the version set on which the assembly is based.
6384         Moved the code for loading corlib into the new method
6385         mono_assembly_load_corlib(), so it can be used by the initialization
6386         code.
6387         
6388         * domain-internals.h: Updated data structures and added declaration
6389         for mono_assembly_load_corlib.
6390
6391 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
6392
6393         * reflection.c (resolve_object): Fix the creation of the signature in 
6394         the SignatureHelper case.
6395
6396         * assembly.c (mono_assembly_remap_version): Fix binary search.
6397         
6398 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
6399  
6400         * class.c: Added inheritance check when a method is overloaded (from a
6401         virtual method or when implementing an interface) and when a class is
6402         inherited. Added functions to set a failure for a class and to 
6403         retreive the exception from a failure.
6404         * class-internals.h: Added fields to MonoClass to keep the exception
6405         information status for inheritance (or other exceptions) to be thrown
6406         later (i.e. not at load time).
6407         * object.c: Throw the inheritance SecurityException when a type is to 
6408         be created with either class or method inheritance violations.
6409         * reflection.c|h: Fix when getting declsec from a class. Removed 
6410         unrequired code for class. Improved sanity in parameter naming.
6411         * security-manager.c|h: Added functions to check for class and method
6412         inheritance.
6413
6414 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
6415
6416         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
6417         and has_finalize in dynamic types as well.
6418
6419 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
6420
6421         * culture-info-table.h : fixed currency format for en-GB (and so on).
6422
6423 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
6424
6425         * gc.c: ensure the GC handles never have 0 as a value.
6426
6427 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
6428
6429         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
6430         a pointer to a struct to unmanaged code. Fixes #72625.
6431
6432 2005-02-16  Martin Baulig  <martin@ximian.com>
6433
6434         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
6435
6436 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
6437
6438         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
6439
6440 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
6441
6442         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
6443
6444         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
6445         UnmanagedFunctionPointerAttribute, use it for determining calling convention
6446         etc. Fixes #71471.
6447
6448         * reflection.c (mono_custom_attrs_get_attr): New helper function.
6449
6450         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
6451
6452 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
6453
6454         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
6455         changes to make the current context a field in MonoThread.
6456
6457 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
6458
6459         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
6460         the last change.
6461         
6462         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
6463         extracted from mono_marshal_get_native_wrapper.
6464
6465         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
6466         to create wrappers around native functions.
6467
6468         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
6469         delegates for arbitrary function pointers. Fixes #71472.
6470
6471 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6472
6473         * threads.c: cleaned up the code a little.
6474
6475 2005-02-15  Martin Baulig  <martin@ximian.com>
6476
6477         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
6478         the data table.
6479
6480         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
6481         allocate larger chunks if needed.
6482
6483 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
6484
6485         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
6486         in by mistake.
6487
6488 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
6489
6490         * domain.c: keep the domains in an array and ensure the domain ids
6491         are kept small, so they can be used as indexes to domain-specific data
6492         with a small memory overhead.
6493
6494 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
6495
6496         * icall.c: Handle byref types in Type icalls. Fixes #72544.
6497
6498 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
6499
6500         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
6501
6502 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
6503
6504         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
6505
6506         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
6507         values.
6508
6509         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
6510         
6511 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
6512
6513         * domain-internals.h: add the hashtable here.
6514
6515         * class-internals.h: Remove `info' from MonoMethod
6516
6517         * domain.c: Add a new hashtable, jit_trampoline_hash
6518
6519 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6520
6521         * object.c: don't set the value of static fields
6522         (fixes bug#72494).
6523
6524 2005-02-11  Martin Baulig  <martin@ximian.com>
6525
6526         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
6527         (mono_debug_add_method): Silently ignore the method if it's too big.
6528         (mono_debug_add_type): Likewise.
6529
6530 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
6531
6532         * threads.c, appdomain.c: remove #ifdefs from the code.
6533
6534 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
6535
6536         * metadata-internals.h: Added flags to MonoAssembly to cache the most
6537         common security informations. This allows us to stay in unmanaged code
6538         when doing LinkDemand and it's special cases (except for the first 
6539         time for initialization). The flags a very much used with --security.
6540         * reflection.c|h: Added code to get declarative security attributes 
6541         for LinkDemand and InheritanceDemand. This required to refactor the
6542         existing code for Demand.
6543         * security-manager.c|h: Added new method fields for the special cases
6544         of LinkDemand.
6545
6546 2005-02-10  Martin Baulig  <martin@ximian.com>
6547
6548         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
6549         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
6550
6551 2005-02-10  Martin Baulig  <martin@ximian.com>
6552
6553         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
6554         debugging code; this is almost a complete rewrite.
6555
6556         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
6557
6558 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6559
6560         * domain.c, object.h: expose mono_string_equal () and 
6561         mono_string_hash ().
6562         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
6563         it's implemented in managed code.
6564
6565 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6566
6567         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
6568         lo leak objects between appdomains.
6569
6570 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6571
6572         * assembly.c: old compilers compilation fix from 
6573         robertj@gmx.net (Robert Jordan).
6574
6575 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
6576
6577         * class-internals.h: Little reminder for the future.
6578
6579         * debug-helpers.c: Fix up wrapper_type_names
6580
6581 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6582
6583         * image.c, metadata-internals.h: when loading an image from a file,
6584         mmap all of it and use the same codepaths as when using a
6585         in-memory image: the code is simpler and we use less memory
6586         (both writable and readonly).
6587
6588 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6589
6590         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
6591         API to alloc runtime data structures that need to be tracked by the
6592         GC and contain pointers.
6593         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
6594         make the code more readable and eventually use a different GC.
6595
6596 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
6597
6598         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
6599         for out arguments.
6600         
6601 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
6602
6603         * object.c: In release_type_locks(), don't release the cctor lock
6604         if it has already been released. This fixes a crash in the
6605         thread5 test.
6606
6607 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6608
6609         * gc.c, marshal.c, icall.c: register a delegate for finalization
6610         only when the native function pointer has been allocated for it.
6611
6612 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6613
6614         * object.c: cleaned up some code, allocate objects that are
6615         pointer free with the atomic malloc variant. Allocate memory
6616         for static data from the mempool if it's pointer-free.
6617         Allocate the bounds array at the end of the array data, when needed.
6618         * object-internals.h, object.h: move a private function in a private
6619         header.
6620         * class.c: handle missing case in tracking references in fields.
6621
6622 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
6623
6624         * class.c, class-internals.h: keep track if a type has
6625         reference fields in either the instance or static fields.
6626
6627 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
6628
6629         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
6630         and renamed to MonoRuntimeInfo. Added fields to store the expected
6631         framework assembly version. Changed mono_get_framework_version and
6632         mono_get_runtime_version for a single mono_get_runtime_info method.
6633         
6634         * assembly.c: Added method to remap system assembly versions to the
6635         current executing runtime version. Removed old mapping code.
6636         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
6637         
6638         * icall.c, reflection.c: Track api changes.
6639
6640 2005-02-06  Miguel de Icaza  <miguel@novell.com>
6641
6642         * loader.c (method_from_memberref): Improve error reporting,
6643         produce the class name instead of the typeref/typedef index. 
6644
6645 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
6646
6647         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
6648
6649 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
6650
6651         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
6652         stdcall and charset name mangling.  Reorganize the code and add
6653         some tracing stuff.
6654
6655 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
6656
6657         * monodiet.c: More iters!
6658
6659         * marshal.c: Iter usage.
6660
6661         * icall.c: Iter usage.
6662
6663         * object.c: Use iters.
6664
6665         * debug-helpers.c: More iters
6666
6667 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
6668
6669         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
6670         under win32.
6671
6672 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
6673
6674         * mono-debug-debugger.c: use iters
6675
6676         * class.c, class-internals.h: mono_class_setup_events is static
6677         now
6678
6679         * All callers: use iters
6680
6681 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
6682
6683         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
6684         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
6685
6686 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
6687
6688         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
6689
6690         * marshal.h: Add prototypes for ldfld/stfld_remote.
6691
6692         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
6693         this is called during startup.
6694         
6695 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
6696
6697         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
6698         MonoThreadsSync struct private in monitor.c. Changed the way
6699         MonoThreadsSync is allocated so it's faster and there is no
6700         need to keep track of it with a finalizer and it uses less memory.
6701         This also finally allows us to allocate mono objects as ptrfree when
6702         there are no reference fields.
6703
6704 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
6705
6706         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
6707         disappearing link to the GC interface and use them to simplify
6708         the gchandles code.
6709
6710 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
6711
6712         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
6713         stfld_remote which call mono_load/store_field_new. This allows methods
6714         calling ldfld/stfld wrappers to be AOTed.
6715
6716         * console-io.c: Include sys/filio.h under solaris.
6717         
6718         * console-io.c: Include curses.h if needed correctly.
6719
6720 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
6721         
6722         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
6723         method->klass as well.
6724
6725         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
6726
6727         * class.c (mono_class_init): Switch on lazy initialization of 
6728         methods.
6729
6730         * class.c (mono_class_get_finalizer): Handle the case when the 
6731         finalizer is inherited.
6732
6733 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6734
6735         * console-io.c: <curses.h> is needed by term.h on solaris.
6736
6737 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
6738
6739         * icall.c, class-internals.h, monodiet.c, class.c: Remove
6740         mono_class_setup_properties where possible. Remove this ftn from
6741         the header file, and make it static.
6742
6743 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
6744
6745         * loader.c: Add missing setup_... call.
6746
6747         * class.c: Add missing setup_... calls.
6748
6749         * class.c (mono_class_init): Switch on lazy initialization of 
6750         the generic vtable.
6751         
6752         * class.c (mono_class_init): Fix generics broken by the recent changes.
6753
6754         * monodiet.c (handle_type): Add missing setup_... calls.
6755
6756         * class.c: Back out garbage in previous patch.
6757         
6758         * class.c: Add missing setup_... calls.
6759
6760         * class.c (mono_class_get_method_from_name_flags): Avoid calling
6761         mono_class_setup_methods () if possible.
6762
6763         * class-internals.h (MonoClass): Add 'has_cctor' flag.
6764
6765         * class-internals.h (MonoCachedClassInfo): New structure.
6766
6767         * class.c: Initialize properties and events fields of MonoClass lazily.
6768
6769         * class.c: Add infrastructure for lazily initializing the methods and
6770         vtable fields of MonoClass. Not yet used.
6771
6772         * class.c (mono_class_get_finalizer): New helper function.
6773
6774         * class.c: Add infrastructure for loading some class related data from
6775         an AOT file.
6776
6777         * object.c: Add infrastructure for initializing the vtable from data
6778         in the AOT file.
6779
6780         * gc.c (run_finalize): Use mono_class_get_finalizer ().
6781
6782         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
6783         appropriate initialization function before accessing parts of the
6784         MonoClass structure.
6785
6786         * marshal.c: Fix warnings.
6787         
6788         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
6789
6790         * mono-debug-debugger.c (get_exception_message): Use 
6791         mono_class_get_method_from_name_flags ().
6792
6793 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
6794
6795         * reflection.c, appdomain.c: Replace a few manual searches that
6796         Zoltan missed. (Paolo approved this part of my initial patch).
6797
6798 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
6799
6800         * profiler.c: disable recording statistical events at report time.
6801
6802 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6803
6804         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
6805         to byteswap arrays of enum values, too (bug #72080).
6806
6807 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
6808
6809         * appdomain.c (set_domain_search_path): Allow this to be called if
6810         domain->setup is not yet set.
6811
6812         * loader.c (mono_method_get_index): New helper function.
6813
6814         * loader.c reflection.c: Use mono_method_get_index ().
6815
6816         * class.c (mono_class_get_method_from_name_flags): New helper method.
6817
6818         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
6819         this.
6820
6821         * class.c (mono_class_get_cctor): New helper method.
6822
6823         * string-icalls.c object.c class.c marshal.c reflection.c: Use
6824         mono_class_get_method () to look up methods.
6825
6826 2005-02-01  Miguel de Icaza  <miguel@novell.com>
6827
6828         * console-io.c: Fix the build, this should work on Windows.
6829
6830 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
6831
6832         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
6833         be set to null to keep things valid
6834
6835 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6836
6837         * icall.c: added Console 2.0 icalls.
6838         * Makefile.am: added console-io.[ch]
6839         * console-io.[ch]: internal calls for Console 2.0 API.
6840
6841 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6842
6843         * class.c: make sure we consider all the interfaces
6844         when calculating max_interface_id (bug found by
6845         Jeroen Frijters running ikvm).
6846
6847 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
6848
6849         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
6850         valuetype fields to null.
6851
6852         * object.c (set_value): Ditto. Fixes #71669.    
6853
6854 2005-01-31  Martin Baulig  <martin@ximian.com>
6855
6856         * metadata.c (mono_metadata_has_generic_params): New public
6857         function; checks whether something is a generic method.
6858
6859 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6860
6861         * appdomain.c: fix infinite recursion when adding assemblies.
6862
6863 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
6864
6865         * object.c: Fix small typo to return all items for Environment.
6866         GetCommandLineArgs.
6867
6868 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6869
6870         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
6871         reflection.c: more domain and assembly-unload related fixes
6872         and memory leaks plugs.
6873
6874 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
6875
6876         * 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.
6877
6878 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
6879
6880         * loader.c (mono_method_signature): Make this method lazy
6881         (mono_get_method_from_token): Don't computate the signature here.
6882
6883         Doing this saves quite a bit of memory. I got 90 kb on starting up
6884         monodoc. It should also save some disk reads on startup.
6885
6886         * *: MonoMethod->signature might be NULL now. You *MUST* use
6887         mono_method_signature.
6888
6889 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
6890
6891         * object.c (mono_runtime_get_main_args): Return an array from the
6892         current domain here. Fixes #71938.
6893
6894 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
6895
6896         * monitor.c: formatting changes to comply with the
6897         mono coding style and remove #ifdefs from the code.
6898
6899 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6900
6901         * metadata.c, private.h: remove some unneeded data
6902         and use a more compact representation for table schemas.
6903
6904 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
6905
6906         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
6907         to get a better distribution in hash tables.
6908         * *.c: use mono_aligned_addr_hash() where appropriate.
6909         * assembly.c: make var static.
6910
6911 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
6912
6913         * domain-internals.h: Put MonoJitInfo on a diet.
6914
6915         * domain.c: Fix a warning.
6916
6917 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
6918
6919         * gc.c: rework the gc handles code to reuse handles
6920         when freed.
6921
6922 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
6923
6924         * domain.c: fixed long standing bug in mono_string_equal() which
6925         was brought to light with the ldstr changes.
6926
6927 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
6928
6929         * reflection.c: Remove warning by adding missing include for marshal.h
6930
6931 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
6932
6933         * domain.c, object.c: change the ldstr_table to hold
6934         MonoString* as keys: makes the runtime isinterned lookup
6935         faster and simplifies memory management.
6936
6937 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
6938  
6939         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
6940         possible to add imperative security checks before calling the icall.
6941         * reflection.c: Return security attributes on the original MonoMethod
6942         (and not the wrapped one). This fix permissions on icalls.
6943
6944 2005-01-25  Dick Porter  <dick@ximian.com>
6945
6946         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
6947         the check for mktime() support actually test the mktime() return
6948         value.  "Fixes" bug 71682, though the output is still different to
6949         MS.
6950
6951 2005-01-25  Martin Baulig  <martin@ximian.com>
6952
6953         * class.c (mono_class_is_assignable_from): Make this work for
6954         generic instances.
6955
6956 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
6957
6958         * marshal.c (mono_string_utf8_to_builder)
6959         (mono_string_builder_to_utf16): We might not have ownership of the
6960         string. In thise case, we need to create a new buffer.
6961
6962         * object-internals.h (mono_stringbuilder_capacity): sb->str might
6963         be null, in which case, use the default capacity.
6964
6965 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
6966
6967         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
6968         GC events to the profiler.
6969
6970 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
6971
6972         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
6973         if you don't want the GC to run.
6974
6975 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
6976
6977         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
6978         start providing a GC API and keeping different implementations in
6979         their own file.
6980         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
6981
6982 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
6983
6984         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
6985         mmap rather than allocating a huge buffer.
6986         (mono_debug_close_mono_symbol_file): Free the buffer allocated
6987         above.
6988
6989 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
6990
6991         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
6992         and CheckExecutionRights.
6993         * reflection.c|h: Keep the index of the declarative security to be 
6994         used, instead of the pointer, when AOT compiler is used. Also add 
6995         class initialization when requesting demands.
6996         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
6997         CheckExecutionRights. Both properties are now FALSE by default, and
6998         unmodifiable, unless the --security option is used.
6999
7000 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7001
7002         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
7003         reflection.c: properly refcount images and assemblies, many leaks fixed.
7004
7005 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7006
7007         * threadpool.c: increase the timeout for threads in the thread pool to
7008         10s.  Fixes bug #67159.
7009
7010 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
7011
7012         * class-internals.h: Sun's compiler insists on explicit
7013         signed on bit fields to handle then correctly.
7014
7015 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
7016
7017         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
7018         Make the size of the array fit only the number of invalid path
7019         chars that we have.
7020
7021         * class.c (_mono_class_get): Improve the error reporting when a
7022         class referenced is not found, to assist debugging. 
7023
7024 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
7025
7026         * threads.c: fix off-by-one error.
7027         * domain.c: free data allocated in the domain.
7028
7029 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
7030
7031         * reflection.c (mono_method_body_get_object): Fill out exception info
7032         as well.
7033
7034         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
7035         structure.
7036         
7037 2005-01-19  Martin Baulig  <martin@ximian.com>
7038
7039         * loader.c (mono_get_method_constrained): Make this work again.
7040
7041 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
7042
7043         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
7044         guint16 to match the managed side.
7045
7046         * reflection.c (mono_reflection_body_get_object): Fill out local
7047         variables array.
7048
7049         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
7050         as well.
7051
7052         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
7053         'local_var_sig_token'.
7054
7055 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
7056
7057         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
7058         System.Drawing.
7059
7060         * reflection.c (mono_method_body_get_object): Handle abstract and
7061         runtime methods.
7062
7063 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
7064
7065         * marshal.c, loader.c, class-internals.h, reflection.c:
7066         store the emthod data for a wrapper in an array instead of a list.
7067
7068 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
7069
7070         * marshal.c: change the code to allocate memory more
7071         conservatively for method wrappers.
7072
7073 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
7074
7075         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
7076         fields from MonoClass to the marshal info structure where they belong.
7077
7078 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
7079
7080         * class.c, object.c, class-internals.h, marshal.c: rearrange
7081         some fields and tweak some types to lower memory usage.
7082
7083 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
7084
7085         * threads.c (signal_thread_state_change): Handle the case when the
7086         target thread is the current thread.
7087
7088         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
7089
7090         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
7091         emit_ptr_to_object_conv. 
7092
7093         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
7094         marshalling. Fixes #71352.
7095
7096 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
7097
7098         * metadata.h, blob.h: move table enum to blob.h so it can be included
7099         in any header.
7100         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
7101         cut the size of MonoImage/MonoDynamicImage.
7102
7103 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
7104
7105         * profiler.c (mono_profiler_install_simple): Fix default arguments.
7106
7107 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
7108
7109         * reflection.c, reflection.h, icall.c: add a function to check
7110         if an attribute type is defined for a metadata object.
7111
7112 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
7113
7114         * object-internals.h: Added some needed fields from StringBuilder class.
7115         * marshal.c: Set the maxCapacity when creating a StringBuilder.
7116
7117 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
7118
7119         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
7120         threads before shutting down the runtime.
7121
7122         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
7123
7124 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
7125
7126         * object-internal.h, threads.c: implement stacksize and 
7127         parameterized thread start functionality (requires
7128         matching corlib). Marked broken code for later removal.
7129
7130 2005-01-12  Martin Baulig  <martin@ximian.com>
7131
7132         * class-internals.h (MonoGenericClass): Moved the `initialized'
7133         flag to MonoDynamicGenericClass, removed `init_pending'.
7134         (MonoGenericInst): Added `is_reference' flag.
7135
7136 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
7137
7138         * reflection.c (mono_image_create_pefile): Only set the pe_offset
7139         inside the MSDOS header. Fixes #71201.
7140
7141         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
7142         gc thread.
7143         (mono_domain_finalize): Ditto.
7144
7145 2005-01-12  Martin Baulig  <martin@ximian.com>
7146
7147         * class.c (mono_get_shared_generic_class): Use the cache for
7148         non-dynamic generic classes.
7149
7150         * class-internals.h (mono_class_create_generic_2): Removed
7151         function prototype, this function is now static inside class.c.
7152
7153         * class.c (mono_class_create_generic_2): Made this static, only
7154         call it from mono_class_init() and mono_class_setup_parent().
7155         (collect_implemented_interfaces_aux): Call mono_class_init() on
7156         the interfaces we collect.
7157         (mono_class_setup_vtable): Call mono_class_init (class->parent).
7158
7159 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
7160
7161         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
7162         it a real thread handle.
7163
7164         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
7165         MonoJitExceptionInfo, since each catch clause needs its own variable.
7166         
7167 2005-01-11  Dick Porter  <dick@ximian.com>
7168
7169         * image.c (mono_pe_file_open): New variant on mono_image_open()
7170         that does not set up the CLI metadata; used for FileVersionInfo so
7171         it can get the data for windows binaries too.
7172         
7173         * process.c (process_read_string_block): Don't read off the end of
7174         the StringTable block.
7175
7176         These both fix bug 70766.
7177
7178 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
7179
7180         * gc.c: set some fields to NULL at GC cleanup time.
7181         * threads.c: if we quit the main thread, call exit ().
7182
7183 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
7184
7185         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
7186
7187 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
7188
7189         * threads.h, threads.c, object.c: added accessor and settor for
7190         main_thread. Handle it specially when exiting from it: wait
7191         for other foreground threads to exit.
7192
7193 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
7194
7195         * process.c, verify.c: remove some bloat.
7196
7197 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
7198
7199         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
7200         the calling convention to cdecl under win32.
7201
7202 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
7203
7204         * object.c (mono_object_get_size): New function to get the size of
7205         an object instance.
7206
7207         * profiler.c (simple_allocation): Use above.
7208
7209 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
7210
7211         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
7212         ves_icall_System_AppDomain_getRootDomain (as it's not required to
7213         get an appdomain by it's id and we can't assume the root's id is 0).
7214         * domain-internals.h: Change the function prototype to match.
7215         * icall.c: Change the icall table for AppDomain.
7216
7217 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
7218
7219         * locales.c (string_invariant_compare_char): Only compute
7220         GUnicodeTypes in the case where we need them.  Test for ordinality
7221         first and return if so.
7222
7223         From the commit:
7224
7225                 /*
7226                  * FIXME: here we must use the information from c1type and c2type
7227                  * to find out the proper collation, even on the InvariantCulture, the
7228                  * sorting is not done by computing the unicode values, but their
7229                  * actual sort order.
7230                  */
7231
7232 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
7233
7234         * loader.c: for P/Invoke methods, allow the "Internal" shared
7235         library name to refer to the calling process symbol namespace.
7236
7237 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
7238
7239         * Makefile.am: Add the security manager to the build.
7240         * security-manager.c|h: New. Initialization of the security manager.
7241
7242 2005-01-07  Dick Porter  <dick@ximian.com>
7243
7244         * threads.c: 
7245         * monitor.c: Update thread state during Monitor and WaitHandle
7246         waits.  Fixes bug 71031.
7247
7248 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
7249
7250         * reflection.c (property_encode_signature): Correctly handle when the
7251         property has no methods.
7252
7253 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
7254
7255         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
7256         
7257         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
7258         fields from mb, not rmb. Fixes #71017.
7259
7260         * marshal.c (emit_ptr_to_str_conv): Add support for 
7261         ByValTStr -> string conversion. Fixes #71015.
7262
7263         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
7264
7265         * mempool.c (mono_mempool_contains_addr): New helper function.
7266
7267 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
7268
7269         * metadata.c (mono_metadata_compute_size): Fix size calculation of
7270         HasSematics encoded fields.
7271         
7272         * metadata.c (mono_type_to_unmanaged): Improve error message for 
7273         invalid string marshalling.
7274
7275         * metadata.c: Fix warnings.
7276         
7277 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
7278
7279         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
7280         profiler support.
7281
7282 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
7283
7284         * domain.c object.c domain-internals.h: Revert part of r38077 since the
7285         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
7286         tests.
7287
7288 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
7289
7290         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
7291         so methods containing these can be AOTed.
7292
7293 2005-01-03  Martin Baulig  <martin@ximian.com>
7294
7295         * loader.c (find_method): Removed the hack for generic instances.
7296         (method_from_memberref): If our parent is a generic instance, pass
7297         its generic type definition to find_method() and then inflate the
7298         method.
7299         (mono_get_method_constrained): Pass the generic type definition to
7300         find_method() and inflate the method later.
7301
7302         * class-internals.h (MonoStats): Added `generic_class_count'.
7303
7304         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
7305         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
7306
7307         * reflection.c (mono_custom_attrs_from_params): Don't ignore
7308         generic type definitions.
7309
7310 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
7311
7312         * loader.c icall.c: Fix warnings.
7313
7314 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
7315
7316         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
7317         blittable types. Fixes #70864.
7318
7319 2004-12-29  Martin Baulig  <martin@ximian.com>
7320
7321         * icall.c
7322         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
7323
7324         * reflection.c (mono_method_get_object): Create a
7325         "System.Reflection.MonoGenericMethod" for inflated methods; don't
7326         call mono_get_inflated_method().
7327
7328         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
7329
7330 2004-12-27  Martin Baulig  <martin@ximian.com>
7331
7332         * class-internals.h (MonoMethod): Added `is_inflated' flag.
7333         (MonoMethodInflated): Added `inflated' field.
7334
7335         * class.c (mono_class_inflate_generic_method): Don't really
7336         inflate the method here; just set the `is_inflated' flag in the
7337         MonoMethod.
7338         (mono_class_get_inflated_method): Actually inflate the method here
7339         if it's not already inflated; we use the MonoMethodInflated's new
7340         `inflated' field as a cache.
7341
7342 2004-12-26  Martin Baulig  <martin@ximian.com>
7343
7344         * class.c
7345         (inflate_generic_class): Moved some code out of inflate_generic_type().
7346         (mono_class_inflate_generic_method): If we're already inflated,
7347         inflate the context and use the declaring method; ie. make sure
7348         the declaring method of an inflated method is always the generic
7349         method definition.
7350         (mono_class_create_from_typedef): Create
7351         `class->generic_container->context->gclass'.
7352
7353 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
7354
7355         * metadata-internals.h, marshal.c, reflection.c: More
7356         MonoGHashTable->GHashTable.
7357
7358         * domain-internals.h, class.c: Change MonoGHashTable's into
7359         GHashTables for some cases where no gc stuff is used
7360
7361         All users: update apis
7362
7363 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
7364
7365         * metadata.c (builtin_types): Make this `const'. Makes this get
7366         put into the shareable section.
7367         (mono_metadata_init): Casts to make gcc happy.
7368
7369 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
7370
7371         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
7372
7373 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
7374
7375         * icall.c: Added an internal call to retrieve the position and length
7376         of assembly-level declarative security attributes (RequestMinimum, 
7377         RequestOptional and RequestRefuse). This is used by the Assembly class
7378         to re-create the corresponding permission sets.
7379
7380 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
7381
7382         * marshal.c: fix the stelemref wrapper to be type correct
7383         (and faster).
7384
7385 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
7386
7387         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
7388         to do key & 0x7fffffff. Hashtable already does this. It just
7389         results in longer code.
7390
7391 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
7392
7393         * appdomain.c: Bump corlib version.
7394         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
7395         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
7396         * reflection.c|h: Add functions to get declarative security infos
7397         (blob position and length) for assemblies, classes and methods.
7398
7399 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
7400
7401         * reflection.c: sort the constant table (bug #70693).
7402
7403 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
7404
7405         * object-internals.h, threads.c, domain.c: add accessors for
7406         the MonoThread and MonoDomain tls keys.
7407
7408 2004-12-18  Martin Baulig  <martin@ximian.com>
7409
7410         * class.c (inflate_generic_type): If we're inflating a generic
7411         instance, set `ngclass->context->container = context->container';
7412         ie. the container we inflated into.
7413
7414         * metadata.c (mono_metadata_parse_generic_param): Reflect above
7415         inflate_generic_type() changes.
7416
7417 2004-12-17  Martin Baulig  <martin@ximian.com>
7418
7419         * class-internals.h
7420         (MonoGenericClass): Replaced `MonoType *generic_type' with
7421         `MonoClass *generic_class'.  Removed `dynamic_info'; if
7422         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
7423         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
7424
7425 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
7426
7427         * exception.c (mono_exception_from_token): New helper function.
7428
7429 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
7430
7431         * assembly.c (mono_assembly_load_with_partial_name): Call 
7432         mono_assembly_loaded before invoking the preload hooks. Fixes
7433         #70564.
7434
7435         * object-internals.h (MonoThread): Change culture_info and 
7436         ui_culture_info into an array.
7437
7438         * threads.c: Cache culture info objects from more than one appdomain.
7439
7440         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
7441         current UI culture.
7442
7443 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
7444
7445         * threads.h threads.c appdomain.c: Clear the culture_info field of
7446         all threads during unloading if they point to an object in the dying
7447         appdomain.
7448
7449 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
7450
7451         * culture-info.h (TextInfoEntry): New struct
7452         * object-internals.h: sync with managed
7453         * locales.c: fill the `text_info_data' field
7454         * culture-info-tables.h: update
7455
7456 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
7457
7458         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
7459         collector.
7460
7461 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
7462
7463         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
7464         (ves_icall_ModuleBuilder_getMethodToken): Ditto
7465
7466 2004-12-12  Martin Baulig  <martin@ximian.com>
7467
7468         * mono-debug-debugger.c (write_type): If we're an enum and the
7469         builtin types have already been initialized, call mono_class_init().
7470
7471 2004-12-11  Martin Baulig  <martin@ximian.com>
7472
7473         * metadata.c (mono_metadata_load_generic_params): Added
7474         `MonoGenericContainer *parent_container' argument; automatically
7475         compute `container->is_method'; pass the correct owner to
7476         get_constraints().      
7477
7478         * reflection.c (compare_genericparam): Sort the GenericParam table
7479         according to increasing owners. 
7480
7481 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
7482
7483         * profiler.c: allow disabling the default profiler.
7484
7485 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
7486
7487         * decimal.c, icall.c: allow disabling System.Decimal support.
7488
7489 2004-12-09  Marek Safar <marek.safar@seznam.cz>
7490
7491         * reflection.c: Add support for null attribute arguments.
7492
7493 2004-12-09  Martin Baulig  <martin@ximian.com>
7494
7495         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
7496         names to get rid of compiler warnings.
7497
7498 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
7499
7500         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
7501         mono_marshal_load_type_info (). Fixes #69625.
7502         (mono_marshal_get_ptr_to_struct): Likewise.
7503
7504 2004-12-08  Martin Baulig  <martin@ximian.com>
7505
7506         * mono-debug.h: Bumped version number to 47.
7507
7508         * mono-debug-debugger.c
7509         (mono_debugger_event_handler, mono_debugger_event): Take two
7510         guint64 arguments insteed of a gpointer and a guint32.  
7511
7512 2004-12-08  Martin Baulig  <martin@ximian.com>
7513
7514         * debug-mono-symfile.h
7515         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
7516         `address' to `native_offset'.
7517
7518 2004-12-08  Martin Baulig  <martin@ximian.com>
7519
7520         * class.c (mono_class_create_from_typespec): Only inflate if we
7521         either have `context->gclass' or `context->gmethod'.
7522
7523 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
7524
7525         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
7526
7527         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
7528
7529         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
7530
7531         * reflection.c (mono_assembly_get_object): Remove the workaround put
7532         in for the release.
7533         
7534         * appdomain.c: Use the corlib_internal field from MonoAssembly.
7535
7536         * appdomain.c: Bump corlib version.
7537
7538         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
7539         be visible in other appdomains.
7540
7541 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
7542
7543         * threads.c: Interlocked inc and dec for longs were messed up,
7544         use a KISS based impl for this. Fixes 70234
7545
7546 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
7547
7548         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
7549
7550 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
7551
7552         * icall.c: fix to follow policy not to allow struct
7553         arguments in icalls.
7554
7555 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7556
7557         * process.c: make the patch that handles spaces in file paths work
7558         on mono/windows too.
7559
7560 2004-12-06  Martin Baulig  <martin@ximian.com>
7561
7562         * class.c (mono_class_create_generic): Call
7563         mono_class_setup_supertypes() if we're dynamic.
7564         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
7565
7566 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
7567
7568         * object-internals.h: Add new fields to MonoThread.
7569
7570         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7571
7572         * icall.c threads-types.h threads.c: Add new icalls.
7573
7574         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
7575
7576         * object-internals.h (MonoReflectionAssembly): Sync object layout with
7577         managed side.
7578
7579         * appdomain.c: Bump corlib version.
7580
7581         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
7582         internal assemblies. Fixes #69181.
7583
7584 2004-12-05  Martin Baulig  <martin@ximian.com>
7585
7586         * class.c (mono_class_inflate_generic_signature): Make this a
7587         no-op if `context' is NULL or we don't have any type parameters;
7588         also copy `sentinelpos'.        
7589
7590 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
7591
7592         * image.c: Add unbox_wrapper_cache.
7593
7594         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
7595
7596         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
7597         function generator.
7598         
7599         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
7600         Fixes #70173.
7601
7602         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
7603         
7604 2004-12-04  Martin Baulig  <martin@ximian.com>
7605
7606         * loader.c (mono_method_get_signature_full): New public function;
7607         like mono_method_get_signature(), but with an additional
7608         `MonoGenericContext *' argument.
7609
7610         * class.c (mono_class_inflate_generic_signature): Formerly known
7611         as inflate_generic_signature(); make this public.
7612
7613 2004-12-04  Martin Baulig  <martin@ximian.com>
7614
7615         * metadata.c
7616         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
7617         instead of a `MonoGenericContainer *'.  
7618         (mono_metadata_parse_array_full): Likewise.
7619         (mono_metadata_parse_signature_full): Likewise.
7620         (mono_metadata_parse_method_signature_full): Likewise.
7621         (mono_metadata_parse_generic_inst): Likewise.
7622         (mono_metadata_parse_generic_param): Likewise.
7623         (mono_metadata_parse_mh_full): Likewise.
7624         (mono_type_create_from_typespec_full): Likewise.
7625
7626 2004-12-03  Martin Baulig  <martin@ximian.com>
7627
7628         * class-internals.h (MonoGenericContainer): Replaced the
7629         `MonoGenericContext * pointer with a `MonoGenericContext'
7630         structure and made it the first element.
7631
7632 2004-12-03  Martin Baulig  <martin@ximian.com>
7633
7634         * class.c
7635         (inflate_generic_type): Set the `context->container' when creating
7636         a new MonoGenericContext.
7637         (mono_class_inflate_generic_method): Likewise.
7638         (mono_class_create_from_typespec): Just use `context->container'
7639         to get the container.
7640
7641         * loader.c (method_from_methodspec): Set `context->parent' from
7642         `context->container' - and if that's a method container, use its
7643         parent.  Also set the `context->container' when creating a new
7644         MonoGenericContext.
7645         (mono_get_method_from_token): Use just `context->container' to get
7646         the container.
7647
7648         * metadata.c (do_mono_metadata_parse_generic_class): Also set
7649         `gclass->context->container'.
7650
7651         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
7652         the `context->container' when creating a new MonoGenericContext.
7653
7654 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
7655
7656         * reflection.c (compare_genericparam): Sort params with identical
7657         owner by their number. Fixes gen-111 on sparc.
7658
7659 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
7660
7661         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
7662         around the domain changes.
7663
7664         * appdomain.c (mono_domain_unload): Handle the case when the thread
7665         calling Unload is itself being aborted during unloading. Fixes #70022.
7666
7667         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
7668
7669         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
7670         checkpoint_func as an icall so it gets a wrapper.
7671         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
7672         in the cross-appdomain wrappers too.
7673
7674         * threads.c (mono_thread_has_appdomain_ref): Make this public.
7675
7676         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
7677
7678         * reflection.c: Fix some memory leaks.
7679         
7680 2004-12-02  Martin Baulig  <martin@ximian.com>
7681
7682         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
7683
7684         * metadata.c (generic_class_cache): New static hashtable.
7685         (mono_metadata_lookup_generic_class): New public method.
7686
7687 2004-12-02  Martin Baulig  <martin@ximian.com>
7688
7689         * class.c (mono_class_create_from_typedef): Call
7690         mono_class_setup_parent() and mono_class_create_mono_type() before
7691         parsing the interfaces.
7692
7693 2004-12-02  Martin Baulig  <martin@ximian.com>
7694
7695         * metadata.c (generic_inst_cache): New static hashtable.
7696         (mono_metadata_lookup_generic_inst): New public function.
7697         (mono_metadata_inflate_generic_inst): New public function.
7698         (mono_metadata_parse_generic_inst): New public function.
7699         (do_mono_metadata_parse_generic_class): Use the new
7700         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
7701         since this'll also use the cache.
7702
7703         * reflection.c (mono_reflection_bind_generic_method_parameters):
7704         Use mono_metadata_lookup_generic_inst() to use the new cache.
7705
7706         * class.c (inflate_mono_type): Use
7707         mono_metadata_inflate_generic_inst() to inflate a generic
7708         instance; this'll also use the new cache.
7709
7710         * loader.c (method_from_methodspec): Use
7711         mono_metadata_parse_generic_inst() and
7712         mono_metadata_inflate_generic_inst() rather than parsing it
7713         manually, so we can use the new cache.
7714
7715 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
7716
7717         * threads.c (wait_for_tids): Do not incorrectly free threads when 
7718         the wait times out.
7719
7720 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7721
7722         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
7723         iter->args based on whether parameters are passed in registers (i.e.
7724         MONO_ARCH_REGPARMS is defined)
7725
7726 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
7727
7728         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
7729         the exception message. Fixes #70070.
7730         (method_from_methodspec): Fix warnings.
7731
7732 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7733
7734         * process.c: (complete_path) return the path quoted
7735
7736 2004-12-01  Martin Baulig  <martin@ximian.com>
7737
7738         * class-internals.h (MonoGenericInst): New structure.
7739         (MonoGenericClass): Replaced `type_argc', `type_argv' and
7740         `is_open' with `MonoGenericInst *inst'.
7741         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
7742         `is_open' with `MonoGenericInst *inst'.
7743
7744 2004-11-30  Martin Baulig  <martin@ximian.com>
7745
7746         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
7747
7748         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
7749         to `generic_class_cache'.
7750
7751         * metadata.c
7752         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
7753         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
7754         (mono_generic_inst_is_valuetype): Renamed to
7755         mono_generic_class_is_valuetype().
7756
7757         * class-internals.h
7758         (MonoGenericInst): Renamed to MonoGenericClass.
7759         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
7760         (MonoClass): Renamed `generic_inst' to `generic_class'.
7761         (MonoGenericContext): Renamed `ginst' to `gclass'.
7762
7763         * object-internals.h
7764         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
7765
7766         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
7767         mono_reflection_generic_class_initialize().
7768
7769         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
7770         now known as "System.Reflection.MonoGenericClass".
7771         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
7772
7773 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
7774
7775         * class-internals.h: Added a flag field to MonoClass to cache the
7776         declarative security attributes actions associated with the class.
7777         * domain-internals.h: Added booleans to MonoJitInfo to cache the
7778         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
7779         applicable to the JITted method.
7780         * reflection.c|h: Added functions to extract (as flags) which security
7781         actions are available (declaratively) for a method, class or assembly.
7782         * metadata.c|h: Added functions to search the declarative security
7783         table in the metadata.
7784         
7785 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
7786
7787         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
7788         EXPORTEDTYPES are already in the class name cache, so there is no
7789         need to add extra code here to look at them. Just removes a bit of
7790         cruft.
7791
7792         (ves_icall_System_Environment_get_TickCount): No need for #if
7793         WINDOWS. We already have the code in io-layer.
7794
7795 2004-11-28  Martin Baulig  <martin@ximian.com>
7796
7797         * loader.c
7798         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
7799         Fixes gen-112.cs.
7800
7801 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
7802
7803         * assembly.c (do_mono_assembly_open): Instead of having a
7804         conditional WITH_BUNDLE, incorporate support for bundles here, by
7805         having a global `bundles' variable holding a pointer to the actual
7806         bundles. 
7807
7808         (mono_register_bundled_assemblies): New API call used by the
7809         bundle code. 
7810
7811         See mkbundle.1 for details.
7812         
7813 2004-11-27  Martin Baulig  <martin@ximian.com>
7814
7815         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
7816         the vtable for generic methods.
7817
7818 2004-11-26  Martin Baulig  <martin@ximian.com>
7819
7820         * metadata.c
7821         (mono_metadata_generic_method_hash): New public function.
7822         (mono_metadata_generic_method_equal): Likewise.
7823
7824         * class-internals.h
7825         (MonoGenericContainer): Added `GHashTable *method_hash'.
7826
7827         * reflection.c (ReflectionMethodBuilder): Added
7828         `MonoGenericContainer *generic_container'.
7829         (reflection_methodbuilder_to_mono_method): Don't create a new
7830         MonoGenericContainer each time we're called.
7831         (mono_reflection_bind_generic_method_parameters): Use
7832         `container->method_hash' to cache the results so we don't create a
7833         different method if we're called several times with the same
7834         arguments.
7835
7836         * loader.c (method_from_methodspec): Use the new
7837         `container->method_hash' here, too.
7838
7839 2004-11-26  Martin Baulig  <martin@ximian.com>
7840
7841         * class.c (inflate_generic_signature): Correctly compute
7842         `res->has_type_parameters'.
7843         (mono_class_vtable): Use the `has_type_parameters' flag to
7844         determine whether we're a generic method.
7845
7846         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
7847
7848 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
7849
7850         * object.c (mono_runtime_run_main): Fix a small memory leak.
7851
7852 2004-11-25  Martin Baulig  <martin@ximian.com>
7853
7854         * class.c (set_generic_param_owner): Fixed the loop.
7855
7856 2004-11-25  Martin Baulig  <martin@ximian.com>
7857
7858         * object.c (mono_class_vtable): Don't create any JIT wrappers for
7859         generic methods.
7860
7861 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
7862
7863         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
7864         names. Fixes #69787.
7865
7866 2004-11-24  Martin Baulig  <martin@ximian.com>
7867
7868         * class.c (mono_class_create_generic_2): If we don't have a
7869         `ginst->parent', inflate `gklass->parent' to get our parent.
7870
7871 2004-11-24  Martin Baulig  <martin@ximian.com>
7872
7873         * reflection.c (compare_genericparam): Correctly sort the
7874         GenericParam table; fixes #69779.
7875
7876 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
7877
7878         * reflection.c: When writing a PE file, don't create a huge
7879         buffer in memory. Just write the arrays we have to the file.
7880         This reduces memory usage.
7881
7882         * metadata-internals.h: MonoDynamicStream pefile is no longer used
7883         globally.
7884
7885 2004-11-17  Martin Baulig  <martin@ximian.com>
7886
7887         * class.c (mono_class_init): Don't setup `class->parent' for
7888         dynamic instances; moved this to mono_class_generic_2().
7889         (mono_class_create_generic): Also set `klass->inited' for dynamic
7890         generic instances.
7891         (mono_class_create_generic_2): Don't do anything for dynamic
7892         generic instances.  Set `klass->parent' here and also call
7893         mono_class_setup_parent() here. 
7894
7895         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
7896         `MonoType *parent' argument; set `ginst->parent' before calling
7897         mono_class_create_generic_2(), so we set the correct parent.
7898
7899 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
7900
7901         * reflection.c: allow getting attributes from ModuleBuilder
7902         (used by ikvm).
7903
7904 2004-11-17  Martin Baulig  <martin@ximian.com>
7905
7906         * class.c (mono_class_create_from_typedef): If a type parameter is
7907         inherited from an outer class, set its owner to that class.
7908
7909 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
7910
7911         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
7912           for (int*) written size. This fixes bug #69592.
7913
7914 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
7915
7916         * icall.c: Added IsAuthenticodePresnet internal call.
7917         * image.c|h: New function that check a MonoImage for an Authenticode
7918         signature in the certificate PE data directory.
7919         * security.c|h: New internal call to ask the runtime if an 
7920         Authenticode signature seems referenced in the PE header.
7921
7922 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
7923
7924         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
7925
7926         * reflection.c (mono_image_create_pefile): Free the assembly streams
7927         after writing out the assembly file.
7928
7929         * object.c (mono_runtime_run_main): Fix small memory leak.
7930
7931         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
7932         property access modifiers. Fixes #69389.
7933
7934 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
7935
7936         * domain.c, object.c, object-internals.h, domain-internals.h,
7937         object.h, marshal.c: keep dynamic code info per domain.
7938
7939 2004-11-15  Martin Baulig  <martin@ximian.com>
7940
7941         * class.c (mono_type_get_name_recurse): Put type arguments in
7942         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
7943         see bug #68387.
7944
7945 2004-11-15  Martin Baulig  <martin@ximian.com>
7946
7947         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
7948         (mono_class_setup_vtable): When computing `the_cname' for a
7949         generic instance, don't include the namespace since we'd otherwise
7950         add it twice.
7951
7952 2004-11-15  Martin Baulig  <martin@ximian.com>
7953
7954         * class.c (mono_class_create_generic): Changed return type to void.
7955         (mono_class_create_generic_2): New public function; setup
7956         `class->method', `class->field' and `class->interfaces' here
7957         instead of in mono_class_init().
7958
7959         * class.h (mono_class_create_generic): Moved to class-internals.h.
7960
7961 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
7962
7963         * reflection.c (mono_image_create_pefile): take a file HANDLE.
7964         rather than writing to memory, write to this file. Right now,
7965         we are just writting into a buffer, and copying that. However
7966         we can avoid the buffer later.
7967
7968         (mono_dynamic_stream_reset): new function
7969
7970         * icall.c, object-internals.h: update for the above.
7971
7972 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
7973
7974         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
7975         have been using gc'd memory. First it is slower, unlikely
7976         the comment in the source code said, secondly, it increases
7977         our footprint to do it in the gc.
7978
7979         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
7980         the method so that it does not have to copy to managed code.
7981
7982 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
7983
7984         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
7985
7986 2004-11-12  Martin Baulig  <martin@localhost>
7987
7988         * reflection.c (mono_image_create_token): Allow generic method
7989         definitions here, since they may appear in an `.override'; see
7990         gen-98/gen-99 for an example.
7991
7992 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
7993
7994         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
7995         #69365.
7996
7997         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
7998         descriptive.
7999
8000 2004-11-11  Martin Baulig  <martin@ximian.com>
8001
8002         * class.c (mono_class_setup_vtable): In an explicit interface
8003         implementation, the method name now includes the arity.
8004
8005 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
8006
8007         * object.c (mono_array_full_copy): Fix warning.
8008
8009 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
8010
8011         * appdomain.c: Removed look_for_method_by_name(). Use the new method
8012         mono_class_get_method_from_name() instead.
8013         
8014         * class-internals.h: Added two new types of wrappers. 
8015         Added MonoRemotingTarget enum. Added new trampoline function type, which
8016         takes an additional MonoRemotingTarget value as parameter, so it is
8017         possible to request a trampoline for a specific target.
8018         
8019         * class.c: Added new mono_class_get_method_from_name() method.
8020         
8021         * class.h: In MonoRemoteClass, we can have now to vtables, one for
8022         general remoting sinks and one specific for cross domain calls.
8023         
8024         * debug-helpers.c: Added new wrapper names.
8025         
8026         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
8027         of a remote class.
8028         
8029         * image.c: Porperly delete value objects form the remoting invoke hashtable.
8030         
8031         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
8032         with several other methods (mono_marshal_get_xappdomain_dispatch,
8033         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
8034         and others) can generate a fast remoting wrapper for cross domain calls.
8035         More information can be found in docs/remoting.
8036         Other changes: Removed mono_find_method_by_name, and used
8037         mono_class_get_method_from_name instead.
8038         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
8039         is stored in the remoting invoke hashtable.
8040         
8041         * marshal.h: published the new method for getting the xdomain wrapper,
8042         and also added a method for getting the adequate wrapper for a given
8043         method and target.
8044         
8045         * object-internals.h, object.c: Added a couple of methods for capying and
8046         cloning arrays.
8047         Modified mono_install_remoting_trampoline, which takes the new remoting
8048         trampoline that has a remoting target as parameter.
8049         mono_class_proxy_vtable now also takes a remoting target as parameter, and
8050         will return the most suitable vtable for the target.
8051         Added mono_remote_class_vtable, which returns the vtable of a remote class
8052         (which can be the normal remoting vtable or the xdomain vtable).
8053         
8054         * threads.c: the xdomain invoke and dispatch wrappers must also be
8055         protected against interruptions.
8056
8057 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8058
8059         * icall.c: use memmove in BlockCopyInternal when the source and
8060         destination arrays are the same.
8061
8062 2004-11-09  Martin Baulig  <martin@ximian.com>
8063
8064         * class-internals.h (MonoGenericContainer): Removed `method' and
8065         `signature', replaced them with `is_method' and `is_signature'
8066         flags.  Added `context'.
8067
8068         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
8069         instead of a `MonoGenericContainer *'.
8070
8071         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
8072         for dynamic type parameters.
8073         (mono_metadata_load_generic_params): Setup `container->context'.
8074
8075         * reflection.c (mono_reflection_setup_generic_class): Setup
8076         `tb->generic_container->context'.
8077         (do_mono_reflection_bind_generic_parameters): Use
8078         mono_class_inflate_generic_type() to correctly inflate types,
8079         rather than using our own hack just for MONO_TYPE_VAR.
8080
8081 2004-11-09  Martin Baulig  <martin@ximian.com>
8082
8083         * class.c (mono_class_inflate_generic_method): Small fix; don't
8084         crash here.
8085
8086         * icall.c
8087         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
8088         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
8089         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
8090         (ves_icall_Type_BindGenericParameters): Likewise.
8091         (ves_icall_Type_get_IsGenericInstance): Likewise.
8092         (ves_icall_Type_GetGenericParameterPosition): Likewise.
8093         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
8094         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
8095         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
8096
8097 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
8098
8099         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
8100         assembly versions and public key tokens. Fixes #69113.
8101
8102 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
8103
8104         * metadata.c: fix bug introduced with the type cache changes
8105         on 2004-11-06.
8106
8107 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
8108
8109         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
8110         the MonoClass pointer instead of the token in exception clauses.
8111         * reflection.c: updates for the above and make the code not depend
8112         on the structure of MonoExceptionClause.
8113
8114 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
8115
8116         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
8117         Add support for dynamic assemblies. Fixes #69114.
8118
8119         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
8120
8121 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
8122
8123         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
8124         since most only those methods use it. the code member of
8125         MonoMethodPInvoke was dead, so that can be removed too. Also,
8126         remove inline_count (again, not used), and move slot so that it
8127         can share bits with some other flags. This saves 8 bytes in the
8128         structure and gives us about 50 kb back for mcs helloworld.cs
8129
8130         * *.[ch]: Do naming changes for the above.
8131
8132         * loader.c (mono_method_get_header): Lazily init the header
8133         on first access.
8134         (mono_get_method_from_token): don't init the header here
8135         (mono_free_method): the header may never be allocated
8136
8137         Overall, this saves 150 kb of unmanaged allocations
8138         for mcs helloworld.cs. That accounts for 10% of the unmanaged
8139         memory at runtime.
8140         
8141         * loader.c, loader.h (mono_method_get_header): new accessor.
8142
8143         * *.[ch]: use the above method. Prepares us to lazily load
8144         the header.
8145
8146         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
8147         three warnings, which are actual bugs (see 69206).
8148
8149         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
8150         unused. Saves a cool 4 bytes / method.
8151
8152 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
8153
8154         * metadata.c (builtin_types): Add types for System.Object here.
8155         (mono_metadata_parse_type_full): Cache MonoType*'s that are
8156         for a class or valuetype from klass->this_arg or klass->byval_arg.
8157
8158         On mcs for a hello world, this gets us down from 21836 MonoType's
8159         to 14560.
8160
8161         (mono_metadata_free_type): Account for the above change.
8162
8163 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
8164
8165         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
8166         exception instead of asserting if name is null.
8167         (ves_icall_System_AppDomain_GetData): Ditto.
8168
8169 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
8170
8171         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
8172         EnumBuilder.
8173
8174         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
8175         Return NULL when the domain does not have entry_assembly set.
8176
8177         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
8178         Add a 'resource_modules' argument.
8179         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
8180
8181         * reflection.c (mono_reflection_create_runtime_class): Move setting
8182         of wastypebuilder here, so mono_get_type_object () returns a MonoType
8183         for enums too.
8184
8185         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
8186         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
8187         Throw an ArgumentNullException if 'ptr' is null.
8188
8189         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
8190         assemblies here. Fixes #69020.
8191
8192 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
8193
8194         * reflection.c (build_compressed_metadata): Fix the previous patch for
8195         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
8196         the stack.
8197
8198 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
8199
8200         * assembly.c (mono_assembly_names_equal): Allow a match if one of
8201         the cultures is false. Fixes #69090.
8202
8203         * reflection.c (build_compressed_metadata): Fix invalid memory read 
8204         detected by valgrind.
8205         
8206         * reflection.c (mono_reflection_get_type): Avoid triggering a 
8207         TypeResolve multiple times for the same type. Fixes #65577.
8208
8209 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
8210
8211         * marshal.c: Avoid using ldftn to call managed functions. It is
8212         much slower than just a call.
8213
8214         * reflection.c (mono_module_get_object): free the basename we
8215         allocate here from glib.
8216         
8217         * reflection.c (ensure_runtime_vtable): make sure to free
8218         overrides.  Also, we were allocating an array of MonoMethod not an
8219         array of MonoMethod*.
8220
8221         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
8222
8223         * image.c (mono_image_close): free image->guid here.
8224
8225 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
8226
8227         * reflection.c: Fix some spec conformance issues with the PE file
8228         structures so mcs compiled apps run on the Net 2.0 beta.
8229
8230 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
8231
8232         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
8233         Implement this. Fixes #67264.
8234
8235         * debug-helpers.h debug-helpers.c marshal.c: Move 
8236         mono_find_method_by_name to debug-helpers.c.
8237
8238 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
8239
8240         * object.c (mono_release_type_locks): type_initialization_hash is
8241         a GHashTable.
8242
8243         * reflection.c object.c object-internals.h: Fix warnings.
8244
8245         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
8246         without accessors. Fixes #61561.
8247
8248         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
8249         application base from the root domain if not set. Fixes #65641.
8250         (mono_runtime_init): Fix warning.
8251
8252 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8253
8254         * appdomain.c: call mono_thread_pool_init.
8255         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
8256         of worker threads based on the number of CPUs and the environment
8257         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
8258         for non-windows (windows) systems.
8259
8260 2004-10-27  Chris Toshok  <toshok@ximian.com>
8261
8262         * mono-debug-debugger.c (write_class): don't call mono_class_init
8263         here, as even with the check for (!klass->init_pending), we get
8264         into a situation where we're hitting cycles in class
8265         initialization.  Fixes #68816.
8266
8267 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
8268
8269         * image.c: Avoid overwriting values in the loaded_images_hash when an
8270         assembly is loaded multiple times. Fixes #61152.
8271
8272         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
8273         so multiple satellite assemblies for the same name can be loaded.
8274         Fixes #68259.
8275
8276         * mono_domain_assembly_preload: Actually return the loaded assembly, 
8277         not NULL.
8278
8279         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
8280         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
8281
8282         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
8283         pending finalizers are not invoked after the appdomain has been 
8284         unloaded. Fixes #67862.
8285
8286 2004-10-22  Martin Baulig  <martin@ximian.com>
8287
8288         * mono-debug-debugger.c
8289         (mono_debugger_runtime_invoke): Don't box valuetypes.
8290
8291 2004-10-22  Chris Toshok  <toshok@ximian.com>
8292
8293         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
8294         don't hide private methods.
8295
8296 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
8297
8298         * icall.c: Allows the runtime to "share" (when known) the public key
8299         token of an assembly. This avoid the need to recalculate the token 
8300         (from the public key) in managed code.
8301
8302 2004-10-21  Chris Toshok  <toshok@ximian.com>
8303
8304         * debug-helpers.c (append_class_name): argh, revert last patch.
8305         
8306 2004-10-21  Chris Toshok  <toshok@ximian.com>
8307
8308         * debug-helpers.c (append_class_name): use '+' as the delimiter,
8309         not '/', so that it matches what the debugger uses to look up
8310         methods.
8311
8312 2004-10-21  Martin Baulig  <martin@ximian.com>
8313
8314         * mono-debug-debugger.c (mono_debugger_throw_exception): New
8315         public method; this is called each time an exception is thrown and
8316         allows the debugger to use exception catch points.
8317
8318 2004-10-21  Martin Baulig  <martin@ximian.com>
8319
8320         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
8321         the stack pointer and the exception object in some struct and pass
8322         that to the debugger.
8323
8324 2004-10-21  Chris Toshok  <toshok@ximian.com>
8325
8326         * mono-debug-debugger.c (do_write_class): add instance/static
8327         event support.  We don't expose "raise" or "other" yet.
8328         (event_is_static): new method.
8329
8330 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
8331
8332         * mono-debug-debugger.c
8333         (mono_debugger_handle_exception): Remove
8334         bogus return value for fussy compilers.
8335
8336 2004-10-20  Martin Baulig  <martin@ximian.com>
8337
8338         * mono-debug-debugger.c
8339         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
8340         (mono_debugger_handled_exception): Likewise.
8341
8342 2004-10-20  Martin Baulig  <martin@ximian.com>
8343
8344         * mono-debug-debugger.h (MonoDebuggerEvent): Added
8345         MONO_DEBUGGER_EVENT_EXCEPTION.
8346
8347         * mono-debug-debugger.c (mono_debugger_handle_exception): New
8348         public function to send the debugger a notification for an
8349         exception and inform it about a catch/finally clause.
8350
8351 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
8352
8353         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
8354         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
8355         fix 2.95 build. 
8356
8357         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
8358
8359 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
8360
8361         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
8362         marshalled as [In,Out]. Fixes #58325.
8363
8364 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
8365
8366         * reflection.c (mono_method_body_get_object): Implement some fields.
8367
8368 2004-10-12  Martin Baulig  <martin@ximian.com>
8369
8370         * reflection.c (mono_reflection_bind_generic_parameters): Small
8371         fix, correctly retrieve our parent from a generic instance.
8372
8373 2004-10-12  Martin Baulig  <martin@ximian.com>
8374
8375         * metadata.c (mono_metadata_generic_param_equal): We always have
8376         an owner.
8377
8378         * class.c
8379         (mono_class_from_generic_parameter): We need to have an owner.
8380         (my_mono_class_from_generic_parameter): Likewise.
8381
8382         * reflection.c (mono_reflection_setup_generic_class): Renamed to
8383         mono_reflection_create_generic_class() and added a new
8384         mono_reflection_setup_generic_class().  
8385         (mono_reflection_initialize_generic_param): If we're a nested
8386         generic type and inherited from the containing class, set our
8387         owner to the outer class.
8388
8389 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
8390
8391         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
8392
8393         * reflection.c (mono_method_body_get_object): New function to create
8394         a MethodBody object.
8395
8396         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
8397
8398 2004-10-11  Martin Baulig  <martin@ximian.com>
8399
8400         * metadata.c (_mono_metadata_type_equal): Renamed to
8401         do_mono_metadata_type_equal() and made static.
8402
8403 2004-10-11  Martin Baulig  <martin@ximian.com>
8404
8405         * appdomain.c: Bump corlib version number to 28.
8406
8407 2004-10-10  Martin Baulig  <martin@ximian.com>
8408
8409         * class-internals.h
8410         (MonoGenericInst): Added `MonoGenericContainer *container'.
8411         (MonoGenericMethod): Likewise.
8412         (MonoGenericContext): Likewise.
8413         (MonoGenericParam): Added `MonoGenericContainer *owner'.
8414
8415         * metadata.c
8416         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
8417         (do_mono_metadata_parse_generic_inst): Likewise.
8418         (mono_metadata_parse_type_full): New public method.  This is the actual
8419         mono_metadata_parse_type() implementation - with an additional
8420         `MonoGenericContainer *' argument.
8421         (mono_metadata_parse_array_full): Likewise.
8422         (mono_metadata_parse_signature_full): Likewise.
8423         (mono_metadata_parse_method_signature_full): Likewise.
8424         (mono_metadata_parse_mh_full): Likewise.
8425         (mono_type_create_from_typespec): Likewise.
8426         (mono_metadata_interfaces_from_typedef_full): New public method;
8427         this is similar to the other _full() methods, but we take a
8428         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
8429         (mono_metadata_parse_generic_param): Take an additional
8430         `MonoGenericContainer *' argument and lookup the MonoGenericParam
8431         from that container.
8432         (mono_metadata_generic_param_equal): New static method to compare
8433         two type parameters.
8434         (_mono_metadata_type_equal): New static method; takes an
8435         additional `gboolean signature_only' argument - if true, we don't
8436         compare the owners of generic parameters.
8437         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
8438         with a TRUE argument - do a signature-only comparision.
8439
8440         * loader.c: Use the new _full() methods and pass the
8441         MonoGenericContainer to them.
8442
8443         * object-internals.h (MonoReflectionTypeBuilder): Added
8444         `MonoGenericContainer *generic_container' field.
8445         (MonoReflectionMethodBuilder): Likewise.
8446
8447 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
8448
8449         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
8450         case initial images of dynamic assemblies.
8451
8452         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
8453
8454         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
8455
8456         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
8457         length of event->other array.
8458         (typebuilder_setup_events): Ditto.
8459
8460         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
8461         'assembly_by_name' and add an 'assemblies' list.
8462
8463         * assembly.h assembly.c: Add a new search hook for determining whenever
8464         an assembly is already loaded. Use this instead of searching in the
8465         loaded_assemblies list.
8466
8467         * domain.c appdomain.c: Implement the new search hook so loaded 
8468         assemblies are now scoped by appdomain. Fixes #67727.
8469
8470 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
8471
8472         * threads.c (mono_thread_attach): Initialize synch_lock field so
8473         mono_thread_detach works again.
8474
8475         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
8476         'lib' too. Fixes #63130.
8477
8478 2004-10-06  Jackson Harper  <jackson@ximian.com>
8479
8480         * culture-info-tables.h: regenerated.
8481
8482 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
8483
8484         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
8485         implemented by other interfaces in the result. Fixes #65764.
8486         
8487         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
8488         Handle unloadable modules without crashing.
8489
8490         * image.c (load_modules): Revert the previous patch since modules must
8491         have a fixed index inside the array.
8492         
8493         * image.c (load_modules): Don't include native modules in the modules
8494         array.
8495
8496 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
8497
8498         * reflection.h: Add param_defaults field.
8499
8500         * reflection.c: Add support for parameter defaults in dynamic methods.
8501         Fixes #64595.
8502
8503         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
8504         an empty string when a type has no namespace. Fixes #64230.
8505
8506 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
8507
8508         * tabledefs.h: Added "internal" security actions to support non-CAS
8509         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
8510         Note: they do not seems to be used anymore in 2.0 (new metadata format)
8511
8512 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
8513
8514         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
8515         constructor of abstract class. Fixes #61689.
8516
8517 2004-10-04  Martin Baulig  <martin@ximian.com>
8518
8519         * class-internals.h (MonoGenericContainer): New type.
8520         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
8521         `MonoGenericContainer *generic_container'.
8522         (MonoClass): Replaced `gen_params' and `num_gen_params' with
8523         `MonoGenericContainer *generic_container'.
8524
8525         * metadata.c (mono_metadata_load_generic_params): Return a
8526         `MonoGenericContainer *' instead of a `MonoGenericParam *';
8527         removed the `num' argument.
8528
8529 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
8530
8531         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
8532         for dynamic images.
8533
8534         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
8535         machine fields.
8536
8537         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
8538
8539         * reflection.c: Save pe_kind and machine values into the generated
8540         image file.
8541
8542         * appdomain.c: Bump corlib version number.
8543
8544         * object-internals.h: Reorganize layout of LocalBuilder.
8545
8546         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
8547         New helper function.
8548
8549         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
8550         created MonoType for dynamic types. Fixes #66180.
8551
8552 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
8553
8554         * threadpool.c: the ares hashtable needs a critical section around it.
8555         this prevents some nasty segfaults
8556
8557 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
8558
8559         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
8560         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
8561         bug 67324).
8562         
8563 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
8564
8565         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
8566         
8567 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
8568
8569         * image.c: Always canonicalize image file names, to avoid loading
8570         the same assembly twice when referenced using a relative path.
8571
8572 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
8573
8574         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
8575
8576         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
8577
8578         * marshal.c: Fix warnings.
8579
8580 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
8581
8582         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
8583         attempting to marshal the delegate_trampoline as the method_addr.
8584         This patch has a static hashtable of marshalled delegates so that 
8585         we can map delegate_trampoline addresses back to delegates.  This
8586         allows a delegate passed to managed code to be passed back into native
8587         code.  Fixes #67039
8588
8589 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
8590
8591         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
8592
8593         * reflection.c (method_encode_code): Align method headers properly.
8594         Fixes #66025.
8595
8596 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
8597
8598         * marshal.c: In the runtime invoke wrapper, reset the abort
8599         exception if it is cached. This avoids the automatic rethrowal of 
8600         the exception after the catch of the wrapper. Also check for pending
8601         interruptions before calling the managed method. This is done using
8602         the new method emit_thread_force_interrupt_checkpoint, since the
8603         normal checkpoint method is ignored when running the invoke wrapper.
8604         * object.c: If the abort exception is rethrown, set the abort_exc
8605         field of the thread, so it will be rethrown aftere every catch.
8606         * threadpool.c: Only run an interruption checkpoint if what has been
8607         requested is a stop of the thread (aborts will be ignored).
8608         * threads.c: By default, a thread will now never be interrumped while
8609         running the runtime invoke wrapper (this ensures that runtime_invoke
8610         will always return to the caller if an exception pointer is provided).
8611         There is a new special method mono_thread_force_interruption_checkpoint()
8612         to force an interruption checkpoint even if running a protected
8613         wrapper, which is used by the same runtime invoke wrapper to do a check
8614         at a safe point.
8615
8616 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
8617
8618         * object.c, object-internals.h: Implemented mono_release_type_locks,
8619         which releases the cctor locks held by a thread.
8620         * threads.c, threads.h: In thread_cleanup, release cctor locks held
8621         by a thread. Added mono_thread_exit() method to be used to safely stop
8622         a thread.
8623
8624 2004-09-28  Raja R Harinath  <rharinath@novell.com>
8625
8626         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
8627         Move null check before dereference.  Avoid indexing beyond the end
8628         of the 'modules' array.
8629
8630 2004-09-28  Raja R Harinath  <rharinath@novell.com>
8631
8632         * metadata-internals.h (MonoImage): Add module_count field.
8633         * image.c (load_modules): Set image->module_count.
8634         (mono_image_load_file_for_image): Use image->module_count.
8635         * reflection.c (mono_image_load_module): Append to image->modules array 
8636         of dynamic assembly.
8637         (mono_module_get_object): Fix loop to actually increment index.
8638         Use image->module_count.
8639         * assembly.c (mono_assembly_load_references): Use image->module_count.
8640         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
8641         Likewise.
8642
8643 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
8644
8645         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
8646         Avoid assert on generic types.
8647
8648 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
8649
8650         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
8651
8652         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
8653
8654         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
8655         function to convert a MarshalSpec structure to its managed counterpart.
8656
8657         * reflection.c: Fix warnings.
8658         
8659         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
8660         field.
8661
8662         * icall.c (mono_create_icall_signature): Fix build.
8663
8664 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
8665
8666         * icall.c: Add MakePointType icall.
8667
8668         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
8669         warnings.
8670
8671 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8672
8673         * threadpool.c: reuse allocated slots in the queue.
8674
8675 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
8676
8677         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
8678
8679         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
8680
8681         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
8682         previous change.
8683
8684         * tabledefs.h: Add constants for pinvoke attributes BestFit and
8685         ThrowOnUnmappableChar.
8686
8687         * icall.c (ves_icall_Type_GetPacking): New icall.
8688
8689 2004-09-24  Martin Baulig  <martin@ximian.com>
8690
8691         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
8692
8693 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8694
8695         * appdomain.c:
8696         (mono_domain_set): allow setting a domain that is being unloaded.
8697         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
8698         being unloaded.
8699
8700 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
8701
8702         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
8703         the GetCustomAttributes icall.
8704
8705 2004-09-23  Martin Baulig  <martin@ximian.com>
8706
8707         * object-internals.h (MonoReflectionGenericParam): Replaced
8708         'has_ctor_constraint', `has_reference_type' and `has_value_type'
8709         with `guint32 attrs'.
8710
8711 2004-09-23  Martin Baulig  <martin@ximian.com>
8712
8713         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
8714
8715 2004-09-23  Martin Baulig  <martin@ximian.com>
8716
8717         * object-internals.h (GenericParameterAttributes): New enum.
8718
8719 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
8720
8721         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
8722         
8723         * class.c (init_events): Fill out event->other field.
8724
8725         * class.c: Fix warnings.
8726
8727         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
8728
8729 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
8730
8731         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
8732         walk which doesn't supply the IL offset.
8733
8734 2004-09-22  Martin Baulig  <martin@ximian.com>
8735
8736         * reflection.c (mono_reflection_setup_internal_class): If we're
8737         System.ValueType, System.Object or System.Enum, set
8738         `klass->instance_size' and create the vtable.
8739         (mono_reflection_create_internal_class): If we're an enum type,
8740         get the base class from our current corlib.
8741
8742 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
8743
8744         * reflection.h (MonoResolveTokenError): New type.
8745
8746         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
8747         icall.
8748
8749         * icall.c: Add an 'error' argument to the ResolveToken icalls.
8750
8751 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
8752
8753         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
8754         Support also calling constructors, but only for already allocated objects.
8755
8756 2004-09-17  Geoff Norton <gnorton@customerdna.com>
8757
8758         * reflection.c (type_get_qualified_name): If the klass is null
8759         return the typename to avoid a NullRefEx.
8760         (encode_cattr_value): Get the qualified name of the boxed type,
8761         not the underlying enumtype.  Fixes #62984.
8762
8763 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
8764
8765         * marshal.c: Fix problems with previous checkin.
8766
8767 2004-09-21    <vargaz@freemail.hu>
8768
8769         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
8770         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
8771
8772         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
8773
8774 2004-09-21  Geoff Norton <gnorton@customerdna.com>
8775
8776         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
8777         should only return a type for pointers, arrays, and passbyref types.
8778         Fixes bug #63841.
8779
8780 2004-09-21  Martin Baulig  <martin@ximian.com>
8781
8782         * domain.c (mono_debugger_check_runtime_version): New public
8783         function.
8784
8785         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
8786
8787 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
8788
8789         * reflection.c: Added missing sort to the declarative security 
8790         attributes table. MS implementation stops seeing the attributes if the
8791         token number regress in the table (as shown by ildasm and permview).
8792
8793 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
8794
8795         * object-internals.h (MonoReflectionModule): Add 'token' field.
8796         
8797         * reflection.c (mono_reflection_get_token): Add support for Module
8798         and Assembly.
8799         (mono_module_get_object): Set 'token' field.
8800         (mono_module_file_get_object): Set 'token' field.
8801
8802         * icall.c: Add new Assembly and Module icalls.
8803
8804         * appdomain.c: Bump corlib version.
8805
8806 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
8807
8808         * loader.h loader.c class.h class.c: Add helper functions for obtaining
8809         tokens of metadata objects.
8810
8811         * reflection.h reflection.c (mono_reflection_get_token): New function
8812         to obtain the token of a metadata object.
8813
8814         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
8815
8816 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
8817
8818         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
8819         
8820         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
8821
8822 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
8823
8824         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
8825         * object-internals.h: Added 3 MonoArray* members to MonoReflection
8826         AssemblyBuilder to access the permissions set in the class lib.
8827         * reflection.c: Added security attributes encoding step in 
8828         mono_image_build_metadata.
8829         * tabledefs.h: Added new security actions defined in 2.0:
8830         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
8831
8832 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
8833
8834         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
8835         macro parameter.
8836
8837 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
8838  
8839         * locales.c: nullify the ICU_collator member of CompareInfo when it is
8840           finalized. There where random SIGSEVs at program termination, when
8841           an object being finalized was trying to do a string comparison and
8842           the current culture was already finalized.
8843  
8844 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8845
8846         * threads.c: call thread_cleanup before finishing the thread if we get
8847         there.
8848
8849 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
8850
8851         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
8852         assemblies from the parent. Fixes #65665.
8853
8854 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
8855
8856         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
8857         modifiers.
8858
8859 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
8860
8861         * reflection.h: add prototype for mono_get_dbnull_object
8862         * reflection.c: add prototypes for get_default_param_value_blobs 
8863         and mono_get_object_from_blob for fussier compilers
8864
8865 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
8866  
8867         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
8868         false deadlock checks in class initialization.
8869  
8870 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
8871
8872         * image.c (mono_image_addref): Fix comment.
8873
8874         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
8875         possible.
8876
8877 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
8878
8879         * reflection.c (mono_param_get_objects): Modified to return
8880         ParameterInfo.DefaultValue object.
8881
8882         (get_default_param_value_blobs):
8883         (mono_get_object_from_blob):
8884         (mono_get_dbnull_object): New helper routines. 
8885
8886         * object.c (mono_get_constant_value_from_blob): New helper routine
8887         carved out from get_default_field_value ()
8888
8889         * object-internals.h (mono_get_constant_value_from_blob): Added
8890         function declaration.
8891
8892 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
8893
8894         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
8895         referenced assemblies. Fixes #62135.
8896
8897         * exception.h exception.c (mono_get_exception_file_not_found2): New
8898         helper function.
8899
8900 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
8901
8902         * class.h class.c: Add mono_type_get_underlying_type ().
8903
8904 2004-09-09  Geoff Norton <gnorton@customerndna.com>
8905
8906         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
8907         Fix GetTypes() to support dynamically created assemblies.
8908
8909 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
8910
8911         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
8912         
8913         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
8914         previous patch.
8915
8916         * reflection.h reflection.c loader.c: Allow dynamic construction of
8917         pinvoke methods. Fixes #65571.
8918         
8919         * reflection.c (mono_reflection_get_type): Revert previous change since
8920         it causes regressions.
8921
8922 2004-09-08  Martin Baulig  <martin@ximian.com>
8923
8924         * class.c (class_compute_field_layout): Don't call
8925         mono_class_layout_fields() for open generic instances.
8926
8927 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
8928         * threads.c appdomain.c: fix typo in GC macro
8929
8930 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8931
8932         * threads.c: don't call mono_thread_detach() in start_wrapper(),
8933         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
8934
8935 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
8936
8937         * image.c (mono_image_close): Applied patch from 
8938         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
8939         assembly is loaded multiple times from data.
8940         
8941         * image.c (mono_image_open): Fix warning.
8942
8943 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8944
8945         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
8946         once. Fixes #58334.
8947         
8948         * reflection.c (mono_reflection_create_runtime_class): Initialize
8949         klass->nested_classes. Fixes #61224.
8950
8951 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8952
8953         * threads.c: sched_yield() on exit, to allow threads to quit.
8954
8955 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8956
8957         * object.c (mono_unhandled_exception): Remove leftover debug code.
8958
8959 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
8960
8961         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
8962
8963 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
8964
8965         * marshal.c (emit_marshal_array): Really null terminate string arrays.
8966         
8967         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
8968
8969 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8970
8971         * marshal.c (emit_marshal_array): Null terminate string arrays.
8972         
8973         * marshal.c (raise_auto_layout_exception): Fix warning.
8974
8975         * reflection.c (mono_param_get_objects): Initialize the default value
8976         with DBNull.Value, not null. Fixes #62123.
8977
8978 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
8979
8980         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
8981         throw an exception with a cute explanation.
8982
8983 2004-09-06  Dick Porter  <dick@ximian.com>
8984
8985         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
8986         Close the new process's thread handle, as we don't use it.  The
8987         handle stays around forever otherwise.
8988
8989 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
8990
8991         * object.c (arith_overflow): Fix warning.
8992
8993         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
8994         calling conventions in method refs. Fixes #65352.
8995
8996         * reflection.c: Fix warnings.
8997
8998 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
8999
9000         * icall.c: Add a new icall for Array.Clear
9001
9002 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
9003
9004         * object.c: When allocating an array, we have to throw
9005         an overflow exception if any of the lengths are < 0.
9006
9007 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
9008
9009         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
9010         properly. Also move implementation of string array marshalling to 
9011         managed code. Fixes #42316.
9012
9013 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9014
9015         * assembly.c: provide more information when loading an assembly fails.
9016
9017 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9018
9019         * filewatcher.c: don't expect the development fam package to be
9020         installed.
9021
9022 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
9023
9024         * marshal.c: Make a copy of the signature cookie since it will be
9025         freed by the caller.
9026         
9027         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
9028
9029         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
9030
9031         * metadata.c (mono_metadata_free_marshal_spec): New function to free
9032         marshal specs.
9033
9034         * marshal.c: More refactoring.
9035         
9036         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
9037         smaller functions.
9038
9039 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
9040
9041         * object.c: In mono_message_invoke, fill the output parameter array after
9042           calling the managed method (it was done before the call). This fixes
9043           bug #59299.
9044
9045 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9046
9047         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
9048         as well.
9049
9050 2004-09-02  Martin Baulig  <martin@ximian.com>
9051
9052         * class.c (mono_class_instance_size): Don't allow generic type
9053         definitions or open generic instances.
9054         (mono_class_array_element_size): If we're a value type, call
9055         mono_class_instance_size() on the original class.
9056
9057         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
9058         handle generic instances.
9059
9060         * mono-debug-debugger.c (write_type): Handle generic instances
9061         like classes.
9062
9063 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
9064
9065         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
9066         the allocation request fails. Fixes #65089.
9067
9068         * object.c (mono_runtime_free_method): Do not call mono_free_method.
9069         
9070         * object.c (mono_runtime_free_method): New function to free a dynamic
9071         method.
9072
9073         * marshal.c (mono_delegate_free_ftnptr): New function to free the
9074         delegate trampoline.
9075
9076         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
9077         with hasthis as dynamic,
9078
9079         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
9080
9081         * domain.c (mono_jit_info_table_remove): New function to remove an
9082         entry from the jit info table.
9083
9084         * class-internals.h (MonoMethod): Add 'dynamic' field.
9085
9086         * loader.c: Fix warnings.
9087
9088 2004-09-01  Martin Baulig  <martin@ximian.com>
9089
9090         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
9091         instead of mono_debugger_lock() because the latter one is a no-op
9092         unless running in the debugger.
9093
9094 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
9095
9096         * class.c (class_compute_field_layout): Classes with auto-layout or
9097         reference fields are not blittable.
9098         
9099 2004-09-01  Dick Porter  <dick@ximian.com>
9100
9101         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
9102         mono_image_get_filename() to get the assembly location.
9103
9104         * icall.c:
9105         * metadata.h: Fix compile warnings
9106
9107 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
9108
9109         * class.c (class_compute_field_layout): System.Object is blittable.
9110
9111         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
9112         as in/out. Fixes #59909.
9113
9114 2004-09-01  Martin Baulig  <martin@ximian.com>
9115
9116         * metadata.h (MONO_TYPE_ISREFERENCE): Call
9117         mono_metadata_generic_inst_is_valuetype() if we're a generic
9118         instance to check whether our underlying type is a reference type.
9119
9120 2004-09-01  Martin Baulig  <martin@ximian.com>
9121
9122         * metadata.c (mono_type_size): If we're a generic instance, call
9123         mono_class_value_size() for value types.
9124
9125 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
9126
9127         * marshal.c: Implement more custom marshalling functionality. Fixes
9128         #64915.
9129
9130 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9131
9132         * mono-debug.c, debug-mono-symfile.c: add some locking love.
9133
9134 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
9135
9136         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
9137
9138         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
9139
9140         * icall.c: Fix some warnings.
9141
9142         * threads.c (abort_appdomain_thread): Fix unref errors.
9143         (mono_thread_current): Fix THREAD_DEBUG define.
9144
9145 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
9146
9147         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
9148
9149         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
9150
9151 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
9152
9153         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
9154         string arrays.
9155
9156 2004-08-28  Martin Baulig  <martin@ximian.com>
9157
9158         * metadata.c
9159         (mono_metadata_generic_inst_is_valuetype): New public function.
9160
9161         * metadata.h (MONO_TYPE_ISSTRUCT): Call
9162         mono_metadata_generic_inst_is_valuetype() if we're a generic
9163         instance to check whether our underlying type is a valuetype.
9164
9165 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
9166
9167         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
9168         #63768.
9169
9170 2004-08-25  Martin Baulig  <martin@ximian.com>
9171
9172         * loader.c (mono_get_method_from_token): Abstract methods can also
9173         be generic and thus have type parameters.
9174
9175         * metadata-internals.h
9176         (MonoDynamicImage): Added `GPtrArray *gen_params'.
9177
9178         * reflection.c (mono_image_get_generic_param_info): Don't create a
9179         metadata row, just add an entry to the `gen_params' array.
9180         (build_compressed_metadata): Sort the `gen_params' array and then
9181         actually create the metadata.
9182
9183 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9184
9185         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
9186
9187 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
9188
9189         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
9190
9191 2004-08-24  Martin Baulig  <martin@ximian.com>
9192
9193         * class.cs (mono_class_is_subclass_of): Like an interface, a
9194         generic instance also derives from System.Object.
9195
9196 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
9197
9198         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
9199         custom modifiers to be in any order. Fixes #61990.
9200
9201 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
9202
9203         * object.c: Register mono_object_new_fast icall.
9204         
9205         * object.c (mono_class_get_allocation_ftn): Return to calling
9206         mono_object_new_fast, since it seems faster to compute the object 
9207         size in unmanaged code than passing it as a parameter.
9208
9209         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
9210
9211         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
9212         this function with Boehm as the oom handler, so we don't have to check
9213         the result of GC_malloc.
9214
9215         * object.c: Remove checks for oom.
9216
9217         * object.h object.c (mono_class_get_allocation_ftn): New function to
9218         return the icall which can be used to allocate an instance of a given
9219         class. 
9220
9221         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
9222
9223         * class-internals.h: Add 'enabled' field.
9224
9225 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
9226
9227         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
9228
9229 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
9230         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
9231         value 0x0010.
9232
9233 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9234
9235         * appdomain.c: use the Tls function for appdomain too,
9236         at Zoltan's request. Actually return in mono_context_get
9237
9238         * appdomain.c, profiler.c, threads.c: use __thread
9239
9240 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
9241
9242         * appdomain.c threads.c: Call GC_CreateThread on windows.
9243
9244         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
9245         multiple libraries since this don't work on windows.
9246
9247 2004-08-18  Martin Baulig  <martin@ximian.com>
9248
9249         * class-internals.h
9250         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
9251         MonoMethodHeader.
9252
9253         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
9254         MonoMethodNormal since we also need it for abstract and interface
9255         methods.
9256
9257         * reflection.c
9258         (build_compressed_metadata): Sort the GenericParam table.
9259         (mono_image_create_token): Added `gboolean create_methodspec'
9260         argument; this is false when generating a MethodImpl token.
9261         (reflection_methodbuilder_to_mono_method): Abstract and interface
9262         methods may also have generic parameters.
9263
9264 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9265
9266         * appdomain.c: thread local alloc
9267
9268 2004-08-17  Martin Baulig  <martin@ximian.com>
9269
9270         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
9271
9272         * icall.c
9273         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
9274         argument.
9275
9276         * class.c (mono_type_get_full_name): New public function.
9277         (mono_type_get_name): Don't include the type arguments.
9278
9279 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
9280
9281         * Makefile.am: Build static versions of libmetadata and libmonoruntime
9282         for inclusion into the mono executable.
9283
9284 2004-08-16  Martin Baulig  <martin@ximian.com>
9285
9286         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
9287         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
9288
9289 2004-08-14  Martin Baulig  <martin@ximian.com>
9290
9291         * class.c (dup_type): Also copy the `byref' field.
9292
9293 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
9294
9295         * reflection.c (create_dynamic_mono_image): Revert the last change 
9296         since it breaks bootstrap.
9297
9298 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
9299
9300         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
9301
9302         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
9303         not free them with g_free.
9304
9305 2004-08-11  Martin Baulig  <martin@ximian.com>
9306
9307         * reflection.c (mono_reflection_setup_internal_class): Also call
9308         mono_class_setup_mono_type() if we already have a `tb->type.type'.
9309
9310 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
9311
9312         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
9313         called during default (first) AppDomain creation. Keep track of
9314         Evidence when loading assemblies.
9315
9316 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9317
9318         * opcodes.c, opcodes.h: reduce runtime relocations.
9319
9320 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
9321
9322         * culture-info.h, locales.c: fixes and chages to sue the new
9323         optimized format of the locale data.
9324         * culture-info-tables.h: regenerated.
9325
9326 2004-08-06  Geoff Norton <gnorton@customerdna.com>
9327         
9328         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
9329
9330 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
9331
9332         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
9333         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
9334         * domain-internals.h: icall declaration.
9335         * icall.c: icall registration.
9336         * object-internals.h: New fields in MonoAssembly for CAS.
9337
9338 2004-08-05  Duncan Mak  <duncan@ximian.com>
9339
9340         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
9341         CEE_LDELEM_ANY.
9342
9343 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9344
9345         * reflection.c: fix to deal with object[] arrays in custom ctors
9346         (bug #62550).
9347
9348 2004-08-05  Martin Baulig  <martin@ximian.com>
9349
9350         * class.c (mono_class_array_element_size): Added support for
9351         generic instances and correctly handle "recursive" types.
9352
9353 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
9354
9355         * assembly.c: Fix warnings.
9356
9357 2004-08-04  Martin Baulig  <martin@ximian.com>
9358
9359         * class.c
9360         (mono_type_get_name_recurse): Added `gboolean include_arity'
9361         argument specifying whether or not we should include the generic
9362         arity in the type name.
9363         (_mono_type_get_name): New static function.
9364         (mono_class_setup_vtable): If we're a generic instance, don't
9365         include the generic arity in the names of explicit method
9366         implementations.        
9367
9368 2004-08-03  Martin Baulig  <martin@ximian.com>
9369
9370         * class.c (mono_type_get_name_recurse): Enclose the generic type
9371         arguments in `<', '>'.
9372
9373 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9374
9375         * gc.c: make GC warning messages use the trace API, they are just
9376         noise to most of the users.
9377
9378 2004-08-03  Martin Baulig  <martin@ximian.com>
9379
9380         * debug-mono-symfile.c (read_string): Correctly read the string.
9381
9382 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
9383
9384         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
9385         
9386         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
9387         icalls.
9388         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
9389
9390 2004-07-30  Martin Baulig  <martin@ximian.com>
9391
9392         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
9393         Reflect latest symbol writer changes.   
9394
9395 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
9396
9397         * object.c: always create an object if null is passed
9398         to Invoke() where a valuetype is expected.
9399
9400 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
9401
9402         * marshal.c (mono_marshal_init): make managed
9403         signatures match native ones better for 64bits.
9404
9405 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9406
9407         * appdomain.c: hack to build correctly the private bin path on windows.
9408         Fixes bug #61991.
9409
9410 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
9411
9412         * assembly.c: Load mscorlib from the correct framework directory
9413           (mono/<version>/mscorlib.dll).
9414         * appdomain.h: Added prototypes for new functions.
9415         * internals.h: Added some prototypes.
9416         * domain.c: When initializing the runtime, get from the executable and
9417           the configuration files the runtime version that the app supports.
9418           Added support methods for reading app.exe.config. Added list of versions
9419           supported by the JIT. Added two new methods: mono_init_from_assembly,
9420           which initializes the runtime and determines the required version from
9421           the provided exe file, and mono_init_version, which initializes
9422           the runtime using the provided version.
9423         * icall.c: Get machine.config from version-specific directory.
9424         * reflection.c: When generating an image, embed the version number
9425           of the current runtime.
9426
9427 2004-07-28  Dick Porter  <dick@ximian.com>
9428
9429         * socket-io.c
9430         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
9431         returned sockaddr size before creating the remote address object.
9432         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
9433         61608.
9434
9435 2004-07-28  Dick Porter  <dick@ximian.com>
9436
9437         * locales.c (string_invariant_compare_char): Fix invariant char
9438         compares between upper and lower cases.  Fixes bug 61458.
9439
9440 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
9441         
9442         * marshal.c: actually cache stelem.ref wrappers.
9443         
9444 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9445
9446         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
9447         sections and remove the mono_cli_rva_map () function.
9448
9449 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9450
9451         * debug-mono-symfile.c: fix one more endianess issue, from a patch
9452         by Geoff Norton (<gnorton@customerdna.com>).
9453
9454 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9455
9456         * class.c: fix class loads for pointer types (typeof(int) !=
9457         typeof(int*)).
9458
9459 2004-07-27  Martin Baulig  <martin@ximian.com>
9460
9461         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
9462         reading the debugging information from an external ".mdb" file.
9463
9464 2004-07-24  Martin Baulig  <martin@ximian.com>
9465
9466         * reflection.c (mono_image_get_type_info): Only write a class
9467         layout entry if we actually have a size or a packing size.
9468
9469 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
9470
9471         * reflection.c (type_get_fully_qualified_name): 
9472         insert cast to get type checking of ?: with non-gcc compilers
9473
9474 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
9475
9476         * rand.c: use g_getenv for both lookups of
9477         MONO_EGD_SOCKET
9478
9479 2004-07-17  Martin Baulig  <martin@ximian.com>
9480
9481         * reflection.c (mono_reflection_bind_generic_method_parameters):
9482         Set `gmethod->reflection_info'.
9483
9484 2004-07-17  Martin Baulig  <martin@ximian.com>
9485
9486         * class.c (mono_class_create_from_typedef): Insert the newly
9487         created class into the hash table before computing the interfaces
9488         since we could be called recursively.
9489
9490 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
9491
9492         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
9493         function to implement stelem.ref in managed code
9494         * class-internals.h, debug-helpers.c: a new wrapper type
9495         for the above.
9496
9497 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
9498
9499         * gc.c: allow GC handles to work even when no GC is compiled in.
9500         Fix part of bug #61134 (GetAddrOfPinnedObject).
9501
9502 2004-07-13  Peter Williams  <peter@newton.cx>
9503  
9504         * process.c (complete_path): Make sure we don't attempt to execute
9505         directories.
9506  
9507 2004-07-12  Geoff Norton <gnorton@customerdna.com>
9508
9509         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
9510           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
9511           and will add/subtract the hour if needed
9512
9513 2004-07-12  Martin Baulig  <martin@ximian.com>
9514
9515         * reflection.c (mono_field_get_object): If we have
9516         `field->generic_info', take the attributes from
9517         `field->generic_info->generic_type'.    
9518
9519 2004-07-12  Martin Baulig  <martin@ximian.com>
9520
9521         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
9522         This function must be called before initializing the runtime.
9523         (mono_debug_init_1): New function; call this after initializing
9524         the runtime, but before loading the assembly.  It tells the
9525         debugger to load corlib and the builtin types.
9526
9527         * mono-debug-debugger.c: Did some larger changes in the debugging
9528         code; support recursive class declarations, make sure we actually
9529         add all classes.
9530
9531 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9532
9533         * debug-helpers.c: undo my previous patch and fixed the real issue in
9534         ../mini/exceptions-x86.c
9535
9536 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9537
9538         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
9539         when no HOME env. variable was set and a NullRef was thrown in a .cctor
9540         called from other .cctors.
9541
9542 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
9543
9544         * loader.c: Removed the mono_loader_wine_init hack now that we are
9545         doing a managed version of Windows.Forms.
9546
9547 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
9548
9549         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
9550         threadpool.c, threads.c: remove static data from rootset.
9551
9552 2004-07-09  Dick Porter  <dick@ximian.com>
9553
9554         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
9555         Don't do any more processing if the matched length was 0.  It was
9556         increasing the size of the string before.  Fixes bug 61167.
9557
9558 2004-07-09  Dick Porter  <dick@ximian.com>
9559
9560         * socket-io.h:
9561         * socket-io.c
9562         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
9563         Add support for SO_PEERCRED if its available.
9564
9565 2004-07-09  Peter Bartok <pbartok@novell.com>
9566         * loader.c: winelib.exe.so error message is now only displayed if
9567         MONO_DEBUG is set. To help us avoid questions when people are trying
9568         out the new Managed.Windows.Forms.
9569
9570 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
9573         for isinst and castclass wrappers.
9574
9575         * class-internals.h icall.c: Move registration and lookup of JIT icalls
9576         to libmetadata from the JIT, so they could be used by the marshalling
9577         code and the interpreter.
9578
9579         * marshal.c: Register marshalling related JIT icalls here instead of
9580         in mini.c. Use CEE_MONO_ICALL instead of the family of 
9581         CEE_MONO_PROC<x> opcodes to call marshalling functions.
9582
9583         * metadata.h: Remove unneeded marshalling conversions.
9584
9585         * opcodes.c: Update for new opcodes.
9586         
9587 2004-07-08  Martin Baulig  <martin@ximian.com>
9588
9589         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
9590         (mono_debug_get_domain_data): Make this function static.
9591
9592 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9593
9594         * gc.c, object.h: add nice GC handle API for embedders.
9595
9596 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
9597
9598         * reflection.c: more changes for the new api
9599
9600         * object.c: When we reflect on a field w/ a constant value, it
9601         will not have a memory location, so we must access metadata. Also,
9602         allow easier reading of strings so that we can read them from
9603         the constant data.
9604
9605         * class.c (mono_class_layout_fields): no need for literal fields here.
9606
9607         * class-internals.h: api changes for const fields
9608
9609         * icall.c (ves_icall_get_enum_info): use new apis for const fields
9610
9611 2004-07-06  Martin Baulig  <martin@ximian.com>
9612
9613         * mono-debug.h: Increment version number to 44.
9614
9615         * mono-debug.c (mono_debug_add_wrapper): The second argument is
9616         now a gpointer, rewrote this whole method.
9617
9618         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
9619         function.  Add information about the wrapper in a new "misc table".
9620
9621         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
9622         for the new misc table.
9623
9624 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
9625
9626         * metadata-internals.h image.c: Add a cache for helper signatures.
9627
9628         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
9629
9630 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
9631
9632         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
9633         delegates from a delegate. Fixes #61033.
9634         
9635         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
9636         marshalling of stringbuilder arrays. Fixes #59900.
9637
9638 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
9639
9640         * icall.c: Add EnumBuilder:setup_enum_type icall.
9641
9642 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
9643
9644         * icall.c: Added a new icall for the property version of
9645         OffsetOfStringData.
9646
9647 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
9648
9649         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
9650         it has a constant size across platforms.
9651
9652         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
9653         stack trace.
9654
9655 2004-06-29  Martin Baulig  <martin@ximian.com>
9656
9657         * mono-debug.c (mono_debug_add_method): Protect the whole function
9658         in mono_debugger_lock(), not just parts of it.
9659
9660 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
9661
9662         * reflection.c: make sure padding bytes in heaps are zeroed.
9663
9664 2004-06-24  David Waite  <mass@akuma.org>
9665
9666         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
9667         image.c, loader.c, locales.c, marshal.c, metadata.c,
9668         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
9669         string-icalls.c, threads.c: change to C90-style comments from C99 /
9670         C++ -style
9671
9672 2004-06-24  Dick Porter  <dick@ximian.com>
9673
9674         * threads.c
9675         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
9676         return createdNew.  Fixes bug 60412.
9677
9678         * threads-types.h: 
9679         * icall.c: Add createdNew parameter to CreateMutex icall
9680
9681 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9682
9683         * reflection.c, object-internals.h: save default value in params.
9684
9685 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9686
9687         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
9688         no need to build a new path combining that with the application base.
9689         Fixes bug #60442.
9690
9691 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
9692
9693         * reflection.c: fixed minor standard compliance issues.
9694
9695 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
9696
9697         * reflection.c: fixed issue with encoding some custom attributes
9698         (arrays in properties and fields, bug #60411).
9699
9700 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9701
9702         * reflection.c: fix start address when copying the public key token.
9703
9704 2004-06-23  Martin Baulig  <martin@ximian.com>
9705
9706         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
9707         the `exc' object in a static object to put it into the GC's root set.
9708
9709 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
9710
9711         * reflection.c: make mono_reflection_setup_internal_class ()
9712         callable a second time to setup a new parent class.
9713
9714 2004-06-23  Dick Porter  <dick@ximian.com>
9715
9716         * threads.c: Check for WAIT_IO_COMPLETION return values.
9717
9718 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
9719
9720         * appdomain.c: Removed the g_free on the public key token. Now copy 
9721         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
9722         * assembly.c: Added public key token string value when loading 
9723         assemblies. Fix bug #60439.
9724         * icall.c: Added missing informations (like public key) in 
9725         GetReferencedAssemblies. Fix #60519.
9726         * image.h: Changed definition for public key token from const char*
9727         public_tok_value to guchar public_key_token [17];
9728         * reflection.c: Updated for changes to public key token.
9729
9730 2004-06-22  Lluis Sanchez Gual
9731
9732         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
9733         for the field in base classes.
9734
9735 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9736
9737         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
9738         mark headers as not supported, they are installed only for use by the
9739         debugger.
9740
9741 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
9742
9743         * *.c, *.h: avoid namespace pollution in public headers.
9744
9745 2004-06-21  Martin Baulig  <martin@ximian.com>
9746
9747         * exception.c (mono_get_exception_security): It's in
9748         "System.Security", not in "System".
9749
9750         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
9751         the exception classes.
9752
9753 2004-06-21  Martin Baulig  <martin@ximian.com>
9754
9755         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
9756         Protect the exception object from being finalized.
9757
9758 2004-06-21  Martin Baulig  <martin@ximian.com>
9759
9760         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
9761         public function.
9762
9763 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
9764
9765         * reflection.c: Load the assembly in mono_reflection_type_from_name,
9766         if it was not loaded before. Fix parts of #60439.
9767
9768 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
9769
9770         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
9771         code that was broken since Ben's change: wrappers are now
9772         dependent on the method signature only again.
9773
9774 2004-06-21  Martin Baulig  <martin@ximian.com>
9775
9776         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
9777         added interface support.
9778
9779 2004-06-21  Martin Baulig  <martin@ximian.com>
9780
9781         * class.c (mono_vtable_get_static_field_data): New public method.
9782
9783 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
9784
9785         * filewatcher.c : Windows build fix to be compliant with API changes.
9786
9787 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9788
9789         * class.h, class.c: more accessors.
9790         * metadata.h, metadata.c: prepare for hiding MonoType and
9791         MonoMethodSignature: people should use the accessors from now on
9792         outside of the tree.
9793
9794 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9795
9796         * *.c, *.h: more API cleanups.
9797
9798 2004-06-18  Jackson Harper  <jackson@ximian.com>
9799
9800         * assembly.c: Trace loading assemblies.
9801         * loader.c: Trace loading native libraries.
9802         * mono-config.c: Trace loading config files.
9803         
9804 2004-06-18  Dick Porter  <dick@ximian.com>
9805
9806         * locales.c: Tell ICU the lengths of strings, it can cope with
9807         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
9808
9809 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
9810
9811         * image.c: swapped name/filename;
9812
9813 2004-06-18  Martin Baulig  <martin@ximian.com>
9814
9815         * mono-debug-debugger.c (write_class): Write the parent class at
9816         the end of the header.
9817
9818 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
9819
9820         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
9821
9822 2004-06-17  Raja R Harinath  <rharinath@novell.com>
9823
9824         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
9825         (bundle_obj): New conditional define.
9826         (BUILT_SOURCES): Remove.
9827         ($(bundle_srcs)): Make parallel-make safe.
9828         (libmonoruntime_la_LIBADD): Make unconditional.
9829         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
9830         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
9831
9832 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
9833
9834         * culture-info-tables.h: It was inconsistent with the latest
9835           supp info files.
9836
9837 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
9838
9839         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
9840         be loaded.
9841
9842         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
9843         with gcc 2.95.
9844
9845 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
9846
9847         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
9848         cleaned up public header threads.h.
9849
9850 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9851
9852         * Makefile.am, *.c, *.h: more API cleanups.
9853
9854 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9855
9856         * Makefile.am: removed monosn from compilation.
9857         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
9858         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
9859         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
9860         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
9861         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
9862         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
9863
9864 2004-06-15  Jackson Harper  <jackson@ximian.com>
9865
9866         * assembly.c: Make locales lower case when searching the GAC for
9867         assemblies. gacutil will always make locales lowercase when
9868         installing so this effectively makes them case insensitive.
9869         
9870 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
9871
9872         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
9873         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
9874           parameter which allows to choose whether the wait can be interrupted or 
9875           not. Also added the method mono_monitor_enter(), which locks the monitor
9876           using an infinite wait and without allowing interruption.
9877           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
9878           interrupted.
9879         * object.h: Added new fields in MonoThread. suspend_event holds the event
9880           used to susped/resume the thread. synch_lock is the lock object to use for
9881           modifying the thread state.
9882         * threads.c: Use the new synch_lock object for locking, instead of "this",
9883           which can generate deadlocks.
9884           Moved thread state change in Thread.Sleep and Thread.Join from managed
9885           to unmanaged code. This avoids a deadlock when the thread was suspended
9886           just after acquiring the thread lock.
9887           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
9888           Implemented Thread.Suspend using an event instead of ThreadSuspend,
9889           which is not fully implemented in the io-layer.
9890         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
9891
9892 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
9893
9894         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
9895         threads-types.h: more API cleanups.
9896
9897 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
9898
9899         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
9900         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
9901         threadpool.c, threads.c: first pass at the exported API cleanup.
9902
9903 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9904
9905         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
9906
9907 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9908
9909         * icall.c: added internalGetHome.
9910
9911 2004-06-14  Dick Porter  <dick@ximian.com>
9912
9913         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
9914         possible to return successfully when '.' or '..' were the only
9915         entries in a directory, but were skipped.  The MonoIOStat was not
9916         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
9917         Fixes bug 59574.
9918
9919 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9920
9921         * reflection.c: make binaries run on .Net 1.1 by default.
9922
9923 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9924
9925         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
9926
9927 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
9928
9929         * marshal.c: keep track of struct size with explicit layout
9930         (bug #59979).
9931
9932 2004-06-12  Martin Baulig  <martin@ximian.com>
9933
9934         * mono-debug-debugger.c: Comment out a debugging g_message().
9935
9936 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
9937
9938         * reflection.c, reflection.h: do not free custom attrs that are cached.
9939         * icall.c: use braces to make code clearer.
9940
9941 2004-06-11  Martin Baulig  <martin@ximian.com>
9942
9943         * class.h (MonoInflatedField): New type.
9944         (MonoClassField): Replaced `MonoType *generic_type' with
9945         `MonoInflatedField *generic_info'.
9946
9947         * icall.c
9948         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
9949
9950 2004-06-11  Martin Baulig  <martin@ximian.com>
9951
9952         * reflection.c (mono_image_create_method_token): Correctly encode
9953         varargs methods.
9954
9955 2004-06-11  Martin Baulig  <martin@ximian.com>
9956
9957         * metadata.c (mono_metadata_parse_method_signature): When parsing
9958         a MethodDef which has VarArgs, also set sentinelpos if we don't
9959         have any parameters.
9960
9961 2004-06-11  Martin Baulig  <martin@ximian.com>
9962
9963         * verify.c (mono_method_verify): In CEE_CALL, use
9964         mono_method_get_signature() to get the method's signature, unless
9965         we're a PInvoke method.
9966
9967 2004-06-10  Jackson Harper  <jackson@ximian.com>
9968
9969         * assembly.c: Use <path>/lib/mono/gac for the extra paths
9970         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
9971         logical name as the supplied path is just a prefix to the gac not
9972         the direct path to it.
9973         
9974 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
9975
9976         * reflection.c: make the token for a created method match
9977         the token of the MethodBuilder it was created from
9978         (IKVM requires this behaviour now).
9979
9980 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
9981
9982         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
9983         reflection.c, socket-io.c: leak fixes.
9984
9985 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9986
9987         * icall.c: handle sentinel pos in vararg methods in position different
9988         from 0.
9989
9990 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9991
9992         * culture-info-tables.h: freshly generated.
9993
9994 2004-06-09  Martin Baulig  <martin@ximian.com>
9995
9996         * loader.c (mono_get_method_constrained): Call `mono_class_init
9997         (constrained_class)'.   
9998
9999 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
10000
10001         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
10002         any methods. Fixes #59629.
10003
10004 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
10005
10006         * culture-info-tables.h: reflecting locale-builder updates.
10007
10008 2004-06-08  Dick Porter  <dick@ximian.com>
10009
10010         * object.h:
10011         * locales.c: Fixed compile warnings, including a real bug in
10012         CompareInfo_internal_compare.
10013         
10014 2004-06-08  Dick Porter  <dick@ximian.com>
10015
10016         * locales.c
10017         (ves_icall_System_Globalization_CompareInfo_internal_index):
10018         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10019         Double-check the resuls of usearches, because ICU currently
10020         ignores most of the collator settings here.  Fixes bug 59720.
10021         
10022 2004-06-08  Dick Porter  <dick@ximian.com>
10023
10024         * locales.c
10025         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
10026         Fix memory leak and segfault-causing typo.  No idea how this one
10027         lasted so long without being noticed.
10028
10029 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
10030
10031         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
10032         any methods. Fixes #59629.
10033
10034 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10035
10036         * assembly.c:
10037         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
10038         own the critical section before). Removed dead code (that's done
10039         in the preload hook).
10040
10041         (mono_assembly_load_with_partial_name): call the preload hook.
10042
10043 2004-06-08  Martin Baulig  <martin@ximian.com>
10044
10045         * metadata.c (mono_metadata_signature_alloc): Default
10046         `sentinelpos' to -1.
10047
10048         * reflection.c (mono_image_get_array_token): Likewise.
10049
10050 2004-06-08  Martin Baulig  <martin@ximian.com>
10051
10052         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
10053
10054         * metadata.c (mono_metadata_parse_method_signature): When parsing
10055         a MethodDef which has VarArgs, set sentinelpos.
10056
10057         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
10058         `gint16' since we're using -1 for non-varargs methods.
10059
10060         * reflection.c
10061         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
10062         (method_encode_signature): Added varargs support.
10063         (method_builder_encode_signature): Likewise.
10064         (mono_image_get_varargs_method_token): New static method.
10065         (mono_image_create_method_token): New public method; this is
10066         called via an icall instead of mono_image_create_token() when
10067         calling a varargs method.       
10068
10069 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
10070
10071         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
10072
10073 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
10074
10075         * culture-info-tables.h : Reflecting the latest locale-builder that
10076           fixed empty array representation ({} to {0}).
10077
10078 2004-06-07  Jackson Harper  <jackson@ximian.com>
10079
10080         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
10081         looking up extra gac paths. This allows MONO_GAC_PATH to act
10082         exactly like a prefix.
10083         
10084 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
10085
10086         * reflection.c (mono_reflection_type_from_name): Make a copy of the
10087         type name before modifying it. Fixes #59405.
10088
10089 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
10090
10091         * culture-info.h: added fields for "all datetime patterns".
10092         * locales.c: (  ves_icall_System_Globalization_CultureInfo
10093           _construct_datetime_format ()): fill xxx_patterns fields.
10094         * object.h: added fields for "all datetime patterns" to
10095           MonoDateTimeFormatInfo.
10096         * culture-info-tables.h: reflecting locale-builder updates.
10097
10098 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
10099
10100         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
10101         the event has no add and remove methods. Fixes #59629.
10102
10103 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
10104
10105         * object.c: Fixed possible integer overflow when allocating large
10106         strings.
10107
10108 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
10109
10110         * culture-info-tables.h: reflecting locale-builder updates.
10111
10112 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
10113
10114         * culture-info-tables.h: reflecting locale-builder updates.
10115
10116 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
10117
10118         * culture-info-tables.h: reflecting locale-builder updates.
10119
10120 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
10121
10122         * threads.c: Made Thread.Sleep abortable.
10123
10124 2004-06-02  Martin Baulig  <martin@ximian.com>
10125
10126         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
10127
10128         * debug-mono-symfile.h: Bumped symbol file version number to 37.
10129
10130 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
10131
10132         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
10133
10134 2004-05-30  Jackson Harper  <jackson@ximian.com>
10135
10136         * reflection.c: Do not hardcode assembly versions or public key
10137         tokens anymore. All of this except the corlib section was dead
10138         code anyways.
10139         
10140 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
10141
10142         * object.c (mono_runtime_invoke_array): Automatically create boxed
10143         objects for byref valuetypes if needed. Fixes #59300.
10144         
10145         * object.c (mono_method_return_message_restore): Handle 
10146         MONO_TYPE_OBJECT as well.
10147
10148 2004-05-28  Jackson Harper  <jackson@ximian.com>
10149
10150         * reflection.c: The modified type encoding was causing build
10151         problems. Reverted for now.
10152         
10153 2004-05-28  Jackson Harper  <jackson@ximian.com>
10154
10155         * reflection.c/h: Take an assembly ref so that we dont create
10156         fully qualified names when encoding types in the same assembly as
10157         the custom attribute being emitted.
10158         * appdomain.c: Increment version number.
10159         
10160 2004-05-26  Duncan Mak  <duncan@ximian.com>
10161
10162         * icall.c
10163         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
10164         Set the full version number (major, minor, build, revision).
10165
10166 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
10167
10168         * marshal.c (emit_struct_conv): increment src/dst after blit
10169         (mono_marshal_get_managed_wrapper,
10170         mono_marshal_get_native_wrapper): make sure we have marshalling
10171         info before marshalling params (info computation affects
10172         blittable)
10173
10174         * class.c (class_compute_field_layout): correctly deal with
10175         blittable
10176         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
10177         value types (as per what windows dows by default)
10178         (mono_class_setup_mono_type): System.ValueType is blittable
10179         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
10180         blittable
10181
10182         * marshal.c (mono_marshal_load_type_info): flag types  as
10183         non-blittable if the native layout doesn't match the managed
10184         layout
10185
10186 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10187
10188         * appdomain.c: don't add stuff in the private search path that is
10189         above the application base. If application base is not set, there's
10190         no private search path.
10191
10192 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
10193
10194         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
10195         byref struct arguments in native->managed marshalling.
10196
10197 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
10198
10199         * marshal.c (mono_marshal_get_runtime_invoke): correctly
10200         cache methods using signature (special case for methods
10201         that are value type or string class)
10202         
10203         * image.c (mono_image_close): clean up allocated GSList's
10204         in runtime_invoke_cache.
10205
10206 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10207
10208         * mono-config.c: set the correct path for mono_cfg_dir on windows when
10209         there's no MONO_CFG_DIR environment variable defined.
10210
10211 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10212
10213         * threads.c: windows version must be >= 0x0500 to include OpenThread.
10214
10215 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
10216
10217         * threadpool.c: Really wait for 500ms after the async call, even if the wait
10218           is interrumped.
10219         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
10220           before waiting for it, and call CloseHandle after the wait to unref it.
10221           This will make sure that handles are not disposed too early.
10222
10223 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10224
10225         * appdomain.c:
10226         * appdomain.h:
10227         * icall.c: removed
10228         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
10229         needed now.
10230
10231         * object.c: se the application_base only for the domain that runs
10232         Main. Fixes bug #59216,
10233
10234 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10235
10236         * appdomain.c:
10237         * object.c: only the domain in which Main is run have
10238         SetupInformation.ConfigurationFile set, so moved a few lines from
10239         appdomain.c to object.c.
10240
10241 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10242
10243         * appdomain.c: we tried to load [name].(dll|exe), but according
10244         to bug #57710, we must also try [culture]/[name].(dll|exe) and
10245         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
10246         There's a test case attached to bug #58922.
10247
10248 2004-05-27  Dick Porter  <dick@ximian.com>
10249
10250         * icall.c:
10251         * file-io.c: Implemented icalls for locking and unlocking regions
10252         in a file.
10253         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
10254         FALSE on error (fixes both compiler warning and real bug.)
10255
10256 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
10257
10258         * culture-info-tables.h: reflecting locale-builder updates.
10259
10260           (Added missing ChangeLog entry for 05/26)
10261
10262 2004-05-27  Jackson Harper  <jackson@ximian.com>
10263
10264         * locales.c: Fix some cut and paste errors.
10265         
10266 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10267
10268         * mono-config.c: set the correct path for config. directory on windows.
10269
10270 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
10271
10272         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
10273           on win32.
10274
10275 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10276
10277         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
10278         from pinvoke functions.
10279         
10280         * marshal.c (mono_ftnptr_to_delegate): Implement this.
10281
10282 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
10283
10284         * culture-info-tables.h: reflecting locale-builder updates.
10285
10286 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
10287
10288         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
10289         #59086.
10290
10291 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
10292
10293         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
10294         * icall.c: Modified icalls for RNG.
10295         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
10296         Windows (CryptoAPI).
10297
10298 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10299
10300         * locales.c: Fix build.
10301
10302 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
10303
10304         * culture-info-tables.h: reflecting locale-builder updates.
10305
10306 2004-05-25  Jackson Harper  <jackson@ximian.com>
10307
10308         * locales.c: When creating the current culture use the $LANGs
10309         specific culture. So DateTimeFormat and NumberFormat entries are created.
10310         
10311 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
10312
10313         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
10314         a char array as parameter.
10315
10316 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
10317
10318         * image.c: In mono_image_open(), always use an absolute path name to
10319           look for already loaded images.
10320
10321 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
10322
10323         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
10324         missing in the windows build (like older cygwin include files).
10325
10326 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
10327
10328         * icall.c: Fixed check for possible integer overflow in Buffer_
10329         BlockCopy icall. Replaced comments style // by /* */.
10330
10331 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
10332
10333         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
10334         
10335         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
10336         check after MONO_VTADDR. Fixes pinvoke2.exe.
10337
10338         * marshal.h marshal.c metadata.h: Add beginnings of support for
10339         ftnptr -> delegate marshalling.
10340
10341 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
10342
10343         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
10344         * threads.c: Fix warnings.
10345
10346 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
10347
10348         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
10349         * icall.c: Registered icalls for Suspend and Resume.
10350         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
10351           Thread.Abort.
10352         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
10353         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
10354         * process.c: Use WaitForSingleObjectEx.
10355         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
10356           checkpoints.
10357         * threads.c, threads.h: Make use of new Ex wait methods. Improved
10358           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
10359           for Suspend and Resume. Added new mono_thread_stop, used for stoping
10360           background threads. Added basic support for Abort in Windows.
10361           Start new threads using a managed delegate invoke wrapper. This wrapper
10362           has an interruption checkpoint that is needed since an interruption
10363           can be requested before the thread leaves the unmanaged code that starts 
10364           the thread.
10365         * marshal.c: Added interruption checkpoint after every native call, and
10366           also before managed calls for wrappers called from unmanaged code to
10367           go into managed code.
10368         * object.h: Added new field in MonoThread to keep track of interruption
10369           requests.
10370
10371 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
10372
10373         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
10374         calls.
10375
10376 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10377
10378         * appdomain.c:
10379         * assembly.c:
10380         * gc.c:
10381         * locales.c:
10382         * mono-config.c:
10383         * rand.c: getenv -> g_getenv (windows!)
10384
10385         * process.c: complete_path is also used on non-windows platforms.
10386
10387 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10388
10389         * icall.c: new signature for Process_Start.
10390
10391         * process.[ch]: new signature for Process_Start. If we're on windows
10392         and UseShellExecute is false, we have to search for the program by
10393         ourselves if we don't get a full path.
10394
10395 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
10396
10397         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
10398         marshalling and call CleanUpNativeData if needed. Fixes #58646.
10399
10400 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10401
10402         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
10403         Fixes bug #58373.
10404
10405 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10406
10407         * process.c: use double quotes to quote program name and arguments on
10408         windows. Fixes bug #58575.
10409
10410 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10411
10412         * file-io.c: don't return "." and ".." when using windows Find*File.
10413
10414 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
10415
10416         * marshal.c: Don't pass wrappers to message init because method 
10417         addressed used to lookup metadata. part of remoting[2|3] fix.
10418
10419 2004-05-15  Jackson Harper  <jackson@ximian.com>
10420
10421         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
10422         path is essentially the same as MONO_PATH except that it points to
10423         GACs instead of lib directories.
10424         * loader.h: The user gac is gone so we dont need function to
10425         enable/disable it.
10426         * mono-config.c: user gac option is now gone.
10427         
10428 2004-05-15  Jackson Harper  <jackson@ximian.com>
10429
10430         * culture-info.h: Make defines more consistent, add calendar data
10431         to the culture info table.
10432         * culture-info-tables.h: Add basic calendar data. Basically
10433         everyone gets default gregorian until all the data is
10434         updated.
10435         * locales.c: Use the new consistent defines. Set calendar data for
10436         culture info objects.
10437         * object.h: add a field for calendar data to CultureInfo
10438         
10439 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
10440
10441         * image.c: image->runtime_invoke_cache is keyed on signatures now.
10442         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
10443         a signature.
10444         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
10445         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
10446         an extra param that is the pointer of the method to invoke. The IL for
10447         the invoke method is no longer specific to the method, but to the
10448         signature of the method. Thus, we can share the same code for multiple
10449         methods. This reduces the number of methods that have to be compiled.
10450
10451 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
10452
10453         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
10454
10455         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10456
10457         * icall.c: Optimize Buffer.BlockCopy.
10458
10459 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10460
10461         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
10462         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
10463         quote). Changed them to "MMMM yyyy".
10464
10465 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
10466
10467         * rand.c
10468         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
10469
10470 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
10471
10472         * reflection.h: Updated after changes to managed structures.
10473
10474         * appdomain.c: Bump corlib version.
10475
10476 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10477
10478         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
10479         windows.
10480
10481 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10482
10483         * Makefile.am: link to ../os/libmonoos.la on windows.
10484
10485         * assembly.c:
10486                 -If MONO_DEBUG, warn about non-existing directories in
10487                 MONO_PATH.
10488                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
10489                 compile time variable.
10490                 -Removed init_default_path and call mono_set_rootdir from
10491                 libmonoos.a instead (windows only).
10492
10493         * assembly.h: declare mono_assembly_getrootdir().
10494
10495         * domain.c:
10496         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
10497
10498         * loader.c: s/getenv/g_getenv/
10499
10500 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
10501
10502         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
10503
10504         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
10505
10506         * metadata.h: Add new marshalling conversions.
10507
10508         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
10509         function.
10510
10511         * reflection.c (mono_reflection_get_type): Lookup the type in all
10512         modules of a multi-module assembly. Fixes #58291.
10513
10514 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
10515
10516         * threads.c: Before aborting a background, set the StopRequested
10517         state.  This avoids throwing the Abort exception.
10518         In mono_thread_manage, don't continue with the shutdown until all
10519         aborted threads have actually stopped.
10520
10521 2004-05-10  Jackson Harper  <jackson@ximian.com>
10522
10523         * locales.c: Remove the modifier from culture names.
10524         
10525 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10526
10527         * Makefile.am: monosn is not installed any more. It has been deprecated
10528         in favor of sn.
10529
10530 2004-05-07  Jackson Harper  <jackson@ximian.com>
10531
10532         * locales.c
10533         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
10534         Fix array construction, add bailout if the length is 0.
10535
10536 2004-05-07  Dick Porter  <dick@ximian.com>
10537
10538         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
10539         machine doesn't have a DNS entry.  Patch by Urs Muff
10540         (umuff@quark.com), fixes bug 57928.
10541
10542 2004-05-06  Jackson Harper  <jackson@ximian.com>
10543
10544         * reflection.c: Handle null PublicTokens properly. alloc mem for
10545         assembly names culture so we dont crash when freeing it.
10546         
10547 2004-05-06  Jackson Harper  <jackson@ximian.com>
10548
10549         * assembly.c: Check the usergac when loading with partial names.
10550         
10551 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
10552
10553         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
10554         does nothing for now (not required for Linux/Windows) but the class
10555         library can call it (and a newer or modified runtime could need it).
10556         * icall.c: Registred icall.
10557
10558 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10559
10560         * loader.c: prints a message on module loading error we set MONO_DEBUG
10561         environment variable.
10562
10563 2004-05-05  Jackson Harper  <jackson@ximian.com>
10564
10565         * appdomain.c: Handle PublicKeyToken=null properly.
10566         
10567 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
10568
10569         * environment.c|h: Added icall ves_icall_System_Environment_
10570         GetOSVersionString to get the current OS version as a string.
10571         * icall.c: Registred icall.
10572
10573 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
10574
10575         * object.c: in mono_object_get_virtual_method(), take into account that
10576         non-virtual methods don't have a slot in the vtable. Check needed when
10577         the object is a proxy.
10578
10579 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
10580
10581         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
10582         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
10583
10584         * object.c (mono_class_compute_gc_descriptor): Fix warning.
10585
10586         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
10587         passed when a valuetype is expected.
10588
10589         * object.c (mono_unhandled_exception): Only set the exit code if the
10590         exception happens in the main thread. Fixes thread5.exe.
10591
10592         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
10593         invalid names. Fixes #58047.
10594
10595 2004-05-03  Jackson Harper  <jackson@ximian.com>
10596
10597         * assembly.c: This line was committed accidently and is unneeded.
10598         
10599 2004-05-03  Jackson Harper  <jackson@ximian.com>
10600
10601         * icall.c: Add new icall for Assembly::LoadWithPartialName
10602         * assembly.c/.h: new function that probes the GAC to load partial
10603         assembly names by Paolo Molaro.
10604         
10605 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10606
10607         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
10608         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
10609         (type_get_fully_qualified_name): Added PublicKeyToken when building a
10610         full type name.
10611
10612 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10613
10614         * appdomain.c: fixed check for 'neutral' culture and removed warning.
10615         * reflection.c: fix bug when parsing a full type name and Version is not
10616         the last thing in the string.
10617
10618 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
10619
10620         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
10621         crashes when it is freed.
10622
10623 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10624
10625         * assembly.c: print the compat warning to stderr.
10626
10627 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
10628
10629         * assembly.c (mono_assembly_load_references): Add a compatibility
10630         hack to run old applications that might be still referencing the
10631         3300-based assemblies, only do this for System.xxx.
10632
10633 2004-05-01  Jackson Harper  <jackson@ximian.com>
10634
10635         * appdomain.c: If the culture is neutral we set it to "".
10636         
10637 2004-04-29  Jackson Harper  <jackson@ximian.com>
10638
10639         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
10640
10641 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
10642  
10643         * string-icalls.c: added low overhead function for copying chars
10644         * icall.c: added needed icall for the above function
10645  
10646 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10647
10648         * icall.c: fix return value of get_global_assembly_cache.  Implemented
10649         Environment.GetLogicalDrives.
10650
10651 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
10652
10653         * rand.c: try and talk to egd or prngd
10654         for random bytes if opening devices fail.
10655
10656 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
10657
10658         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
10659         alignment for the type using the native alignment of its members 
10660         instead of using klass->min_align.
10661
10662         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
10663
10664 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10665
10666         * file-io.c:
10667         * socket-io.c: added check for sys/aio.h.
10668
10669 2004-04-28  Dick Porter  <dick@ximian.com>
10670
10671         * threads.c: Don't abort a thread thats already aborting, when
10672         terminating everything.
10673
10674 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10675
10676         * icall.c: added 2 new async calls for Socket.
10677
10678         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
10679         IO on *nix systems.
10680
10681         * threadpool.c: removed unused variable.
10682
10683 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
10684
10685         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
10686
10687 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
10688
10689         * locales.c: put back string_invariant_tolower () and
10690         string_invariant_toupper ().
10691
10692 2004-04-26 David Waite <mass@akuma.org>
10693
10694         * file-io.h:
10695         * socket-io.h:
10696         * threads.h:
10697         * unicode.h: remove comma from end of enumeration declarations
10698
10699 2004-04-26 David Waite <mass@akuma.org>
10700
10701         * debug-mono-symfile.h:
10702         * decimal.c:
10703         * mono_debug.h:
10704         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
10705
10706
10707 2004-04-26  Jackson Harper  <jackson@ximian.com>
10708
10709         * appdomain.c: Increment version number.
10710         
10711 2004-04-26  Jackson Harper  <jackson@ximian.com>
10712
10713         * appdomain.c: Set assembly references public token value when
10714         PublicKeyToken is specified, not the hash_value. Free public token
10715         values when free assembly name data. Previously the public key
10716         token was hex decoded, however we are using hex encoded public key
10717         tokens, so this is not neccasary.
10718         * assembly.c: Lookup assemblies in the gac if their public token
10719         value is set. Add function to allow enabling user gac
10720         lookups. Specify whether or not the assembly was loaded from the
10721         GAC. Compare full assembly names when checking the cache for
10722         assemblies (Temporarily disabled see comment in code). Remove
10723         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
10724         specifies trace-loader they get extra info to stdout on the
10725         loading of assemblies.
10726         * image.h: Add a field for an assembly references public token
10727         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
10728         whether an assembly has been loaded from the GAC.
10729         * image.c: Remove a corlib -> mscorlib name mapping.
10730         * loader.h: Add function to enable/disable the user gac.
10731         * mono-config.c: Check if the usergac is enabled in the config
10732         file.
10733         * icall.c: New icall to determine whether or not an assembly has
10734         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
10735         * tabldefs.h: Add constant for assemblyref flag that specifies a
10736         full public key is used instead of a public token.
10737         * reflection.c: Remove mscorlib -> corlib mappings. Set
10738         PublicTokenValue instead of hash value. This value is a hex
10739         string so it does not need to be expanded.
10740
10741 2004-04-26  Martin Baulig  <martin@ximian.com>
10742
10743         * mono-debug-debugger.c (mono_debugger_initialize): Set
10744         `mono_debugger_initialized' before calling mono_debug_lock().
10745
10746 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
10747
10748         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
10749           InternalToUpper/InternalToLower.
10750         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
10751           removed invariant culture shortcut.  This is now done in managed code.
10752         * locales.c: (string_invariant_toupper/tolower) removed.
10753
10754 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10755
10756         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
10757         Added Poll internal call.
10758
10759         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
10760         call for Poll. Select was too heavy for polling a single socket.
10761
10762         * threadpool.[ch]: added mono_threadpool_cleanup.
10763         * threads.c: use it. Don't use Thread_Abort on windows.
10764
10765 2004-04-23  Martin Baulig  <martin@ximian.com>
10766
10767         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
10768
10769 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
10770
10771         * icall.c: Registred new icalls for key pair protection and added an
10772         icall for Environment.GetFolderPath on Windows.
10773         * security.c|h: Added new icalls for key pair protection.
10774
10775 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10776
10777         * socket-io.c: don't display the non-supported family warning for known
10778         families. Now this is not displayed on windows when checking support
10779         for IPv4/IPv6.
10780
10781 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10782
10783         * class.c: don't display the layout warning for static fields.
10784
10785 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
10786
10787         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
10788         * locales.c, locales.h: Added new icalls for culture-specific
10789         Char.ToLower and Char.ToUpper.
10790
10791 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10792
10793         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
10794         by David Waite.
10795
10796 2004-04-20  Martin Baulig  <martin@ximian.com>
10797
10798         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
10799         of the type name before passing it to mono_reflection_type_from_name().
10800
10801 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
10802
10803         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
10804         encodings here. Fixes #56965.
10805
10806 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
10807
10808         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10809         fix test on strstr result not that I can see anything that
10810         relies on the result.
10811
10812 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
10813
10814         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
10815         Fixes #57081.
10816
10817         * marshal.c (mono_marshal_get_string_encoding): New helper function.
10818
10819         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
10820         function to determine which marshalling to use for strings. Fixes
10821         #56965.
10822
10823         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
10824
10825         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
10826
10827 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
10828
10829         * icall.c: #include mono-config.h
10830
10831 2004-04-15  Jackson Harper  <jackson@ximian.com>
10832
10833         * culture-info-tables.h: Fix date formats for en-US culture.
10834         
10835 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
10836
10837         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
10838         ThreadPool.SetMinThreads.
10839         * threadpool.c: Implemented ThreadPool.GetMinThreads and
10840         ThreadPool.SetMinThreads.
10841
10842 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
10843
10844         * mono-config.c: also load the .config file in the directory
10845         where the assembly was found.
10846
10847 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
10848
10849         * assembly.c: load per-assembly config files.
10850         * icall.c: decrapified code to get the config dir and moved to
10851         mono-config.c.
10852         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
10853         per-assembly config files. When doing a dll map lookup give precedence
10854         to the per-assembly data.
10855
10856 2004-04-14  Martin Baulig  <martin@ximian.com>
10857
10858         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
10859         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
10860         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
10861
10862         * mono-debugger-debugger.c: While the debugger is locked, remember
10863         whether the symbol tables have changes and send one single
10864         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
10865
10866 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
10867
10868         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
10869
10870         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
10871         function.
10872
10873         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
10874         account when marshalling string arrays. Fixes #56965.
10875
10876 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
10877
10878         * icall.c: Add new icalls mapping for security.
10879         * security.c|h: Add internal calls for WindowsIdentity,
10880         WindowsImpersonationContext and WindowsPrincipal.
10881
10882 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
10883
10884         * class.c: Added comment to ensure the System.MonoDummy class
10885         is removed when no longer necessary
10886
10887 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
10888
10889         * appdomain.c: Pass arguments to the bootstraping exceptions to
10890         minimize JITed methods at boot
10891
10892         * metadata.c (mono_exception_from_name_two_strings): Allow for the
10893         second string to be null.
10894
10895         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
10896         Change the protocol to minimize the JIT methods at startup.  Now
10897         it Returns the internal codepage, if the value of "int_code_page"
10898         is 1 at entry, and we can not compute a suitable code page
10899         number, returns the code page as a string.
10900
10901 2004-04-13  Jackson Harper  <jackson@ximian.com>
10902
10903         * culture-info-tables.h: Fix number of decimal digits for all
10904         english locales.
10905
10906 2004-04-13  Jackson Harper  <jackson@ximian.com>
10907
10908         * icall.c: Clairfy out of sync error message. It is not always
10909         your corlib that is out of sync.
10910
10911 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
10912
10913         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
10914         properties when only the set accessor is overriden. Fixes #55874.
10915
10916 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
10917
10918         * assembly.c (mono_assembly_load_references): Make this thread safe.
10919         Fixes #56327.
10920
10921 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
10922
10923         * monosn.c: Add missing initialization calls.
10924
10925 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
10926
10927         * locales.c:
10928         ves_icall_System_Globalization_CultureInfo_construct_number_format
10929         Fix g_assert so it compiles on fussier compilers re int/ptr
10930         mismatch
10931
10932 2004-04-08  Dick Porter  <dick@ximian.com>
10933
10934         * socket-io.h:
10935         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
10936         53992.  Also rearrange the code so that the internal calls return
10937         an error value and exceptions are thrown from managed code.
10938
10939         * icall.c: Add type info to the socket icalls.
10940
10941 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10942
10943         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
10944         owes me a beer.
10945
10946 2004-04-07  Martin Baulig  <martin@ximian.com>
10947
10948         * class.c (mono_class_from_generic_parameter): Don't default
10949         `klass->parent' to `mono_defaults.object_type'.
10950
10951 2004-04-07  Martin Baulig  <martin@ximian.com>
10952
10953         * reflection.c (mono_reflection_initialize_generic_parameter): Set
10954         `param->pklass->reflection_info'.       
10955
10956 2004-04-07  Jackson Harper  <jackson@ximian.com>
10957
10958         * culture-info-tables.h: Fix date separator symbol.
10959         
10960 2004-04-07  Martin Baulig  <martin@ximian.com>
10961
10962         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
10963         from System.Type to System.MonoType.
10964
10965 2004-04-07  Martin Baulig  <martin@ximian.com>
10966
10967         * reflection.h
10968         (MonoReflectionGenericParam): Added `has_reference_type' and
10969         `has_value_type' fields.
10970
10971         * reflection.c (mono_image_get_generic_param_info): Encode the
10972         correct flags if we have the `class' or `struct' constraint.
10973
10974 2004-04-07  Martin Baulig  <martin@ximian.com>
10975
10976         * reflection.h
10977         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
10978
10979 2004-04-07  Jackson Harper  <jackson@ximian.com>
10980
10981         * appdomain.c: Revert extra patches, just wanted to bump the
10982         version number.
10983         
10984 2004-04-07  Jackson Harper  <jackson@ximian.com>
10985
10986         * Makefile.am: Add culture-info private headers.
10987         * icall.c: Add new icalls for contructing locales.
10988         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
10989         * locales.h: Declare new culture info construction methods.
10990         * object.h: Add new fields used to avoid the CultureMap to
10991         MonoCultureInfo.
10992         * culture-info.h: Definition of structs used in the culture info
10993         tables.
10994         * culture-info-tables.h: Autogenerated tables that contain culture
10995         info data. This file was generated with the locale-builder tool.
10996         * appdomain.c: Incement corlib version number.
10997         
10998 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
10999
11000         * appdomain.c: (mono_runtime_init) move mono_thread_init
11001         to before mono_object_new calls so critical sections
11002         are initialized before use.
11003
11004 2004-04-07  Martin Baulig  <martin@ximian.com>
11005
11006         * icall.c
11007         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
11008         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
11009         (ves_icall_MonoGenericParam_initialize): Removed.
11010         (monogenericparam_icalls): Removed.
11011         (generictypeparambuilder_icalls): Added new table for
11012         System.Reflection.Emit.GenericTypeParameterBuilder.
11013
11014         * reflection.c
11015         (mono_reflection_define_generic_parameter): Removed.
11016         (mono_reflection_initialize_generic_parameter): This is now called
11017         from GenericTypeParameterBuilder's .ctor.
11018
11019 2004-04-06  Martin Baulig  <martin@ximian.com>
11020
11021         * class.c (mono_class_init): Don't inflate nested classes in a
11022         generic instance.
11023         (mono_type_get_name_recurse): Include the generic arguments for
11024         generic instances and generic type declarations.
11025         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
11026         (_mono_class_get_instantiation_name): Removed.
11027         (mono_class_create_generic): Always use `gklass->name' as our name.
11028
11029         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
11030
11031         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
11032         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
11033         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
11034         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
11035         closed generic methods here.
11036
11037         * reflection.c
11038         (mono_reflection_generic_inst_get_nested_types): Removed.
11039         (inflate_mono_method): Copy the generic parameters from the
11040         MonoMethodHeader into out MonoGenericMethod.
11041
11042 2004-04-06  Martin Baulig  <martin@ximian.com>
11043
11044         * row-indexes.h
11045         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
11046
11047         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
11048
11049         * reflection.c (build_compressed_metadata): If we have any entries
11050         in the GenericParam, MethodSpec or GenericParamConstraint tables,
11051         set the header version to 1.1.
11052
11053 2004-04-06  Martin Baulig  <martin@ximian.com>
11054
11055         * class.c (mono_class_init): If we're a generic instance,
11056         initialize our nested classes, too.
11057         (_mono_class_get_instantiation_name): Deal with the new `!%d'
11058         suffix. 
11059
11060 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11061
11062         * process.c: quote the argument passed to the shell on windows.
11063
11064 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11065
11066         * threads.c (mono_alloc_special_static_data): Allow this to be
11067         called during startup.
11068
11069 2004-04-02  Martin Baulig  <martin@ximian.com>
11070
11071         * icall.c
11072         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
11073
11074 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
11075
11076         * icall.c: Fix build.
11077
11078 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
11079
11080         * Makefile.am: Added security.c|h.
11081         * icall.c: Added icall for get_UserName;
11082         * security.c: New file for security related icalls. Added function
11083         get_UserName for System.Environment (fix #56144).
11084         * security.h: New. Header file for security.c
11085
11086 2004-04-02  Dick Porter  <dick@ximian.com>
11087
11088         * icall.c: Deleted the icalls that were obsoleted some time ago
11089         by the ICU string code, and which were mixed into the icall
11090         rearranging.  Fixes bug 55969.
11091
11092         * string-icalls.h: 
11093         * string-icalls.c: Deleted the code that those icalls reference.
11094
11095 2004-04-01  Martin Baulig  <martin@ximian.com>
11096
11097         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
11098
11099         * class.c (mono_class_from_generic_parameter): Don't set 
11100         TYPE_ATTRIBUTE_INTERFACE.
11101         (my_mono_class_from_generic_parameter): Likewise.
11102
11103 2004-04-01  Martin Baulig  <martin@ximian.com>
11104
11105         * loader.c (find_method): Added an optional `MonoClass *ic'
11106         argument to search in a specific interface.
11107         (mono_get_method_constrained): New public function.
11108
11109 2004-04-01  Martin Baulig  <martin@ximian.com>
11110
11111         * reflection.c (mono_image_get_generic_field_token): Use the
11112         `handleref' cache here.
11113
11114 2004-04-01  Martin Baulig  <martin@ximian.com>
11115
11116         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
11117
11118         * reflection.c (create_generic_typespec): Use the `typespec' hash
11119         here, not the `typeref' one.    
11120
11121 2004-04-01  Martin Baulig  <martin@ximian.com>
11122
11123         * class.c (mono_class_inflate_generic_type): Moved the
11124         functionality into a new static inflate_generic_type() which
11125         returns NULL if it didn't do anything.  Only increment the
11126         `mono_stats.inflated_type_count' if we actually inflated
11127         something.
11128         (mono_class_get_full): Check the classes type to see whether we
11129         need to inflate it; also inflate MONO_TYPE_(M)VAR.
11130
11131 2004-04-01  Jackson Harper  <jackson@ximian.com>
11132
11133         * reflection.c: Set culture for assembly references.
11134         
11135 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
11136
11137         * reflection.[ch], icall.[ch], Fix support for pinning variables.
11138
11139 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11140
11141         * assembly.c:
11142         (do_mono_assembly_open): the critical section also covers
11143         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
11144
11145 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11146
11147         * threads.c:
11148         (mono_manage_threads): abort the background threads when finishing.
11149         Fixes bug #47232.
11150
11151 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11152
11153         * gc.c: only close the done_event handle if there was no timeout.
11154         C-ified comments.
11155
11156 2004-03-30  Martin Baulig  <martin@ximian.com>
11157
11158         * icall.c (icall_entries): It's called "System.Activator", not
11159         "System.Activation".    
11160
11161 2004-03-30  Martin Baulig  <martin@ximian.com>
11162
11163         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
11164         (mono_class_create_from_typespec): Likewise.
11165
11166 2004-03-30  Martin Baulig  <martin@ximian.com>
11167
11168         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
11169         `has_ctor_constraint' and `initialized'.
11170
11171 2004-03-30  Martin Baulig  <martin@ximian.com>
11172
11173         * reflection.c (encode_new_constraint): New static function to add
11174         the constructor constraint attribute to a type parameter.
11175         (encode_constraints): Call encode_new_constraint() if necessary.
11176
11177         * reflection.h
11178         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
11179
11180         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
11181         
11182 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
11183
11184         * reflection.c, icall.c: add support for pinning variables. 
11185
11186 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
11187
11188         * marshal.c (mono_marshal_get_managed_wrapper):
11189         init bool local with zero rather than null.
11190
11191 2004-03-29  Martin Baulig  <martin@ximian.com>
11192
11193         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
11194         the "official" behavior here.
11195         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
11196
11197 2004-03-29  Martin Baulig  <martin@ximian.com>
11198
11199         * icall.c: Reflect latest API changes.
11200
11201 2004-03-29  Martin Baulig  <martin@ximian.com>
11202
11203         * loader.c (mono_get_method_from_token): Also call
11204         mono_metadata_load_generic_params () for abstract and interface
11205         methods; replace the type arguments in the method signature with
11206         the ones which are loaded from the metadata.
11207
11208 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
11209
11210         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
11211         of the lock is not the current thread. MS.NET don't do it, in spite of
11212         what the documentation says. See bug #56157.
11213
11214 2004-03-28  Martin Baulig  <martin@ximian.com>
11215
11216         * class.c (mono_class_init): Don't call init_properties() and
11217         init_events() for generic instances; set `prop->parent' when
11218         inflating properties.
11219
11220         * reflection.c (mono_generic_inst_get_object): Call
11221         `mono_class_init (ginst->klass)'.
11222         (mono_type_get_object): Only create a MonoGenericInst if your
11223         generic type is a TypeBuilder.
11224         (do_mono_reflection_bind_generic_parameters): Only set
11225         `ginst->is_dynamic' if our generic type is a TypeBuilder.
11226
11227 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
11228
11229         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
11230         Fixes #56091.
11231
11232 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11233
11234         * icall.c: added Kill_internal icall.
11235         * process.[ch]: added Kill_internal icall.
11236
11237 2004-03-25  Martin Baulig  <martin@ximian.com>
11238
11239         * class.h (MonoStats): Added `generic_instance_count',
11240         `inflated_method_count', `inflated_type_count' and
11241         `generics_metadata_size'.       
11242
11243 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11244
11245         * reflection.c: no warnings now.
11246
11247 2004-03-25  Martin Baulig  <martin@ximian.com>
11248
11249         * class.c (mono_class_get_full): New public function; does a
11250         mono_class_get(), but also takes a `MonoGenericContext *'.
11251
11252         * loader.c (mono_field_from_memberref): Renamed to
11253         `field_from_memberref', made static and added `MonoGenericContext *'
11254         argument.
11255         (mono_field_from_token): Added `MonoGenericInst *' argument.
11256         (method_from_memberef): Likewise.
11257         (mono_get_method_from_token): Likewise.
11258         (mono_get_method_full): New public function; does a
11259         mono_get_method(), but also takes a `MonoGenericContext *'.
11260
11261         * verify.c (mono_method_verify): Get the method's generic context
11262         and pass it to mono_field_from_token(), mono_get_method_full() and
11263         mono_class_get_full().
11264
11265 2004-03-25  Martin Baulig  <martin@ximian.com>
11266
11267         * class.c (mono_class_inflate_generic_type): Take a
11268         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
11269         `MonoGenericMethod *'.
11270
11271 2004-03-25  Martin Baulig  <martin@ximian.com>
11272
11273         * loader.h (MonoMethodInflated): Store the MonoGenericContext
11274         instead of the MonoGenericMethod here.
11275
11276 2004-03-25  Martin Baulig  <martin@ximian.com>
11277
11278         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
11279         each time we create a new MonoGenericInst, we also create a new
11280         context which points back to us.
11281
11282         * class.c (inflate_method): Use `ginst->context' instead of
11283         creating a new context.
11284
11285         * loader.c (method_from_memberref): Use
11286         `klass->generic_inst->context' instead of creating a new context.
11287
11288 2004-03-25  Martin Baulig  <martin@ximian.com>
11289
11290         * class.h (MonoGenericContext): New struct.
11291         (MonoGenericMethod): Removed `generic_inst'.
11292
11293         * class.c (mono_class_inflate_generic_method): Take a
11294         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
11295
11296 2004-03-25  Martin Baulig  <martin@ximian.com>
11297
11298         * loader.h (MonoMethodInflated): New typedef.
11299
11300         * metadata.h (MonoMethodSignature): Removed `gen_method', make
11301         `generic_param_count' consume just 30 bits, added `is_inflated'
11302         and `has_type_parameters' flags (one bit each).
11303
11304         * class.c (mono_class_inflate_generic_method): Create a
11305         MonoMethodInflated instead of a MonoMethodNormal and set
11306         `is_inflated' in the method signature.
11307
11308         * class.h (MonoGenericMethod): Removed `generic_method'.
11309
11310 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
11311
11312         * image.c: Make sure the name of a MonoImage is always an absolute path.
11313           This fixes bug #54415.
11314
11315 2004-03-24  Martin Baulig  <martin@ximian.com>
11316
11317         * class.c (mono_class_setup_vtable): If we're a generic instance,
11318         use our generic type's vtable size.
11319
11320 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
11321
11322         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
11323         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
11324         problems.
11325
11326 2004-03-23  Martin Baulig  <martin@ximian.com>
11327
11328         * class.h (MonoDynamicGenericInst): Added `int count_events' and
11329         `MonoEvent *events'.
11330
11331         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
11332         (typebuilder_icalls): Added "get_event_info"; calls
11333         mono_reflection_event_builder_get_event_info(). 
11334
11335         * reflection.c (mono_reflection_generic_inst_initialize): Added
11336         `MonoArray *events'.
11337         (mono_reflection_event_builder_get_event_info): New function.
11338
11339 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
11340
11341         * object.h: add mono_type_initialization_init
11342
11343         * object.c (mono_runtime_class_init): 
11344         implement class constructor synchronization rules
11345         to cope with threading issues.  
11346         add mono_type_initialization_init
11347
11348         * appdomain.c (mono_runtime_init): call 
11349         mono_type_initialization_init
11350
11351         * class.h: removing initializing field from MonoVTable
11352
11353 2004-03-23  Martin Baulig  <martin@ximian.com>
11354
11355         * class.c (my_mono_class_from_generic_parameter): Use
11356         `param->name' if it's not NULL. 
11357
11358 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
11359
11360         * class.c: do not insert non-virtual methods in the vtable.
11361         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
11362         that means the method is non-virtual. This never would have
11363         happened before.
11364
11365 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
11366
11367         * profiler.c: Added lock for accessing coverage_hash.
11368
11369 2004-03-22  Martin Baulig  <martin@ximian.com>
11370
11371         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
11372         `method->method->signature->generic_param_count != 0' to make it
11373         work for interface methods.
11374
11375 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11376
11377         * process.c: quote the string passed to the shell using g_shell_quote.
11378
11379 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11380
11381         * threads.c:
11382         (mono_threads_manage): don't remove the finalizer thread and self
11383         from the threads hash table so that mono_thread_manage can be called
11384         more than once.
11385
11386 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11387
11388         * process.c: quote the arguments when UseShellExecute is true. Fixes
11389         bug #55790.
11390
11391 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11392
11393         * threads.c: set mono_thread_detach as a cleanup routine for every
11394         thread. This way it's always executed upon thread termination, either
11395         aborted or finished normally. No more xsp hangs!
11396
11397 2004-03-17  Martin Baulig  <martin@ximian.com>
11398
11399         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
11400         `int count_nested' and a `MonoType **nested'.
11401
11402         * reflection.c (mono_reflection_bind_generic_parameters): Moved
11403         most of the functionality into a new static
11404         do_mono_reflection_bind_generic_parameters() and don't take a
11405         `MonoType *nested_in' argument any more.  Don't compute nested
11406         types here.
11407         (mono_reflection_generic_inst_get_nested_types): New public method
11408         to get nested types.
11409
11410         * class.c (mono_class_create_generic): Set `klass->nested_in' if
11411         we're a nested class.
11412
11413         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
11414         mono_reflection_generic_inst_get_nested_types() to compute the
11415         nested types.
11416
11417 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11418
11419         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
11420         descriptive error message under windows.
11421         
11422 2004-03-17  Martin Baulig  <martin@ximian.com>
11423
11424         * class.c (dup_type): Added `const MonoType *original' argument;
11425         copy the attrs from the original type.
11426
11427 2004-03-17  Martin Baulig  <martin@ximian.com>
11428
11429         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
11430         `m->generic_inst_cache' here.
11431
11432 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
11433
11434         * exception.h exception.c: Add stack_overflow_exception.
11435
11436 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11437
11438         * threadpool.c:
11439         (overlapped_callback): call SetEvent *after* invoking the callback.
11440         No need to call CloseHandle.
11441
11442 2004-03-16  Martin Baulig  <martin@ximian.com>
11443
11444         * reflection.c (mono_image_get_fieldref_token): Take a
11445         `MonoReflectionField *' instead of a `MonoClassField *' and a
11446         `MonoClass *'; store the `MonoReflectionField *' in the hash.
11447
11448 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11449
11450         * appdomain.c: don't add the culture to the filename we're looking for
11451         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
11452
11453 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11454
11455         * locales.c: don't ignore symbols when doing case insensitive compares.
11456         Thanks Dick! Fixes bug #54046.
11457
11458         * threads.c: surround 'threads' usage with enter/leave in
11459         mono_thread_manage.
11460
11461 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
11462
11463         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
11464         implicitly marshalled as [Out]. Fixes #55450.
11465
11466         (mono_marshal_get_runtime_invoke): Zero out the result if there is
11467         an exception.
11468
11469 2004-03-16  Martin Baulig  <martin@ximian.com>
11470
11471         * class.c (mono_class_from_generic_parameter): Use the actual
11472         parameter name. 
11473
11474 2004-03-16  Martin Baulig  <martin@ximian.com>
11475
11476         * reflection.c (type_get_signature_size): New static function.
11477         Compues the size of the type in a method signature.
11478         (method_get_signature_size): New static function; calls
11479         type_get_signature_size() to compute the actual size of the
11480         method's signature.
11481         (method_encode_signature): Use method_get_signature_size() to get
11482         the signature's size rather than using `nparams * 10'.
11483
11484 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11485
11486         * file-io.h: define here WapiOverlapped on windows. I don't want the
11487         regular OVERLAPPED one.
11488
11489         * file-io.c:
11490         * threadpool.c: somehow, BindIoCompletionCallback is not found.
11491         Disabling AIO on windows.
11492
11493 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11494
11495         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
11496         bug #55385.
11497
11498 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11499
11500         * appdomain.c: upgraded corlib version.
11501
11502         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
11503         and BeginWrite. Allow opening files for asynchrnous operations.
11504
11505         * file-io.h: new struct that maps FileStreamAsyncResult.
11506         * icall.c: added new icalls.
11507         * process.[ch]: support setting child process environment variables
11508         and use the SHELL or COMSPEC when UseShellExecute is true.
11509
11510         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
11511         callback for async. IO is here and also BindHandle.
11512
11513         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
11514         from here.
11515
11516 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
11517
11518         * reflection.c (create_custom_attr): Allow len == 0.
11519
11520         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
11521         computation on big-endian machines.
11522
11523 2004-03-13  Martin Baulig  <martin@ximian.com>
11524
11525         * class.h (MonoGenericInst): Added `int count_ifaces'.
11526
11527         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
11528         `ginst->count_ifaces' instead `klass->interface_count' since we
11529         may get called before the vtable is created.
11530
11531         * loader.c (mono_method_get_param_names): If we're a generic
11532         instance, return and don't initialize the class.
11533
11534         * reflection.c (mono_reflection_setup_generic_class): Don't call
11535         ensure_runtime_vtable().
11536         (mono_reflection_bind_generic_parameters): Set
11537         `ginst->count_ifaces'.
11538
11539 2004-03-11  Jackson Harper <jackson@ximian.com>
11540
11541         * icall.c:
11542         * unicode.c:
11543         * unicode.h: Remove unused System.Char icalls.
11544         
11545 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
11546
11547         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
11548         code when we P/Invoke the first library in Windows.Forms, instead
11549         of when we first open the assembly.
11550
11551         * assembly.c: Drop the lookup from here.
11552
11553 2004-03-10  Martin Baulig  <martin@ximian.com>
11554
11555         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
11556         class for properties, fields and events.  Finally fixes #54945.
11557
11558 2004-03-10  Martin Baulig  <martin@ximian.com>
11559
11560         * metadata.c (mono_metadata_class_equal): New static function;
11561         checks whether two generic instances or two generic parameters are
11562         equal.
11563         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
11564         compare classes.        
11565
11566 2004-03-10  Martin Baulig  <martin@ximian.com>
11567
11568         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
11569
11570         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
11571         argument and write it into the `reflection_info' field.
11572
11573         * icall.c
11574         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
11575         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
11576
11577 2004-03-09  Jackson Harper  <jackson@ximian.com>
11578
11579         * char-conversions.h: use 8 bits for numeric data its all we need
11580         * icall.c: numeric data is only 8 bits now.
11581
11582 2004-03-09  Martin Baulig  <martin@ximian.com>
11583
11584         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
11585
11586         * class.c (init_properties, init_events): Initialize the new
11587         `parent' field.
11588
11589         * reflection.c (typebuilder_setup_properties): Likewise.
11590         (typebuilder_setup_events): Likewise.
11591
11592         * reflection.h (MonoEventInfo): Replaced `parent with
11593         `declaring_type' and `reflected_type'.
11594
11595         * icall.c (ves_icall_get_property_info): Distinguish between
11596         declaring and reflected type.
11597         (ves_icall_get_event_info): Likewise.
11598
11599 2004-03-09  Martin Baulig  <martin@ximian.com>
11600
11601         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
11602         (ves_icall_Type_GetField): Correctly set field->klass.
11603
11604 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
11605
11606         * loader.h: Fix warning.
11607
11608 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
11609
11610         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
11611         library routine if present.  Notice that it will still continue
11612         executing even if its missing, for those working on the Gtk#
11613         edition of Windows.Forms.
11614
11615         * assembly.c (do_mono_assembly_open): If loading the
11616         System.Windows.Forms call mono_loader_wini_init.
11617
11618 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
11619
11620         * class.h: Added MonoRemoteClass struct.
11621         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
11622         function for MonoStrings.
11623         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
11624         Added internal call for getting the proxy type.
11625         * marshal.c: Get the type of transparent proxies from its remote_class.
11626         Added methods that generate the IL for type checks and casts:
11627         mono_marshal_get_isinst, mono_marshal_get_castclass, 
11628         mono_marshal_get_proxy_cancast.
11629         * marshal.h: Declaration of the previous new methods.
11630         * object.c: Added new moethods for creating and updating MonoRemoteClass
11631         instances: mono_remote_class, mono_upgrade_remote_class, 
11632         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
11633         * verify.c: FIx transparent_proxy_fields layout.
11634         * appdomain.c: Bump corlib version.
11635
11636 2004-03-04  Jackson Harper  <jackson@ximian.com>
11637
11638         * icall.c: Add icall to access char conversion tables.
11639         * char-conversions.h: Character conversion tables.
11640         * Makefile.am: Add char-conversions.h private header file.
11641         
11642 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
11643
11644         * appdomain.c (unload_thread_main): Increase unloading timeout to
11645         10 sec as a temporary workaround for Nant problems.
11646
11647 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
11648
11649         * gc.c: Add checks for GC_enable and GC_disable.
11650
11651         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
11652         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
11653         (bug #54988).
11654         
11655 2004-02-27  Martin Baulig  <martin@ximian.com>
11656
11657         * reflection.c (mono_reflection_bind_generic_parameters): Take a
11658         `MonoReflectionType *' instead of a `MonoType *'.
11659
11660 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
11661
11662         * gc.c (run_finalize): Avoid finalizing the object representing the
11663         finalizer thread.
11664         (finalizer_thread): Fix warning.
11665
11666 2004-02-25  Martin Baulig  <martin@ximian.com>
11667
11668         * class.c (_mono_class_get_instantiation_name): Added `int offset'
11669         argument for nested types.
11670         (mono_class_create_generic): Added support for nested generictypes.
11671
11672         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
11673         `GList *nested'.
11674
11675         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
11676
11677         * reflection.c (method_encode_signature): Increase the minimum
11678         value of `size' from 10 to 11.
11679         (mono_reflection_bind_generic_parameters): Take `int type_argc'
11680         and `MonoType **types' arguments instead of the `MonoArray
11681         *types'; added `MonoType *nested_in'.  Recursively instantiate
11682         nested classes. 
11683
11684 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
11685
11686         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
11687         stack_overflow_ex members which are used by exception handling.
11688
11689         * appdomain.c (mono_runtime_init): Initialize the new members.
11690
11691         * gc.c (mono_gc_enable): New helper function.
11692         * gc.c (mono_gc_disable): New helper function.
11693
11694 2004-02-23  Martin Baulig  <martin@ximian.com>
11695
11696         * icall.c: I must have been really stupid - make it actually work
11697         this time ;-)
11698
11699 2004-02-23  Martin Baulig  <martin@ximian.com>
11700
11701         * loader.c (method_from_memberref): Only inflate the method if
11702         it's in another klass.
11703
11704 2004-02-23  Martin Baulig  <martin@ximian.com>
11705
11706         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
11707         (mono_class_init): If we're a generic instance and an interface,
11708         compute `class->interface_id'; also create `class->interfaces'
11709         here and inflate them.
11710
11711         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
11712         `ginst->is_open'.
11713         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
11714
11715         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
11716
11717 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
11718
11719         * reflection.c (method_encode_code): Improved the error message
11720         generated by the exception.
11721
11722 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11723
11724         * icall.c: Martin did not do what he said in the ChangeLog for
11725         2004-02-18, but put back the changes for properties and events.
11726         Commenting those changes out again and adding comment to bug #54518.
11727         
11728         * process.c: removed warning.
11729
11730 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
11731
11732         * marshal.c (emit_struct_conv): Print an error message instead of
11733         asserting when a type does not have the StructLayout attribute.
11734
11735 2004-02-20  Martin Baulig  <martin@ximian.com>
11736
11737         * reflection.c (mono_type_get_object): Also use the cache for
11738         generic instances.
11739         (mono_reflection_bind_generic_parameters): Always compute
11740         `ginst->ifaces'.        
11741
11742 2004-02-20  Martin Baulig  <martin@ximian.com>
11743
11744         * class.h (MonoGenericMethod): Removed `klass'.
11745
11746         * class.c (mono_class_inflate_generic_method): Added `MonoClass
11747         *klass' argument.
11748
11749 2004-02-20  Martin Baulig  <martin@ximian.com>
11750
11751         * reflection.c (method_encode_methodspec): Actually use the
11752         uninflated signature for the memberref.
11753
11754 2004-02-20  Martin Baulig  <martin@ximian.com>
11755
11756         * class.h (MonoGenericMethod): Removed `declaring'.
11757
11758         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
11759         is NULL, compute it here.
11760
11761 2004-02-20  Martin Baulig  <martin@ximian.com>
11762
11763         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
11764
11765         * metadata.c (mono_metadata_generic_inst_hash): New method.
11766         (mono_metadata_generic_inst_equal): New method.
11767
11768         * reflection.c (mono_reflection_bind_generic_parameters): Use the
11769         `klass->image->generic_inst_cache' cache to avoid creating
11770         duplicate MonoGenericInst's.
11771
11772         * class.c (mono_class_inflate_generic_type): Use the cache.
11773
11774 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
11775
11776         * object.c: fixed gc descriptor calculation for embedded valuetypes.
11777
11778 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11779
11780         * icall.c: added Socket.WSAIoctl icall.
11781
11782         * socket-io.[ch]: implemented
11783         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
11784
11785 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
11786
11787         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
11788
11789 2004-02-18  Urs C Muff  <umuff@quark.com>
11790
11791         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
11792         this work on PPC and other big-endian architectures.
11793
11794         * debug-mono-symfile.h: Prepended the names of all the `guint32'
11795         fields with an underscore to make sure they're only accessed by
11796         the read32() macro.
11797
11798 2004-02-18  Martin Baulig  <martin@ximian.com>
11799
11800         * icall.c: Put the klass->refclass changes back for methods and
11801         fields, but not for properties and events.  We're currently not
11802         distinguishing between DeclaringType and ReflectedType for
11803         properties and events, that's what caused the regressions.
11804
11805 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11806
11807         * object.c:
11808         (mono_async_result_new): the handle can be NULL.
11809
11810         * threadpool.c: Use an event instead of a semaphore, don't initialize
11811         it until needed. This saves quite a few semaphores from being created
11812         when using the threadpool.
11813
11814 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
11815
11816         * object.c (mono_string_is_interned_lookup): Fix interning of long
11817         strings. Fixes #54473.
11818
11819         * domain.c (ldstr_equal): Optimize if the two strings are equal.
11820
11821         * icall.c: Revert the klass->refclass changes since they introduce
11822         regressions (bug #54518).
11823
11824 2004-02-18  Martin Baulig  <martin@ximian.com>
11825
11826         * class.c (mono_class_init): If we're a generic instance and don't
11827         come from a TypeBuilder, inflate our members here.
11828         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
11829         (mono_class_create_generic): New public method.
11830         (mono_class_initialize_generic): Removed.
11831         (get_instantiation_name): Renamed to
11832         _mono_class_get_instantiation_name() and made it public.
11833
11834 2004-02-18  Martin Baulig  <martin@ximian.com>
11835
11836         * class.c (mono_class_inflate_generic_type): Clear the new
11837         instance's `nginst->klass' when inflating a generic instance.
11838         (mono_class_is_subclass_of): Added (basic) support for generic
11839         instances.
11840
11841 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
11842
11843         * appdomain.h, domain.c: use a MonoCodeManager instead of a
11844         MonoMempool to hold compiled native code.
11845
11846 2004-02-17  Martin Baulig  <martin@ximian.com>
11847
11848         * class.h (MonoDynamicGenericInst): Added `count_properties' and
11849         `properties'.
11850
11851         * reflection.c (mono_reflection_generic_inst_initialize): Added
11852         `MonoArray *properties' argument.
11853
11854         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
11855
11856 2004-02-17  Martin Baulig  <martin@ximian.com>
11857
11858         * icall.c (ves_icall_Type_GetFields): Renamed to
11859         ves_icall_Type_GetFields_internal() and added a
11860         `MonoReflectionType *rtype' argument; pass it to
11861         mono_field_get_object() to set the field's "reflected" type.
11862         (ves_icall_Type_GetConstructors): Likewise.
11863         (ves_icall_Type_GetEvents): Likewise.
11864         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
11865         argument; pass it to mono_method_get_object() to set the method's
11866         "reflected" type.       
11867
11868 2004-02-17  Martin Baulig  <martin@ximian.com>
11869
11870         * class.h (MonoDynamicGenericInst): New type.
11871         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
11872
11873         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
11874         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
11875         (ves_icall_MonoGenericInst_GetFields): New interncall.
11876
11877         * class.c (mono_class_from_generic): Don't call
11878         mono_class_initialize_generic() if this is a dynamic instance;
11879         ie. it's being created from a TypeBuilder.
11880         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
11881         `class->byval_arg.type'.
11882
11883         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
11884         to `inflate_method' and made static.
11885         (mono_reflection_inflate_field): Removed.
11886         (mono_reflection_generic_inst_initialize): New public method.
11887
11888         * reflection.h (MonoReflectionGenericInst): Removed `methods',
11889         `ctors' and `fields'; added `initialized'.
11890
11891 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
11892
11893         * debug-helpers.c (mono_method_full_name): Fix output for empty
11894         namespaces.
11895
11896 2004-02-12  Martin Baulig  <martin@ximian.com>
11897
11898         * class.h (MonoClassField): Added `MonoType *generic_type'.
11899
11900         * reflection.c (mono_image_get_fieldref_token): Added support for
11901         instantiated generic types.
11902         (field_encode_inflated_field): Removed.
11903         (mono_image_get_inflated_field_token): Removed.
11904         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
11905
11906         * reflection.h (MonoReflectionInflatedField): Removed.
11907
11908 2004-02-12  Martin Baulig  <martin@ximian.com>
11909
11910         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
11911         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
11912
11913         * reflection.c (mono_image_get_methodspec_token): Take a
11914         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
11915         (mono_image_create_token): Check whether we have a
11916         `method->signature->gen_method' and call
11917         mono_image_get_methodspec_token() if appropriate.
11918         (inflated_method_get_object): Removed.
11919         (mono_reflection_bind_generic_method_parameters): Return a
11920         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
11921         (mono_reflection_inflate_method_or_ctor): Likewise.
11922
11923         * reflection.h (MonoReflectionInflatedMethod): Removed.
11924
11925 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
11926
11927         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
11928         for custom valuetype marshalling.
11929
11930         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
11931
11932 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11933
11934         * icall.c: fixed WSAGetLastError_internal name.
11935
11936 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
11937
11938         * threads.c (mono_thread_attach): Allow this to be called multiple
11939         times for a thread.
11940         
11941         * threads.c (build_wait_tids): Do not wait for ourselves.
11942
11943         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
11944         appdomain list is empty.
11945
11946         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
11947         memory returned by mono_string_builder_to_utf16, since it points into
11948         managed memory. Thanks to Bernie Solomon for noticing this.
11949
11950         * icall.c: Add AppDomainSetup icalls.
11951
11952         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
11953
11954         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
11955         types.
11956
11957         * reflection.c (reflection_methodbuilder_to_mono_method): Save
11958         custom attributes to the method_aux struct. Also fix array indexes etc.
11959
11960         * loader.c (mono_method_get_param_names): Make dynamic case work again.
11961         
11962 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
11963
11964         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
11965         (both static and runtime) and reduce startup time.
11966
11967 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
11968
11969         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
11970         AsAny marshalling conversion instead of crashing.
11971
11972         * marshal.c: Fix warnings.
11973
11974 2004-02-09  Martin Baulig  <martin@ximian.com>
11975
11976         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
11977
11978         * reflection.h (MonoReflectionInflatedMethod): Removed the
11979         `declaring' field, it's now in the unmanaged MonoGenericMethod.
11980
11981         * reflection.c (method_encode_methodspec): Removed the `method'
11982         argument; we get it from `gmethod->declaring'.
11983         (inflated_method_get_object): Removed the `declaring' argument.
11984
11985 2004-02-09  Martin Baulig  <martin@ximian.com>
11986
11987         * class.h (MonoGenericMethod): New type.
11988         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
11989         `generic_method'.
11990
11991         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
11992         a `MonoGenericMethod *gen_method' one.
11993
11994         * class.c (mono_class_inflate_generic_type): Take an additional
11995         `MonoGenericMethod * argument.  This is only non-NULL if we're
11996         inflating types for a generic method.   
11997         (mono_class_inflate_generic_signature): Renamed to
11998         inflate_generic_signature() and made static; take a
11999         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12000         (inflate_generic_header): Take a `MonoGenericMethod *' argument
12001         instead of a `MonoGenericInst *' one.
12002         (mono_class_inflate_generic_method): Likewise.
12003
12004         * reflection.c (encode_generic_method_sig): Take a
12005         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
12006         (method_encode_methodspec): Likewise.
12007         (inflated_method_get_object): Likewise. 
12008
12009         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
12010         field with a `MonoGenericMethod *gmethod' one.  
12011
12012 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
12013
12014         * class.h (mono_class_has_parent): add parens to expansion
12015         so you can ! this.
12016
12017 2004-02-08  Martin Baulig  <martin@ximian.com>
12018
12019         * image.h (MonoImage): Removed `generics_cache'.
12020
12021         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
12022         instead of a `MonoType *' argument; removed the `inflate_methods'
12023         argument.  Don't inflate methods here.
12024
12025         * loader.c (find_method): If it's a generic instance, call
12026         mono_class_init() on the `sclass->generic_inst->generic_type'.
12027
12028         * metadata.c (mono_type_size): Make this work on uninitialized
12029         generic instances; call it on the `ginst->generic_type's class.
12030
12031         * reflection.c (mono_reflection_bind_generic_parameters): Call
12032         mono_class_from_generic() to create the `ginst->klass'.
12033
12034 2004-02-08  Martin Baulig  <martin@ximian.com>
12035
12036         * class.h (MonoClass): Changed type of `generic_inst' from
12037         `MonoType *' to `MonoGenericInst *'.
12038
12039 2004-02-08  Martin Baulig  <martin@ximian.com>
12040
12041         * icall.c (ves_icall_Type_BindGenericParameters): Just call
12042         mono_type_get_object(), this is now creating a `MonoGenericInst'
12043         for MONO_TYPE_GENERICINST.
12044         (ves_icall_MonoGenericInst_GetParentType): Likewise.
12045         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
12046
12047         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
12048         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
12049         (inflated_method_get_object): Added `MonoClass *refclass' argument.
12050         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
12051         and reflected type.
12052
12053         * reflection.h (MonoReflectionInflatedMethod): Removed
12054         `declaring_type' and `reflected_type'.
12055
12056 2004-02-08  Martin Baulig  <martin@ximian.com>
12057
12058         * class.h (MonoGenericInst): Added `MonoType *parent' and
12059         `MonoType **ifaces'.
12060
12061         * reflection.h (MonoReflectionGenericInst): Removed `klass',
12062         `parent' and `interfaces'.
12063
12064         * reflection.c (mono_reflection_bind_generic_parameters): Take a
12065         `MonoType *' argument and return a `MonoType *'.
12066
12067         * icall.c
12068         (ves_icall_MonoGenericInst_GetParentType): New interncall.
12069         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
12070
12071 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
12072
12073         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
12074         valuetype marshalling.
12075
12076 2004-02-06  Martin Baulig  <martin@ximian.com>
12077
12078         * class.c
12079         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
12080         (my_mono_class_from_generic_parameter): Likewise.
12081
12082 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
12083
12084         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
12085         contents of the symbol files lazily.
12086
12087         * object.h (MonoThread): Add 'name' and 'name_len' fields.
12088
12089         * threads.h threads.c icall.c: New icalls for getting and setting the
12090         threads name.
12091
12092 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
12093
12094         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
12095         Raise an exception when the domain is not found.
12096
12097 2004-02-03  Martin Baulig  <martin@ximian.com>
12098
12099         * reflection.c (mono_image_get_methodspec_token): Use the
12100         uninflated signature; fixes gen-33.
12101
12102 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
12103
12104         * gc.c threads.c: Make the finalizer thread a normal managed thread so
12105         the finalizer code can use thread functionality.
12106
12107         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
12108         the finalizer thread.
12109
12110         * threads.c: Make some functions more robust.
12111
12112         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
12113
12114         * metadata.h: Add new marshalling conventions.
12115
12116         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
12117         stringbuilder marshalling. Fixes #53700.
12118
12119         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
12120
12121         * reflection.c (mono_image_get_type_info): Save declarative security
12122         info.
12123
12124         * reflection.c (mono_image_get_field_info): Handle uninitialized 
12125         unmanaged fields as well.
12126
12127         * appdomain.c: Bump corlib version.
12128
12129 2004-02-01  Martin Baulig  <martin@ximian.com>
12130
12131         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
12132         method type arguments.  
12133
12134 2004-01-30  Duncan Mak  <duncan@ximian.com>
12135
12136         * marshal.h: Add prototype for
12137         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
12138         and
12139         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
12140         fix the build.
12141
12142 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
12143
12144         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
12145         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
12146
12147 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
12148
12149         * marshal.c (mono_marshal_get_native_wrapper): Add support for
12150         custom marshalling of valuetypes.
12151
12152         * marshal.c: Fix some warnings.
12153
12154 2004-01-29  Martin Baulig  <martin@ximian.com>
12155
12156         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
12157         for generic method parameters.
12158
12159         * reflection.c (method_encode_methodspec): Write the uninflated
12160         signature into the methodspec table.
12161         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
12162         is always the uninflated method.
12163         (reflection_methodbuilder_to_mono_method): Copy the generic
12164         parameters from the MethodBuilder into `header->gen_params'.
12165
12166 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
12167
12168         * class.c (mono_class_from_generic_parameter): Fix warning.
12169
12170 2004-01-27  Martin Baulig  <martin@ximian.com>
12171
12172         * class.c (mono_class_from_generic_parameter): Don't create
12173         `klass->methods' here.  
12174
12175 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
12176
12177         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
12178         extension since it does not work with libraries named lib<FOO>.dll.so.
12179
12180 2004-01-25  Martin Baulig  <martin@ximian.com>
12181
12182         * class.c (mono_class_inflate_generic_type): Added support for
12183         MONO_TYPE_GENERICINST.
12184
12185         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
12186         inflate methods on open constructed types.      
12187
12188 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12189
12190         * object.c: fire ProcessExit event in the root AppDomain after running
12191         Main. Fixes bug #53299.
12192
12193 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
12194
12195         * socket-io.c: include the new socket-wrappers.h header.
12196         Use the wrappers instead of the unix socket functions to make the code
12197         more clear.
12198
12199 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
12200
12201         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
12202
12203         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
12204         Fixes #22532.
12205
12206 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
12207
12208         * reflection.c (mono_image_create_pefile): Handle the case when the
12209         entry point is not a MethodBuilder.
12210
12211         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
12212         field to ReflectionMethod since it is not allways a builder.
12213
12214         * reflection.c (type_get_fully_qualified_name): New helper function to
12215         return the fully qualified name of a type.
12216
12217         * reflection.c (encode_marshal_blob): Always emit the fully qualified
12218         type name for custom marshallers.
12219
12220         * reflection.c (mono_marshal_spec_from_builder): Ditto.
12221
12222         * class.c (mono_class_setup_vtable): If a parent class already 
12223         implements an interface, use the implementing methods from that class.
12224         Fixes #53148.
12225
12226 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12227
12228         * threadpool.c: just return instead of ExitThread to allow for thread
12229         clean up earlier.
12230
12231 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
12234         when closing resource modules.
12235
12236         * reflection.c (mono_image_create_pefile): Handle the case when the
12237         entry point is not a MethodBuilder.
12238
12239         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
12240         field to ReflectionMethod since it is not allways a builder.
12241
12242 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
12243
12244         * marshal.c (mono_marshal_get_managed_wrapper): 
12245         mono_marshal_alloc takes native int so CONV_I
12246         the arg for 64bits.
12247
12248 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
12249
12250         * reflection.c (fixup_cattrs): New function to fixup the methoddef
12251         tokens in the cattr table. Fixes #53108.
12252
12253 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12254
12255         * loader.c: don't trim ".dll" before looking up in the config file.
12256         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
12257
12258 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
12259
12260         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
12261         Return the module which contains the resource as well.
12262         (ves_icall_System_Reflection_Module_Close): New icall.
12263
12264         * appdomain.c: Bump corlib version number.
12265
12266         * image.c (mono_image_addref): New public function.
12267
12268         * assembly.c: Call mono_image_addref.
12269
12270         * reflection.c (mono_module_get_object): Increase reference count of 
12271         the image.
12272
12273         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
12274         Fixes #22532.
12275
12276         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
12277         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
12278         proper exceptions on DllImport problems.
12279
12280 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
12281
12282         * class.c, metadata.c: eliminate CSIZE macro.
12283
12284 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
12285
12286         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
12287         * object.h: Added async_callback field in MonoAsyncResult.
12288         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
12289         * verify.c: Added async_callback in MonoAsyncResult layout.
12290
12291 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
12292
12293         * reflection.c (mono_reflection_get_custom_attrs): Add support
12294         for Modules.
12295
12296 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12297
12298         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
12299         marshalling.
12300         (mono_marshal_method_from_wrapper): Add null pointer check.
12301
12302 2004-01-16  Martin Baulig  <martin@ximian.com>
12303
12304         * debug-mono-symfile.h: Set version number to 36 and reflect
12305         latest symbol writer changes.
12306
12307 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12308
12309         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
12310         multi-dimensional arrays.
12311         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
12312         (mono_class_from_mono_type): Use bounded_array_class_get.
12313         
12314         * class.c (mono_bounded_array_class_get): New function which takes
12315         a 'bounded' bool argument to distinguish vectors from one dimensional
12316         arrays.
12317
12318         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
12319         bounded_array_class_get if the array has bounds.
12320
12321         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12322         Search modules loaded using AssemblyBuilder:AddModule as well.
12323
12324 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12325
12326         * appdomain.c: increased corlib version.
12327         * filewatcher.c: removed g_print.
12328         * icall.c:
12329         (get_property_info): only allocate what is actually requested.
12330         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
12331
12332 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12333
12334         * Makefile.am: added filewatcher.[ch]
12335         * filewatcher.[ch]: FileSystemWatcher runtime support.
12336         * icall.c: added new FSW icalls.
12337
12338 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12339
12340         * string-icalls.c: fix stringbuilder regression as suggested by
12341         Iain McCoy <iain@mccoy.id.au>.
12342
12343 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
12344
12345         * process.c (process_read_stringtable_block): Recognize '007f' as
12346         a language neutral stringtable block.
12347
12348 2004-01-12  Patrik Torstensson
12349
12350         * object.h (MonoStringBuilder) : Changed layout to support our
12351         new stringbuilder class.
12352         * marshal.c: Change marshalling to support the new layout of 
12353         string builder.
12354         * appdomain.c: increased version number because new layout of
12355         string builder.
12356
12357 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
12358
12359         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
12360         assembly name as an string instead of an AssemblyName, since it is
12361         easier to extract info from it.
12362
12363         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
12364         the culture subdirectories too. Fixes #52231.
12365
12366 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12367
12368         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
12369         It takes 2 new parameters with an optional name for the method to look
12370         for and case ignoring info.
12371
12372         * threadpool.c: removed unused variable.
12373
12374 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12375
12376         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
12377         It takes 2 new parameters with an optional name for the property to look
12378         for and case ignoring info.
12379         Fixes bug #52753.
12380
12381 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
12382
12383         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
12384         Fix #52451.
12385
12386 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12387
12388         * appdomain.c:
12389         * assembly.c: escape the uri before passing it to g_filename_from_uri.
12390         Fixes bug #52630.
12391
12392 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
12393
12394         * reflection.c: Add support for more than one unmanaged resource.
12395
12396         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
12397         in field->def_value, as done in all other cases.
12398
12399         * reflection.c (mono_reflection_get_custom_attrs): Add support for
12400         TypeBuilders.
12401
12402         * reflection.c (mono_reflection_create_runtime_class): Remove 
12403         errorneous assignment to klass->element_class, since it is already
12404         done in mono_reflection_setup_internal_class.
12405
12406 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12407
12408         * gc.c: added missing LeaveCriticalSection.
12409         * icall.c: indented a couple of lines.
12410         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
12411         if we call EndInvoke inside a callback. Fixes bug #52601.
12412
12413 2004-01-07  Martin Baulig  <martin@ximian.com>
12414
12415         * mono-debug-debugger.h
12416         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
12417
12418 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
12419
12420         * appdomain.c: Use messages in NotImplementedException.
12421
12422         * exception.c (mono_get_exception_not_implemented): Now this takes
12423         a message argument.
12424
12425         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
12426         exception instead of g_asserting an aborting when something is not
12427         implemented.
12428
12429         Add some inline docs.
12430
12431 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
12432
12433         * reflection.h: Update after changes to object layout.
12434
12435         * reflection.c: Implement saving of unmanaged aka win32 resources.
12436
12437         * appdomain.c: Bump version number.
12438
12439         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
12440         Handle missing domains gracefully.
12441
12442 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
12443
12444         * file-io.c : On Windows, there are much more invalid_path_chars.
12445
12446 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
12447
12448         * class.h, object.c: prepare for GetType () speedup.
12449
12450 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
12451
12452         * profiler.c: workaround for --profile null reference exception on
12453           cygwin. Patch by Patrik Torstensson.
12454
12455 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
12456
12457         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
12458         make work for unaligned access.
12459
12460 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
12461
12462         * class.c: small cleanup (class->fields [i] -> field).
12463         * image.c: check address of metadata is valid.
12464
12465 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
12466
12467         * assembly.h assembly.c (mono_assembly_loaded): New public function to
12468         search the list of loaded assemblies.
12469
12470         * reflection.c (mono_reflection_type_from_name): Use 
12471         mono_assembly_loaded instead of mono_image_loaded.
12472
12473         * reflection.c: Fix warnings.
12474
12475 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
12476
12477         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
12478         is dynamic. This is needed since an assembly can contain both dynamic and
12479         non-dynamic images.
12480
12481         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
12482         assembly->dynamic.
12483
12484         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
12485
12486         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
12487         to store modules loaded using AddModule.
12488
12489         * reflection.c (mono_image_fill_file_table): Generalize this so it works
12490         on Modules.
12491
12492         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
12493
12494         * reflection.c (mono_image_fill_export_table_from_module): New function to
12495         fill out the EXPORTEDTYPES table from a module.
12496
12497         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
12498         into a separate function. Also handle loaded non-dynamic modules.
12499
12500         * reflection.c (mono_image_basic_init): Fix memory allocation.
12501
12502         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12503
12504         * assembly.c (mono_assembly_load_references): Make this public.
12505
12506 2003-12-19  Martin Baulig  <martin@ximian.com>
12507
12508         * class.c (mono_class_initialize_generic): Made this static, take
12509         a `MonoGenericInst *' instead of a `MonoClass *'.
12510         (mono_class_from_generic): Call mono_class_initialize_generic()
12511         unless we're already initialized or being called from
12512         do_mono_metadata_parse_generic_inst().
12513
12514         * class.h (MonoGenericInst): Added `initialized' and
12515         `init_pending' flags.
12516
12517         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
12518         `mono_class_init (gklass)' or mono_class_initialize_generic()
12519         here; set `generic_inst->init_pending' while parsing the
12520         `type_argv'.
12521
12522 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
12523
12524         * locales.c: include string.h for memxxx prototypes
12525
12526 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12527
12528         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
12529         constructor when accessing literal fields.
12530
12531 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
12532
12533         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12534
12535         * reflection.c (assembly_add_resource_manifest): New function to fill
12536         the MANIFESTRESOURCE table.
12537
12538         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
12539
12540         * reflection.h: Update to changes in class layout.
12541
12542         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
12543         Reenable call to mono_runtime_is_shutting_down ().
12544
12545         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
12546         determine if the runtime is shutting down.
12547
12548 2003-12-16  Jackson Harper <jackson@ximian.com>
12549
12550         * icall.c: comment out call to mono_runtime_is_shutting_down to
12551         fix build.
12552         
12553 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
12554
12555         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
12556         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
12557
12558 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
12559
12560         * reflection.c: move definition of swap_with_size
12561         to before its first call
12562
12563 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
12564
12565         * appdomain.c (mono_runtime_is_shutting_down): New public function.
12566
12567         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
12568         icall.
12569
12570         * object.c: Fix warnings.
12571
12572         * icall.c (ves_icall_Type_Get...): Only consider inherited static
12573         members if FlattenHierarchy is set.
12574
12575         * reflection.c (mono_image_add_decl_security): New function to emit
12576         declarative security.
12577
12578         * reflection.h reflection.c: Add support for declarative security.
12579
12580         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12581         
12582 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12583
12584         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
12585         
12586         * appdomain.c verify.c: Moved corlib version checking into its own
12587         function in appdomain.c since it needs to create vtables etc.
12588
12589 2003-12-13  Patrik Torstensson <p@rxc.se>
12590
12591         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
12592         instead of unwrapped server.
12593
12594 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
12595
12596         * verify.c (check_corlib): Fix field index.
12597
12598 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
12599
12600         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
12601         GetGacPath icall.
12602
12603 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
12604
12605         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
12606         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
12607         cope with sizeof(size_t) != sizeof(guint32).
12608
12609 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12610
12611         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
12612         in case of failure.
12613
12614 2003-12-10  Mark Crichton <crichton@gimp.org>
12615
12616         * icall.c: removed the GetNonZeroBytes.  We now handle this case
12617         in managed code.
12618
12619         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
12620
12621 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
12622
12623         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
12624         marked as deleted.
12625
12626 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12627
12628         * verify.c (check_corlib): Handle the case when the version field is 
12629         initialized by a static constructor.
12630
12631 2003-12-08  Patrik Torstensson  <p@rxc.se>
12632
12633     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
12634
12635 2003-12-08  Martin Baulig  <martin@ximian.com>
12636
12637         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
12638         a MonoReflectionGenericParameter, also take the parameter index
12639         and name as arguments.
12640         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12641         (ves_icall_MonoGenericParam_initialize): New interncall.
12642         (ves_icall_Type_make_byref_type): New interncall.
12643
12644         * reflection.h (MonoReflectionGenericParam): Derive from
12645         MonoReflectionType, not just from MonoObject.  Added `refobj' and
12646         `index' fields.
12647
12648         * reflection.c (mono_reflection_define_generic_parameter): Create
12649         and return a new MonoReflectionGenericParam; don't initialize the
12650         constraints here.
12651         (mono_reflection_initialize_generic_parameter): New public method;
12652         initializes the constraints and creates the `param->pklass'.
12653
12654 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12655
12656         * reflection.h reflection.c: Use the new fields 'num_types', 
12657         'num_fields' and 'num_methods' to track the number of types etc.
12658
12659         * verify.c (check_corlib): Check corlib version number.
12660
12661 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
12662
12663         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
12664         function works on all methods.
12665
12666 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12667
12668         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
12669         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
12670         the custom_type_info flag of the transparent proxy.
12671         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
12672         objects that supports IRemotingTypeInfo.
12673         * object.h: Added custom_type_info field in transparent proxy.
12674
12675 2003-12-06  Martin Baulig  <martin@ximian.com>
12676
12677         * class.c (mono_class_create_from_generic): Removed.
12678         (mono_class_from_generic): Check `ginst->klass' before doing
12679         anything else.  This is important to fully support "recursive"
12680         generic types.
12681
12682         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
12683         empty `generic_inst->klass' before doing anything else.
12684
12685 2003-12-06  Dick Porter  <dick@ximian.com>
12686
12687         * verify.c: 
12688         * object.h:
12689         * icall.c:
12690         * locales.c: Use C structs to access class fields.  Don't do a
12691         conversion between MonoString and UChar because both are
12692         platform-endian UTF-16.  Compare now takes startindex and count
12693         parameters.  Add a char overload for IndexOf.  Speed up the
12694         invariant string IndexOf.
12695
12696 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
12697
12698         * Makefile.am (monosn_LDADD): Fix parallel build.
12699
12700 2003-12-04  Martin Baulig  <martin@ximian.com>
12701
12702         * icall.c
12703         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12704         (ves_icall_Type_make_array_type): New interncall.       
12705
12706 2003-12-04  Martin Baulig  <martin@ximian.com>
12707
12708         * locales.c: also change it in the !HAVE_ICU case.
12709
12710 2003-12-04  Dick Porter  <dick@ximian.com>
12711
12712         * icall.c:
12713         * locales.c: construct_compareinfo is now in CompareInfo, not
12714         CultureInfo.
12715
12716 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12717
12718         * image.c (mono_image_load_file_for_image): Cache loaded images in the
12719         image->files array.
12720
12721         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
12722         table as well.
12723
12724         * assembly.c (mono_assembly_load_references): Only load references
12725         once.
12726
12727         * class.c (mono_class_from_name): Avoid linear search of the 
12728         EXPORTEDTYPE table.
12729
12730         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
12731
12732 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12733
12734         * image.h (MonoImage): Add 'field_cache' field.
12735
12736         * loader.c (mono_field_from_token): Cache field lookups.
12737         
12738         * reflection.c (mono_module_get_object): Fix name property.
12739
12740         * icall.c (ves_icall_get_enum_info): Update after changes to 
12741         mono_metadata_get_constant_index ().
12742
12743         * icall.c: Get rid of get_type_info icall, use a separate icall for
12744         each type property to avoid needless memory allocations. Fixes #51514.
12745
12746         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
12747         to avoid needless binary searches.
12748
12749         * class.c (class_compute_field_layout): Move the initialization of
12750         field->def_value to mono_class_vtable ().
12751
12752         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
12753         non-corlib types.
12754
12755         * object.c (mono_object_allocate): Make it inline.
12756
12757         * object.c (mono_object_allocate_spec): Make it inline.
12758         
12759 2003-12-02  Dick Porter  <dick@ximian.com>
12760
12761         * locales.c (create_NumberFormat): NumberFormatInfo construction.
12762         Patch by Mohammad DAMT (mdamt@cdl2000.com).
12763
12764 2003-12-01  Dick Porter  <dick@ximian.com>
12765
12766         * threads.c: Fix signature and call in CreateMutex and
12767         CreateEvent.
12768
12769 2003-12-01  Dick Porter  <dick@ximian.com>
12770
12771         * icall.c: 
12772         * locales.c: Implement string compares and searching
12773
12774         * object.h: Add extra Thread field
12775
12776 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
12777
12778         * reflection.c (fixup_method): Add support for MonoCMethod.
12779
12780 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
12781
12782         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
12783
12784         * reflection.c (assembly_name_to_aname): Allow extra characters in
12785         assembly names. Fixes #51468.
12786
12787 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12788
12789         * exception.c (mono_exception_from_name_domain): New helper function.
12790
12791         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
12792         exception object in the correct domain.
12793
12794         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
12795         formatting + make a copy a the input data.
12796
12797         * loader.c (mono_get_method_from_token): Methods which contain
12798         native code do not have entries in the ImplMap.
12799
12800         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
12801         Thanks to Gonzalo for spotting this.
12802         
12803         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
12804         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
12805
12806         * assembly.h (mono_assembly_load_from): Split the second part of 
12807         assembly loading into a new public function.
12808
12809         * exception.h (mono_get_exception_bad_image_format): New function.
12810
12811 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
12812
12813         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
12814         Enumerate all modules inside a dynamic assembly. Fixes #51293.
12815         
12816         * icall.c: Add new icall for creating dynamic methods.
12817
12818         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
12819
12820         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
12821
12822         * reflection.c (mono_reflection_create_dynamic_method): New icall to
12823         create a dynamic method.
12824
12825         * reflection.c (resolve_object): New helper function.
12826
12827         * reflection.c: Generalize ReflectionMethodBuilder and the functions
12828         which manipulate it so they can also work on dynamic methods.
12829
12830         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
12831         creating the MonoReflectionMethodAux structure if it is not needed.
12832         
12833         * reflection.h verify.c: Update after changes to object layout.
12834
12835         * reflection.c (method_builder_encode_signature): Fix compilation on
12836         gcc 2.95.x.
12837
12838 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
12839
12840         * appdomain.h: Added support for context static fields. Added static_data
12841           field to MonoAppContext and renamed thread_static_fields to a more
12842           generic special_static_fields in MonoAppDomain, since it can now contain
12843           context static fields.
12844         * domain.c: Updated hashtable name.
12845         * object.c: Replaced field_is_thread_static() for a more generic
12846           field_is_special_static() which also checks for context static attribute.
12847           In mono_class_vtable(), added support for static context fields.
12848         * threads.c: Changed methods that manage thread static fields to more
12849           generic methods so they can be reused both for thread and context static
12850           data.
12851         * threads.h: Declared some new methods.
12852
12853 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
12854
12855         * reflection.h: Update after changes to the managed types.
12856
12857         * reflection.c (encode_custom_modifiers): New helper function.
12858
12859         * reflection.c (method_encode_signature): Emit custom modifiers.
12860
12861         * reflection.c (field_encode_signature): Emit custom modifiers.
12862
12863 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12864
12865         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
12866
12867         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
12868         implementation.
12869
12870         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
12871         icall.
12872
12873         * object.c (mono_field_get_value_object): New function.
12874
12875         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
12876         specific.
12877
12878 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12879
12880         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
12881         return a preallocated out-of-memory exception instance.
12882
12883         * object.c (out_of_memory): Use the new function.
12884
12885         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
12886         flag is before the custom modifiers. Fixes #49802.
12887
12888 2003-11-16  Martin Baulig  <martin@ximian.com>
12889
12890         * class.c (mono_class_is_open_constructed_type): Implemented the
12891         MONO_TYPE_GENERICINST case.
12892
12893 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12894
12895         * assembly.c (mono_assembly_fill_assembly_name): New function to
12896         fill out the MonoAssemblyName structure.
12897         (mono_assembly_open): Use the new function.
12898
12899         * icall.c (fill_reflection_assembly_name): New helper function.
12900
12901         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
12902         new function.
12903
12904         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
12905
12906 2003-11-15  Martin Baulig  <martin@ximian.com>
12907
12908         * class.c (mono_class_is_open_constructed_type): New public
12909         function; checks whether a type is an open constructed type,
12910         ie. whether it still contains type parameters.
12911         (mono_class_inflate_generic_type): If we're a type parameter and
12912         the inflated type is also a MONO_TYPE_(M)VAR, return the original
12913         type.
12914
12915         * class.h (MonoGenericInst): Added `guint32 is_open'.
12916
12917         * loader.c (method_from_methodspec): Check whether we're an open
12918         or closed constructed type and set `ginst->is_open'.
12919
12920         * reflection.c (mono_reflection_bind_generic_parameters): Check
12921         whether we're an open or closed constructed type and set
12922         `ginst->is_open'.
12923         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
12924         from open constructed types.
12925
12926 2003-11-15  Martin Baulig  <martin@ximian.com>
12927
12928         * reflection.c (mono_reflection_bind_generic_parameters): If we're
12929         a generic instance (instead of a generic type declaration) with
12930         unbound generic parameters, bind them to our actual types.
12931
12932 2003-11-14  Martin Baulig  <martin@ximian.com>
12933
12934         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
12935
12936         * reflection.c (mono_reflection_bind_generic_parameters): If we're
12937         an interface type, populate `res->interfaces' with instantiated
12938         versions of all the interfaces we inherit.
12939
12940 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
12941
12942         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
12943         when MONO_PATH is set but doesn't contain the install dir.
12944
12945 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12946
12947         * icall.c:
12948         (ves_icall_Type_GetInterfaces): don't return an interface twice when
12949         it's also implemented in base classes. Fixes bug #50927.
12950
12951 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
12952
12953         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
12954         if this method is called from a finalizer. Fixes #50913.
12955
12956 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
12957
12958         * threads.c: Implement VolatileRead/VolatileWrite
12959
12960         * icall.c: Add new icalls for VolatileRead/VolatileWrite
12961
12962 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12963
12964         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
12965         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
12966         2.95.3.
12967
12968         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
12969         from Peter Ross (pro@missioncriticalit.com).
12970         
12971 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
12972
12973         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
12974
12975 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12976
12977         * assembly.c (mono_assembly_load_references): Disable check because it
12978         triggers on older corlibs which lots of people have.
12979
12980 2003-11-12  Jackson Harper  <jackson@ximian.com>
12981
12982         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
12983         load corlib.dll if mscorlib.dll is not found.
12984         * assembly.h: Remove corlib name define.
12985         * class.c:
12986         * domain.c:
12987         * image.c: Change corlib name to mscorlib.
12988         
12989 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
12990
12991         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
12992
12993 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
12994
12995         * appdomain.h: Added loader_optimization here to sync with the C#
12996         code, and add disallow_binding_redirects field.
12997
12998 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
12999
13000         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
13001
13002         * reflection.c (mono_image_build_metadata): Fix crash on modules
13003         with no types.
13004
13005         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
13006
13007         * icall.c (ves_icall_get_method_info): Return callingConvention as
13008         well.
13009
13010         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
13011         namespaces from the EXPORTEDTYPE table as well.
13012
13013         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
13014         from all modules inside the assembly.
13015         
13016 2003-11-11  Martin Baulig  <martin@ximian.com>
13017
13018         * reflection.c (mono_reflection_bind_generic_parameters): Make
13019         this work for interfaces.
13020
13021 2003-11-11  Martin Baulig  <martin@ximian.com>
13022
13023         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
13024
13025 2003-11-11  Martin Baulig  <martin@ximian.com>
13026
13027         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
13028         "MonoInflatedMethod" and "MonoInflatedCtor".
13029
13030 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
13031
13032         * reflection.c (resolution_scope_from_image): Use the assembly table
13033         from the manifest module, since other modules don't have it.
13034
13035         * debug-helpers.c (mono_type_full_name): New helper function.
13036
13037         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
13038
13039         * image.c (mono_image_load_file_for_image): New public function which
13040         is a replacement for the load_file_for_image in class.c.
13041
13042         * assembly.c (mono_assembly_load_module): A wrapper for the function
13043         above which does assembly association and reference loading too.
13044
13045         * class.c (mono_class_from_name): Call mono_assembly_load_module.
13046
13047 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13048
13049         * appdomain.c: not all of the attributes for the full assembly name
13050         are required and the order doesn't matter. Fixes bug #50787.
13051
13052 2003-11-10  Dick Porter  <dick@ximian.com>
13053
13054         * locales.c: Use platform-endian UTF16
13055
13056 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
13057
13058         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13059         
13060 2003-11-10  Martin Baulig  <martin@ximian.com>
13061
13062         * metadata.c
13063         (mono_metadata_load_generic_params): Make this actually work.
13064
13065         * reflection.c (mono_reflection_bind_generic_parameters): If our
13066         parent is a generic instance, pass all the `types' to it, no
13067         matter whether it has the same number of type parameters or not.
13068
13069 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
13072
13073         * assembly.c (mono_assembly_load_references): Move the image<->assembly
13074         assignment code to this function so it gets called recursively for all
13075         modules.
13076
13077         * image.c (load_modules): Remove the assembly assignment since it is
13078         now done by mono_assembly_load_references.
13079         
13080         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
13081         Add 'module' argument.
13082         (mono_module_get_types): New helper function.
13083         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
13084
13085 2003-11-08  Martin Baulig  <martin@ximian.com>
13086
13087         * class.c (mono_class_inflate_generic_method): Interface method
13088         don't have a header.
13089
13090         * reflection.c (mono_image_get_methodspec_token): Take an
13091         additional `MonoGenericInst *' argument instead of reading it from
13092         the header; this is necessary to support interfaces.
13093         (mono_image_create_token): Pass the `MonoGenericInst *' from the
13094         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
13095         (inflated_method_get_object): Take an additional `MonoGenericInst *'
13096         argument.
13097
13098         * reflection.h (MonoReflectionInflatedMethod): Added
13099         `MonoGenericInst *ginst'.
13100
13101 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
13102
13103         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
13104
13105 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
13106
13107         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
13108
13109 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
13110
13111         * reflection.c 
13112         (reflection_methodbuilder_from_method_builder):
13113         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
13114         initialize a ReflectionMethodBuilder structure.
13115         (mono_image_get_methodbuilder_token):
13116         (mono_image_get_ctorbuilder_token): New functions to emit memberref
13117         tokens which point to types in another module inside the same assembly.
13118
13119         * reflection.c: Use the new helper functions.
13120         
13121         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
13122
13123         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
13124         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
13125
13126         * reflection.c (resolution_scope_from_image): Emit a moduleref if
13127         neccesary.
13128
13129         * reflection.c (mono_image_build_metadata): Emit metadata only for the
13130         current module. Emit the manifest only for the main module.
13131
13132         * reflection.c (mono_image_create_token): Add assertion when a 
13133         memberref needs to be created.
13134
13135         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
13136
13137         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
13138         larger buffer for the custom attribute blob. Fixes #50637.
13139         
13140 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13141
13142         * threadpool.c: notify listener on async processing handles after
13143         invoking the async callback. Thanks to Zoltan.
13144
13145 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
13146
13147         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
13148         avoid code duplication.
13149
13150         * reflection.h (MonoDynamicImage): New type which is currently unused,
13151         but will be used through the ref.emit code in place of 
13152         MonoDynamicAssembly.
13153
13154         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
13155         object layout.
13156
13157         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
13158         a MonoDynamicImage instead of just a MonoImage.
13159         
13160         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
13161         icalls to ModuleBuilder but keep their semantics, so they will work
13162         with moduleb->assemblyb. This will change later.
13163         
13164 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
13165
13166         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
13167         object layout.
13168
13169         * reflection.c (mono_image_build_metadata): Avoid creation of a default
13170         main module, since it is now done by the managed code.
13171
13172 2003-11-03  Martin Baulig  <martin@ximian.com>
13173
13174         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
13175         `ginst->klass' here.
13176         (method_encode_methodspec): Don't use the `ginst->generic_method's
13177         klass if it's a generic instance, use `ginst->klass' in this case.
13178
13179 2003-11-03  Martin Baulig  <martin@ximian.com>
13180
13181         * reflection.c (mono_image_get_generic_method_param_info):
13182         Removed, use mono_image_get_generic_param_info() instead.
13183         (mono_image_get_type_info): Write the GenericParam table before
13184         the Method table.  This is neccessary because in the GenericParam
13185         table, type parameters of the class (ie. '!0' etc.) must come
13186         before the ones from its generic methods (ie. '!!0' etc).
13187
13188 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
13189
13190         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
13191
13192 2003-11-02  Martin Baulig  <martin@ximian.com>
13193
13194         * reflection.c (create_generic_typespec): Take a
13195         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
13196         the generic parameters from it.
13197
13198 2003-11-02  Martin Baulig  <martin@ximian.com>
13199
13200         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
13201         instead of a `MonoClassField *' since we just need the type.
13202         (create_generic_typespec): New static function.  Creates a
13203         TypeSpec token for a generic type declaration.
13204         (mono_image_get_generic_field_token): New static function.
13205         (mono_image_create_token): If we're a FieldBuilder in a generic
13206         type declaration, call mono_image_get_generic_field_token() to get
13207         the token.
13208
13209 2003-11-02  Martin Baulig  <martin@ximian.com>
13210
13211         * reflection.h
13212         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
13213         `MonoReflectionGenericInst *declaring_type' and
13214         `MonoReflectionGenericInst *reflected_type' fields.
13215
13216         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
13217         `MonoReflectionGenericInst *declaring_type' and a
13218         `MonoReflectionGenericInst *reflected_type' argument instead of a
13219         single `MonoReflectionGenericInst *type' one.  Set
13220         `res->declaring_type' and `res->reflected_type' from them.
13221         (mono_reflection_inflate_field): Likewise.      
13222
13223 2003-11-02  Martin Baulig  <martin@ximian.com>
13224
13225         * class.c (mono_class_setup_vtable): Don't store generic methods
13226         in the vtable.  
13227
13228 2003-11-02  Martin Baulig  <martin@ximian.com>
13229
13230         * reflection.h (MonoReflectionGenericInst): Added
13231         `MonoReflectionType *declaring_type'.
13232
13233         * reflection.c (mono_reflection_bind_generic_parameters): Use
13234         `if (tb->parent)' instead of `klass->parent'.
13235
13236 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
13237
13238         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
13239         with an empty ASSEMBLY table.
13240
13241         * reflection.c (mono_image_build_metadata): Avoid using the same loop
13242         variable in the inner and outer loops.
13243
13244 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
13245
13246         * metadata.h (mono_metadata_make_token): Put parentheses around macro
13247         argument.
13248
13249         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
13250         
13251         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
13252         icalls. Instead, do everything in managed code. This is needed since
13253         it is hard to restore the original domain etc. in unmanaged code in the
13254         presence of undeniable exceptions.
13255
13256         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
13257         New icalls to push and pop appdomain refs.
13258
13259 2003-10-31  Martin Baulig  <martin@ximian.com>
13260
13261         * class.c (inflate_generic_type): Renamed to
13262         mono_class_inflate_generic_type() and made it public.
13263
13264         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
13265         New interncall.
13266
13267         * loader.c (mono_field_from_memberref): Also set the retklass for
13268         typespecs.
13269
13270         * fielder.c (mono_image_get_inflated_field_token): New static
13271         method; creates a metadata token for an inflated field.
13272         (mono_image_create_token, fixup_method): Added support for
13273         "MonoInflatedField".
13274         (fieldbuilder_to_mono_class_field): New static function.
13275         (mono_reflection_inflate_field): New public function.
13276
13277         * reflection.h
13278         (MonoReflectionGenericInst): Added `MonoArray *fields'.
13279         (MonoReflectionInflatedField): New typedef.     
13280
13281 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
13282
13283         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
13284         for Solaris and other platforms without s6_addr16
13285
13286 2003-10-30  Martin Baulig  <martin@ximian.com>
13287
13288         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
13289         argument instead of two.
13290         (mono_class_inflate_generic_signature): Likewise.
13291         (inflate_generic_header): Likewise.
13292         (mono_class_inflate_generic_method): Likewise.  In addition, if
13293         `ginst->klass' is set, it becomes the new `method->klass'.
13294
13295         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
13296         field.
13297
13298         * reflection.c (encode_generic_method_sig): Write a 0xa as the
13299         first byte. [FIXME]
13300         (method_encode_methodspec): If we have generic parameters, create
13301         a MethodSpec instead of a MethodRef.
13302         (fixup_method): Added support for "MonoInflatedMethod" and
13303         "MonoInflatedCtor".
13304         (mono_image_create_token): Added support for "MonoInflatedMethod"
13305         and "MonoInflatedCtor".
13306         (inflated_method_get_object): New static function; returns a
13307         managed "System.Reflection.MonoInflatedMethod" object.
13308         (mono_reflection_bind_generic_method_parameters): Return a
13309         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
13310         (mono_reflection_inflate_method_or_ctor): Likewise.
13311         (mono_image_get_generic_method_param_info): Initialize unused
13312         fields to zero.
13313         (mono_image_get_generic_param_info): Likewise.
13314
13315         * reflection.h (MonoReflectionInflatedMethod): New public
13316         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
13317         "S.R.MonoInflatedCtor" classes.
13318
13319         * loader.c (method_from_memberref): If we're a TypeSpec and it
13320         resolves to a generic instance, inflate the method.
13321
13322 2003-10-28  Dick Porter  <dick@ximian.com>
13323
13324         * object.c (mono_runtime_run_main): Convert command-line arguments
13325         into utf8, falling back to the user's locale encoding to do so.
13326
13327 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
13328
13329         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
13330         at this time.
13331
13332         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
13333
13334         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
13335         up icalls at method definition time. Partially fixes #33569.
13336
13337 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
13338
13339         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
13340         marshalling of arrays. Fixes #50116.
13341
13342         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
13343
13344         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
13345         points to a vtable in the dying appdomain.
13346
13347         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
13348         listeners into unmanaged code inside the lock.
13349
13350         * object.c (mono_class_vtable): Turn off typed allocation in non-root
13351         domains and add some comments.
13352
13353 2003-10-25  Martin Baulig  <martin@ximian.com>
13354
13355         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
13356
13357         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
13358
13359         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
13360         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
13361         currently parsing.  Create the generic class and store it in
13362         `generic_inst->klass' before parsing the type arguments.  This is
13363         required to support "recursive" definitions; see mcs/tests/gen-23.cs
13364         for an example.
13365         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
13366         to support recursive typespec entries.
13367
13368         * class.c (mono_class_setup_parent): If our parent is a generic
13369         instance, we may get called before it has its name set.
13370         (mono_class_from_generic): Splitted into
13371         mono_class_create_from_generic() and mono_class_initialize_generic().
13372
13373 2003-10-25  Martin Baulig  <martin@ximian.com>
13374
13375         * icall.c (ves_icall_Type_BindGenericParameters): Return a
13376         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
13377         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
13378         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
13379
13380         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
13381         (create_typespec): Likewise.
13382         (mono_reflection_bind_generic_parameters): Return a
13383         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
13384         (mono_reflection_inflate_method_or_ctor): New public function.
13385
13386         * reflection.h (MonoReflectionGenericInst): New typedef.        
13387
13388 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
13389
13390         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
13391         inside the domain lock. Fixes #49993.
13392         
13393         * object.c (mono_class_vtable): When typed allocation is used, 
13394         allocate vtables in the GC heap instead of in the mempool, since the
13395         vtables contain GC descriptors which are used by the collector even
13396         after the domain owning the mempool is unloaded.
13397
13398         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
13399
13400         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
13401         reflect what it does. Also invalidate mempools instead of freeing
13402         them if a define is set.
13403
13404         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
13405         of the appdomain.
13406         
13407         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
13408         hold the finalizable objects in this domain.
13409
13410         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
13411         appdomain.
13412
13413         * appdomain.c (mono_domain_set): New function to set the current
13414         appdomain, but only if it is not being unloaded.
13415
13416         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
13417         appdomain which is being unloaded.
13418         
13419         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
13420         unloading of the root appdomain.
13421
13422         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
13423         icall to execute a method in another appdomain. Intended as a 
13424         replacement for InternalSetDomain, which can confuse the code 
13425         generation in the JIT.
13426
13427         * appdomain.c (mono_domain_is_unloading): New function to determine
13428         whenever an appdomain is unloading.
13429
13430         * appdomain.c (mono_domain_unload): New function to correctly unload
13431         an appdomain.
13432
13433         * assembly.c (mono_assembly_load_references): Check that an assembly
13434         does not references itself.
13435
13436         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
13437         domain manually, it asks the finalizer thread to do it, then waits for
13438         the result. Also added a timeout.
13439
13440         * icall.c: Register the new icalls.
13441
13442         * threads.h threads.c: Export the mono_gc_stop_world and 
13443         mono_gc_start_world functions.
13444         
13445         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
13446         function to fill out the mempool with 0x2a.
13447
13448 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
13449
13450         * reflection.h (MonoReflectionMethodAux): New structure to store
13451         information which is rarely used, thus is not in the MonoMethod
13452         structure.
13453
13454         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
13455         store the aux info.
13456
13457         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
13458         and marshalling info into the aux structure.
13459
13460         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
13461         from the aux structure.
13462
13463         * loader.c (mono_method_get_param_names): Retrieve the param names from
13464         the aux structure.
13465         
13466 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
13467
13468         * exception.h exception.c: Add AppDomainUnloadedException && fix 
13469         warning.
13470
13471 2003-10-21  Dick Porter  <dick@ximian.com>
13472
13473         * socket-io.c
13474         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
13475         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
13476
13477 2003-10-21  Martin Baulig  <martin@ximian.com>
13478
13479         * reflection.c (mono_reflection_bind_generic_parameters):
13480         `klass->parent' is NULL for interfaces.
13481
13482 2003-10-21  Martin Baulig  <martin@ximian.com>
13483
13484         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
13485
13486 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
13487
13488         * exception.c (mono_exception_from_name_msg): New helper function for
13489         creating exceptions and initializing their message field.
13490
13491         * exception.c: Simplify functions using the new helper.
13492
13493         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
13494         New function.
13495
13496         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
13497         mono_raise_exception, since otherwise gcc doesn't generate the function
13498         epilog for raise_exception, confusing the stack unwinding in the JIT.
13499         Fixes #45043.
13500
13501         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
13502         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
13503         Fixes #49499.
13504
13505 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13506
13507         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
13508         utf8.
13509
13510 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
13511
13512         * icall.c: Removed GetUninitializedObject method because
13513           AllocateUninitializedClassInstance does the same.
13514
13515 2003-10-18  Martin Baulig  <martin@ximian.com>
13516
13517         * class.c (inflate_generic_signature): Renamed to
13518         mono_class_inflate_generic_signature() and made it public.
13519         (my_mono_class_from_generic_parameter): New static function; if we
13520         don't already have the generic parameter's MonoClass, create a
13521         very simple one which is just used internally in the runtime and
13522         not passed back to managed code.
13523
13524         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
13525
13526         * metadata.h (MonoMethodSignature): Moved the
13527         `MonoGenericParam *gen_params' to the MonoMethodHeader.
13528         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
13529
13530         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
13531         ves_icall_MonoMethod_GetGenericArguments(); this is now an
13532         interncall on the MonoMethod class, not on MethodInfo.
13533         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
13534         calling mono_reflection_bind_generic_method_parameters() directly.
13535
13536         * loader.c (mono_method_get_signature): If this is a MethodSpec;
13537         return the already computed `method->signature'.
13538         (method_from_methodspec): New static function to load a method
13539         from a MethodSpec entry.
13540         (mono_get_method_from_token): Call the new method_from_methodspec()
13541         for MethodSpec tokens.  
13542         (mono_get_method_from_token): If we're a generic method, load the
13543         type parameters.
13544
13545         * reflection.c (mono_image_get_memberref_token): Allow
13546         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
13547         table.
13548         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
13549         (mono_image_create_token): First check whether it's a generic
13550         method (so we'd need to create a MethodSpec), then do the other
13551         two alternatives.
13552         (mono_reflection_bind_generic_method_parameters): Return a
13553         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
13554         called directly from the interncall.
13555
13556 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
13557
13558         * reflection.c (load_public_key): Move loading of the public key
13559         into managed code.
13560
13561         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
13562
13563         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
13564         fields.
13565
13566         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
13567         culture, hash_alg and public_key. Fixes #49555.
13568
13569 2003-10-17  Martin Baulig  <martin@ximian.com>
13570
13571         * class.h (MonoGenericInst): Moved this declaration here and added
13572         `MonoMethod *generic_method'.
13573
13574         * icall.c
13575         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
13576         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
13577
13578         * metadata.c (mono_metadata_type_equal): Two types of
13579         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
13580         index; ie. don't compare the address of the `MonoGenericParam'
13581         structure.
13582         (mono_metadata_load_generic_params): Removed the `MonoMethod
13583         *method' argument.
13584
13585         * metadata.h (MonoGenericInst): Moved declaration to class.h.
13586         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
13587
13588         * reflection.c (method_encode_signature): Encode the number of
13589         generic parameters.
13590         (encode_generic_method_sig): New static function.
13591         (method_encode_methodspec): New static function; creates an entry
13592         in the MethodSpec table for a generic method.
13593         (mono_image_get_methodspec_token): New static function.
13594         (mono_image_create_token): Call mono_image_get_methodspec_token()
13595         for generic methods.
13596         (mono_reflection_bind_generic_method_parameters): New public
13597         function.  Instantiates a generic method.
13598
13599 2003-10-16  Martin Baulig  <martin@ximian.com>
13600
13601         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
13602         *gen_params' here from MonoMethodHeader.
13603
13604         * metadata.c (mono_metadata_parse_method_signature): If we have
13605         generic parameters, initialize `method->gen_params' and then set
13606         the correct `type->data.generic_param' in all the parameters.
13607
13608 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
13609
13610         * threads.c (mono_threads_get_default_stacksize): New function to 
13611         return the default stacksize.
13612
13613         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
13614         termination of the finalizer thread, since the previous method had
13615         race conditions. Fixes #49628.
13616
13617         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
13618         as for the other managed threads.
13619
13620 2003-10-16  Martin Baulig  <martin@ximian.com>
13621
13622         * class.c (inflate_generic_signature): Copy `generic_param_count'
13623         and `gen_params'.
13624
13625         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
13626         New interncall.
13627
13628         * metadata.c (mono_metadata_parse_method_signature): Actually set
13629         the `method->generic_param_count' here.
13630         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
13631
13632 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
13633
13634         * object.h: Add a new field to TypedRef to simplify the implementation
13635         of the REFANY opcodes in the JIT.
13636
13637         * icall.c: Make use of the new field.
13638
13639         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
13640         dynamically.
13641
13642 2003-10-15  Martin Baulig  <martin@ximian.com>
13643
13644         * class.c (mono_class_from_gen_param): Renamed to
13645         mono_class_from_generic_parameter() and moved most of the
13646         functionality from mono_reflection_define_generic_parameter()
13647         here; ie. we create a "real" class here.
13648         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
13649         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
13650         previously been called.
13651
13652         * class.h (MonoGenericParam): Moved the declaration of this struct
13653         here from metadata.h and added `MonoMethod *method'.
13654
13655         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
13656         interncall.
13657
13658         * loader.c (mono_get_method_from_token): If we have any generic
13659         parameters, call mono_metadata_load_generic_params() to read them
13660         from the MONO_TABLE_GENERICPAR.
13661
13662         * metadata.c (mono_metadata_load_generic_params): Added
13663         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
13664
13665         * metadata.h (MonoMethodSignature): Replaced
13666         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
13667         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
13668
13669         * reflection.c (mono_reflection_define_generic_parameter): Moved
13670         most of the functionality into the new
13671         mono_class_from_generic_parameter(); set the `method' field if
13672         we're a method parameter.       
13673
13674 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
13675
13676         * marshal.c (emit_struct_conv): if native size is 0
13677         emit no code.
13678
13679 2003-10-14  Martin Baulig  <martin@ximian.com>
13680
13681         * icall.c: The generics API has changed in the spec since it was
13682         added to System.Type; these modifications make it match the spec
13683         again.
13684         (ves_icall_Type_GetGenericParameters): Renamed to
13685         `ves_icall_Type_GetGenericArguments'.
13686         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
13687         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
13688         `ves_icall_MonoType_get_HasGenericArguments'.
13689         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
13690         `ves_icall_MonoType_get_IsGenericParameter'.
13691         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
13692         this is no interncall anymore.
13693         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
13694         `ves_icall_TypeBuilder_get_IsGenericParameter'.
13695
13696 2003-10-14  Martin Baulig  <martin@ximian.com>
13697
13698         * reflection.c (mono_reflection_bind_generic_parameters): Also
13699         inflate generic methods if we're reading the class from IL.
13700
13701 2003-10-13  Martin Baulig  <martin@ximian.com>
13702
13703         * reflection.c (mono_reflection_define_generic_parameter): This
13704         method isn't called directly from the icall anymore; take a
13705         `MonoReflectionAssemblyBuilder *' so we can use this for type and
13706         method generic parameters.
13707         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
13708         (method_builder_encode_signature): Encode generic parameters.
13709         (mono_image_get_method_info): Write generic params to the
13710         MONO_TABLE_GENERICPARAM table.
13711
13712         * reflection.h (MonoReflectionMethodBuilder): Added
13713         `MonoArray *generic_params'.
13714
13715         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
13716
13717         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
13718         wrapper for mono_reflection_define_generic_parameter().
13719         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
13720
13721 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
13722
13723         * marshal.h: Add missing function to fix build.
13724
13725         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
13726         the SetLastError pinvoke attribute.
13727
13728         * marshal.c (mono_marshal_set_last_error): New helper function called
13729         by the generated code.
13730         
13731         * marshal.c (mono_mb_emit_branch): New helper function.
13732
13733         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
13734
13735         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13736         classes as parameters and return values of delegates. Fixes #29256. 
13737
13738 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
13739
13740         * locales.c: use gint32 in non HAVE_ICU case
13741
13742 2003-10-11  Martin Baulig  <martin@ximian.com>
13743
13744         * mono-debug.c (mono_debug_add_method): Added a workaround for
13745         bug #48591.
13746
13747 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
13748
13749         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
13750         delegates passed to native code must use the STDCALL calling 
13751         convention. Fixes #35987.
13752
13753 2003-10-10  Martin Baulig  <martin@ximian.com>
13754
13755         * class.c (inflate_generic_type): If we're inflating for a generic
13756         type instance (and not for a generic method), return
13757         MONO_TYPE_MVAR unchanged.
13758
13759 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13760
13761         * string-icalls.c: Join ignores null strings in the source array.
13762         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
13763         * threads.c: GetAvailableTheads is slightly more accurate.
13764
13765 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
13766
13767         * threads.h threads.c : add mono_threads_set_default_stacksize
13768         and pass default to CreateThread calls.
13769
13770 2003-10-09  Dick Porter  <dick@ximian.com>
13771
13772         * icall.c:
13773         * locales.h:
13774         * locales.c: Internal calls for constructing CultureInfo and
13775         related objects from libicu (if its available.)
13776
13777 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
13778
13779         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
13780
13781 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13782
13783         * threadpool.c: added an argument to async_invoke_thread that is the
13784         item to process, pass the MonoAsyncResult to the thread start function
13785         when creating a new thread. This way we don't need to acquire any lock
13786         when we're creating a new thread. Readded a semaphore for faster
13787         response times (instead of that Sleep i added).
13788
13789 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
13790
13791         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13792         get daylight change dates better on Windows, fix handling
13793         of platforms without tm_gmtoff.
13794
13795 2003-10-06  Martin Baulig  <martin@ximian.com>
13796
13797         * class.c (inflate_generic_method): Renamed to
13798         mono_class_inflate_generic_method() and made public.
13799         (mono_class_init): Don't inflate the generic methods here.
13800         (mono_class_from_generic): Added `gboolean inflate_methods'
13801         argument.  Inflate the methods here.
13802
13803         * loader.c (mono_method_get_param_names): Ignore instances of
13804         generic types for the moment.
13805
13806         * reflection.c (fixup_method): Added support for inflated methods.
13807         (mono_image_create_token): Use mono_image_get_methodref_token()
13808         for inflated methods.
13809         (mono_custom_attrs_from_param): Ignore instances of generic types
13810         for the moment.
13811         (mono_reflection_bind_generic_parameters): New public function.
13812         Moved all the functionality from
13813         ves_icall_Type_BindGenericParameters() here and added support for
13814         dynamic types.
13815         (mono_reflection_define_generic_parameter): Initialize
13816         `klass->methods' here.
13817
13818         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
13819         functionality into mono_reflection_define_generic_parameter().
13820         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
13821         TypeBuilder, return that TypeBuilder.
13822
13823 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13824
13825         * appdomain.c: removed mono_delegate_semaphore.
13826
13827         * threadpool.c:
13828         (mono_thread_pool_add): moved hash table creation inside and the thread 
13829         creation outside of the critical region.
13830         (mono_thread_pool_finish): removed obsolete code.
13831         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
13832         continue or exit the thread depending on the queue.
13833
13834 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
13835
13836         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
13837         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
13838         handle more bool marshalling options
13839
13840 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
13841
13842         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
13843         arrays of structs. Also add a more descriptive error message when
13844         a structure member is marshalled as LPArray.
13845
13846 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13847
13848         * marshal.c (mono_marshal_get_native_wrapper): Add support for
13849         marshalling arrays of complex types. Fixes #29098. Also remove an
13850         usused and incomplete function.
13851
13852 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13853
13854         * gc.c: report heap_size - free_bytes as total memory allocated
13855         (bug#49362).
13856
13857 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13858
13859         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
13860         fix timezone handling problems on Windows.
13861         
13862         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
13863         asserts when the year is outside the range handled by ms the functions.
13864
13865         * class.c (setup_interface_offsets): If the class is an interface,
13866         fill out its interface_offsets slot.
13867
13868 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13869
13870         * threadpool.c: mark threadpool threads as background.
13871
13872 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
13873
13874         * decimal.c - define DECINLINE to nothing if not using GCC
13875
13876 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13877
13878         * assembly.c: More refcount fixes.
13879
13880 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13881
13882         * string-icalls.c: if we're not trimming, return the same string.
13883         When not splitting, don't create a new string.
13884
13885 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13886
13887         * image.c:
13888         (mono_image_open): increment the ref_count inside the critical section.
13889
13890 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
13891
13892         * image.c (mono_image_open): Fix reference counting bug.
13893
13894 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
13895
13896         * marshal.c (mono_marshal_type_size) struct alignment changed for 
13897         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
13898         64bits. Avoid leak in mono_marshal_get_native_wrapper when
13899         mono_lookup_pinvoke_call throws.        
13900
13901 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13902
13903         * reflection.c (mono_reflection_parse_type): Fix #49114.
13904
13905         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
13906         temporary workaround for cygwin header problem.
13907
13908         * object.c (mono_object_isinst): Synchronize this with the code
13909         generated by the JIT for casts.
13910
13911 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13912
13913         * reflection.c (encode_type): Fix #38332.
13914
13915 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13916
13917         * marshal.c (mono_marshal_method_from_wrapper): New function to return
13918         the original method from the wrapper method.
13919
13920 2003-09-25  Martin Baulig  <martin@ximian.com>
13921
13922         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
13923         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
13924         (ves_icall_Type_get_IsGenericInstance): New interncall.
13925
13926 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
13927
13928         * object.c: fix cast warning in big endian code.
13929
13930 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
13931
13932         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
13933         
13934 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13935
13936         * assembly.c: don't call check_env from mono_assembly_load. It's
13937         already done once in mono_assemblies_init and may cause headaches when
13938         multiple threads are loading assemblies.
13939
13940 2003-09-19  Martin Baulig  <martin@ximian.com>
13941
13942         * reflection.c (mono_reflection_define_generic_parameter): Don't
13943         allocate `klass->methods', set `klass->flags' to
13944         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
13945
13946 2003-09-18  Martin Baulig  <martin@ximian.com>
13947
13948         * class.c (mono_class_init): Don't create `class->methods' if it's
13949         already initialized.
13950
13951         * metadata.c (mono_metadata_load_generic_params): Make this
13952         actually work.
13953
13954         * reflection.c (mono_reflection_define_generic_parameter): Set
13955         parent class and interfaces from the constraints.
13956
13957         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
13958         to keep this struct in sync with the declaration in TypeBuilder.cs.
13959
13960 2003-09-17  Martin Baulig  <martin@ximian.com>
13961
13962         * metadata.h (MonoType): Replaced the data's `int type_param'
13963         field with `MonoGenericParam *generic_param'.
13964         (MonoGenericParam): Added `MonoClass *klass'.
13965
13966         * class.c (mono_class_from_gen_param): Removed the
13967         `MonoImage *image' and `int type_num' arguments.
13968
13969         * metadata.c (mono_metadata_parse_generic_param): New static
13970         method; creates a MonoGenericParam which just contains the index.
13971         (do_mono_metadata_parse_type): Call
13972         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
13973         MONO_TYPE_MVAR.
13974
13975         * reflection.c (mono_image_typedef_or_ref): Generic type
13976         parameters may be in the same assembly, but never use a typedef
13977         for them.
13978         (mono_reflection_define_generic_parameter): We're now creating a
13979         "real" class for the type parameter; it's now safe to call
13980         mono_class_from_mono_type() on the class'es type, it'll do the
13981         right thing.
13982
13983 2003-09-16  Martin Baulig  <martin@ximian.com>
13984
13985         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
13986         `symfile->range_entry_size' and `symfile->class_entry_size' here;
13987         the `symfile' data structure must be fully initialized before it
13988         gets added to the table.
13989
13990 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13991
13992         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
13993
13994         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
13995         class init trampolines.
13996
13997 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13998
13999         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
14000         to the built-in profiler to turn off time and allocation profiling
14001         respectively.
14002
14003 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14004
14005         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
14006         g_direct_equal.
14007
14008         * debug-helpers.c (mono_method_full_name): Print the wrapper type
14009         in human readable form.
14010
14011 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14012
14013         * reflection.c icall.c: Fixed warnings.
14014
14015         * image.c (load_class_names): Use a temporary hash table to hold the
14016         namespaces in order to avoid doing many string comparisons.
14017
14018         * image.h: Fix typo.
14019
14020         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
14021         Pass NULL instead of g_direct_equal to the GHashTable constructor 
14022         since the NULL case is short-circuited inside g_hash_table_lookup, 
14023         leading to better performance.  
14024
14025         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
14026         obtain the first custom attribute for a given index. Depends on the
14027         CustomAttribute table being sorted by the parent field.
14028
14029         * reflection.c (mono_custom_attrs_from_index): Use the new function 
14030         for better performance.
14031
14032 2003-09-07  Martin Baulig  <martin@ximian.com>
14033
14034         * class.c (mono_class_init): If we're a generic instance, inflate
14035         all our methods instead of loading them from the image.
14036         (mono_class_from_generic): Set `class->methods = gklass->methods'.
14037
14038 2003-09-07  Martin Baulig  <martin@ximian.com>
14039
14040         * mono-debug-debugger.c: Added support for constructors.
14041
14042 2003-09-06  Martin Baulig  <martin@ximian.com>
14043
14044         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
14045         New interncall.
14046
14047         * reflection.c (mono_reflection_setup_generic_class): Call
14048         ensure_runtime_vtable() to create the vtable.
14049
14050 2003-09-05  Martin Baulig  <martin@ximian.com>
14051
14052         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
14053         MONO_TYPE_MVAR.
14054
14055 2003-09-04  Martin Baulig  <martin@ximian.com>
14056
14057         * reflection.c (mono_reflection_define_generic_parameter): Generic
14058         parameters start with zero.
14059
14060 2003-09-04  Martin Baulig  <martin@ximian.com>
14061
14062         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
14063
14064         * reflection.h (MonoReflectionGenericParam): New typedef.
14065         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
14066         the generic parameters from the managed TypeBuilder.
14067
14068         * reflection.c (mono_reflection_define_generic_parameter): New function.
14069         (mono_reflection_create_runtime_class): Encode generic parameters.
14070         (mono_reflection_setup_generic_class): New function; this is
14071         called after adding adding all generic params to the TypeBuilder.
14072         (encode_type): Added MONO_TYPE_VAR.
14073
14074 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14075
14076         * class.h class.c (mono_class_needs_cctor_run): Moved this method
14077         here from the JIT.
14078
14079         * assembly.h assembly.c: Moved the AOT loading code into an assembly
14080         load hook.
14081
14082 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
14083
14084         * reflection.h reflection.c class.h class.c: Delete duplicate 
14085         definition of mono_type_get_name () from reflection.c and export the
14086         one in class.c.
14087
14088         * class.c: Class loading fixes from Bernie Solomon 
14089         (bernard@ugsolutions.com).
14090
14091         * reflection.c: Endianness fixes from Bernie Solomon 
14092         (bernard@ugsolutions.com).
14093         
14094 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14095
14096         * assembly.h assembly.c: Define a file format version for AOT
14097         libraries.
14098         
14099         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
14100
14101         * appdomain.h (MonoJitInfo): New field to determine whenever the
14102         code is domain neutral.
14103         
14104 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
14105
14106         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
14107
14108 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14109
14110         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
14111         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
14112         Avoid caching the result since strings must be domain specific. Fixes
14113         #48050.
14114
14115 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14116
14117         * marshal.c (mono_marshal_init): Make this callable multiple times
14118         since it is hard to find a correct place to call it.
14119
14120         * object.c (mono_runtime_class_init): Execute static constructors in
14121         the correct appdomain.
14122
14123         * image.c (build_guid_table): Handle the case when multiple images have
14124         the same GUID.
14125
14126 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14127
14128         * icall.c: added a couple of icalls for System.Web.
14129
14130 2003-08-28  Martin Baulig  <martin@ximian.com>
14131
14132         * icall.c (ves_icall_Type_BindGenericParameters): Use
14133         `klass->generic_inst' instead of `&klass->byval_arg' in the
14134         mono_type_get_object() call.  The returned type must be
14135         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
14136
14137 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14138
14139         * NOTES: New file.
14140
14141         * object.c (mono_class_proxy_vtable): Make it thread safe.
14142
14143         * pedump.c: Fix warning.
14144
14145         * object.c appdomain.h: Get rid of metadata_section. 
14146         It is no longer needed and it was causing deadlocks with domain->lock.
14147
14148         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
14149
14150 2003-08-26  Martin Baulig  <martin@ximian.com>
14151
14152         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
14153
14154 2003-08-26  Martin Baulig  <martin@ximian.com>
14155
14156         * pedump.c (main): Call mono_metadata_init(),
14157         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
14158         and mono_loader_init().
14159
14160 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
14161
14162         * loader.h: Add missing include to fix build.
14163
14164         * image.h: mono_image_load_references is no more.
14165
14166         * assembly.c: Reworked assembly loading to make it really thread safe.
14167         After these changes, the assembly returned by mono_assembly_open is
14168         fully initialized, i.e. all its references assemblies are loaded.
14169
14170         * assembly.c (mono_image_load_references): Renamed to 
14171         mono_assembly_load_references, and made private, since clients no
14172         longer need to call it.
14173
14174         * class.c: Removed calls to mono_assembly_load_references, since it was
14175         a source of deadlocks.
14176
14177         * loader.h loader.c class.h class.c: Protect data structures using a 
14178         new lock, the loader lock.
14179
14180         * class.c (mono_class_setup_vtable): Create temporary hash tables and
14181         GPtrArrays only when needed.
14182
14183         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
14184         into empty structures by mcs. Fixes pinvoke7.cs.
14185         
14186         * domain.c (mono_init): Call a new initialization function.
14187
14188         * appdomain.c (mono_runtime_init): Call the new initializer function
14189         of the marshal module.
14190
14191         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
14192         inserted into empty structures by mcs. Fixes pinvoke7.cs.
14193
14194         * marshal.h marshal.c: Added locks around the wrapper caches to make
14195         this module thread safe.
14196
14197         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
14198         this argument. Fixes pinvoke1.exe.
14199
14200 2003-08-25  Lluis Sanchez <lluis@ximian.com>
14201
14202         * object.h: Added call_type field to MonoMethodMessage and the corresponding
14203         enumeration of values. Removed fields to store remote call output values in
14204         MonoAsyncResult. Not needed any more.
14205         * object.c: Initialize call_type and async_result fields in mono_message_init.
14206         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
14207         dispatching the message.
14208         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
14209         async call to finish. To do it use a message with EndInvoke call type.
14210
14211 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14212
14213         * loader.h loader.c (mono_method_hash_marhal_info): New function which
14214         determines whenever a method has marshalling info.
14215
14216 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14217
14218         * assembly.c: fix the build on windows.
14219
14220 2003-08-22 Lluis Sanchez <lluis@ximian.com>
14221
14222         * object.cs: Fixed bug #47785.
14223
14224 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
14225
14226         * string-icalls.c (StringReplace): If their are no occurances of
14227         the old string found return a reference to the supplied
14228         string. This saves some memory and matches MS behavoir.
14229         
14230 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14231
14232         * socket-io.c: fixed compilation for systems that define AF_INET6
14233         and don't define SOL_IP/SOL_IPV6.
14234
14235 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
14236
14237         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
14238         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
14239
14240         * rawbuffer.c rawbuffer.h: Make this module thread safe.
14241
14242         * domain.c: Make this module thread safe.
14243
14244         * domain.c (mono_init): Call new initialization function.
14245
14246         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
14247         reference types too. Fixes #38812.
14248
14249         * image.c (mono_image_init): Fixed warnings.
14250
14251         * class.c (mono_class_from_typeref): Handle assembly load failure
14252         correctly.
14253
14254         * appdomain.c (add_assemblies_to_domain): Handle the case when
14255         the references of an assembly are not yet loaded.
14256
14257         * metadata.c image.c assembly.c: Moved initialization of global
14258         variables to a separate function called at startup since lazy 
14259         initialization of these variables is not thread safe.
14260         
14261         * image.c assembly.c: Made this module thread safe by adding locks in 
14262         the appropriate places.
14263
14264         * domain.c (mono_init): Call the new initialization functions of the
14265         three modules.
14266
14267 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
14268
14269         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
14270           make a direct call. It is proxy's work to make the call asynchronous.
14271           mono_delegate_end_invoke(): If the targe is a proxy, just collect
14272           the return values.
14273         * object.cs: mono_method_call_message_new(): read AsyncResult and
14274           state object from parameters list, if this info is requested.
14275         * object.h: Added fields to store remote call output values in
14276           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
14277
14278 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14279
14280         * object.h: add needed fields to MonoThread.
14281         * threads.c, threads.h: allow registering a function to cleanup data
14282         allocated per thread by the JIT.
14283
14284 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14285
14286         * loader.h: portability fix by Bernie Solomon
14287         * <bernard@ugsolutions.com>.
14288
14289 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
14290
14291         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
14292         return a MonoArray. This simplifies the code and also ensures that
14293         the cache allways contains an object reference as a value.
14294
14295         * icall.c (ves_icall_get_parameter_info): Simplified using the new
14296         function.
14297
14298 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14299
14300         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
14301         fixes a problem with byte ordering when getting the address family for
14302         a socket.
14303
14304 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
14305
14306         * .cvsignore: Added monosn.
14307
14308         * reflection.h reflection.c loader.c: Added support for parameter
14309         marshalling to dynamically created types. Fixes #47295.
14310
14311 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14312
14313         * rand.c: remove useless warnings.
14314
14315 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14316
14317         * class.c: implemented ldtoken for methods and fieldrefs.
14318
14319 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14320
14321         * threadpool.c: when mono_async_invoke was called, no one took care of
14322         monitoring the queue. So if the method invoked took some time and we
14323         got new async invoke requests after 500 ms (the thread created waited
14324         that long in WaitForSingleObject), the new async invoke was not called
14325         until the previous one finished.
14326
14327         This is fixed now. Thanks to Totte for helping with it.
14328
14329 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14330
14331         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
14332
14333 2003-08-11  Martin Baulig  <martin@ximian.com>
14334
14335         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
14336
14337 2003-08-06  Martin Baulig  <martin@ximian.com>
14338
14339         * mono-debug-debugger.c: Added support for static fields,
14340         properties and methods.
14341
14342 2003-08-06  Martin Baulig  <martin@ximian.com>
14343
14344         * mono-debug-debugger.c: Don't store the MonoString's vtable to
14345         make this work for applications with multiple application domains.
14346
14347 2003-08-04  Martin Baulig  <martin@ximian.com>
14348
14349         * mono-debug-debugger.c: Completely reworked the type support; the
14350         most important thing is that we're now just using one single
14351         `MonoType' instance per type.
14352
14353 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
14354
14355         * mono-endian.h, mono-endian.c, icall.c: Added icall
14356         ves_icall_System_Double_AssertEndianity to assert double word endianity
14357         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
14358
14359 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14360
14361         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
14362         support, icalls and fixes.
14363
14364 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
14365
14366         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
14367         classes that are a punctuation character in .NET is not the same a
14368         g_unichar_ispunct.
14369
14370 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14371
14372         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
14373
14374 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
14375
14376         * icall.c: Add new MemCopy internalcall.
14377         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
14378         Simplified code; It is not necessary to handle all the cases here,
14379         as the C# code takes care of it.  Only handle the case of the name
14380         resource embedded into the assembly.
14381
14382         Changed signature to return the data pointer and the size of the
14383         data. 
14384
14385 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
14386
14387         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
14388         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
14389
14390 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
14391
14392         * socket-io.c: ignore EINTR error in select.
14393
14394 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
14395
14396         * class.h, class.c: removed unused subclasses field in MonoClass.
14397
14398 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
14399
14400         * icall.c: improve fix of get_base_definition(). If the parent class
14401           doesn't have the mehod, look at the parent of the parent.
14402         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
14403           to check if a parameter is an in or out parameter
14404           (PARAM_ATTRIBUTE_IN is not set by default).
14405           mono_method_return_message_restore(): Use mono_class_value_size to
14406           get the size of a value type. mono_type_stack_size (parameterType)
14407           does not return the correct value if parameterType is byRef.
14408           mono_load_remote_field(), mono_load_remote_field_new(),
14409           mono_store_remote_field(), mono_store_remote_field_new():
14410           raise exception if the remote call returns an exception.
14411
14412 2003-07-28  Martin Baulig  <martin@ximian.com>
14413
14414         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
14415         method.  This is a wrapper around mono_runtime_invoke() which
14416         boxes the instance object if neccessary.
14417
14418 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14419
14420         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
14421         metadata.h, row-indexes.h, verify.c: first cut of generics support.
14422
14423 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14424
14425         * icall.c: disable mcs bug workaround.
14426
14427 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
14428
14429         * object.c (mono_runtime_class_init): Take the metadata_section
14430         mutex before obtaining the domain mutex.
14431
14432         * appdomain.h: Added definition of metadata_section mutex here. 
14433
14434         * object.c: define metadata_mutex here.
14435
14436 2003-07-24  Ravi Pratap  <ravi@ximian.com>
14437
14438         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
14439         fixed.
14440
14441 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
14442
14443         * reflection.c: Fix bug #46669
14444
14445 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14446
14447         * exception.c:
14448         * exception.h:
14449         * icall.c:
14450         * object.h: fill in the type name for TypeLoadException.
14451
14452 2003-07-23  Ravi Pratap  <ravi@ximian.com>
14453
14454         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
14455         relationship between TypeBuilders while compiling corlib) and bug
14456         45993 (Array types returned from the runtime while compiling
14457         corlib were from the loaded corlib).
14458
14459 2003-07-22  Martin Baulig  <martin@ximian.com>
14460
14461         * mono-debug-debugger.c: Reworked the type support a bit more;
14462         distinguish between types and classes.
14463
14464 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
14465
14466         * icall.c: add IsArrayImpl icall.
14467
14468 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
14469
14470         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
14471         initializing real_size only once. Also fix bug #46602.
14472
14473 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
14474
14475         * object.c: Renamed mono_metadata_section to metadata_section.
14476
14477 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
14478
14479         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
14480           empty array if the type is an array. Fixed.
14481           ves_icall_MonoMethod_get_base_definition: if the base method
14482           is abstract, get the MethodInfo from the list of methods of
14483           the class.
14484         * reflection.c: ParameterInfo.PositionImpl should be zero-based
14485           and it was 1-based. Fixed in mono_param_get_objects.
14486
14487 2003-07-20  Martin Baulig  <martin@ximian.com>
14488
14489         * mono-debug.h: Set version number to 31.
14490         (mono_debug_init): Added `MonoDomain *' argument.
14491
14492         * mono-debug-debugger.c: Reworked the type support; explicitly
14493         tell the debugger about builtin types; pass the `klass' address to
14494         the debugger.
14495
14496 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
14497
14498         * image.c: Allow new metadata tables to be loaded without a
14499         warning. Also update the warning message to give the new constant value.
14500                 
14501 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14502
14503         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
14504         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
14505         array type representation changes.
14506
14507 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14508
14509         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
14510         on Environment.Exit () call.
14511
14512 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14513
14514         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
14515         requires a matching corlib.
14516
14517 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
14518
14519         * Changelog: My editor decided to add a CR to each line. Sorry about that.
14520           Committed again without the CRs.
14521         
14522 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
14523
14524         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
14525           getting it from the "this" socket instance. Did not work
14526           if the socket is a subclass of Socket.
14527           Also fixed bug #35371.
14528
14529 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14530
14531         * metadata.c: fixed size for TypedByRef.
14532         * loader.c: when searching for a method, consider the vararg amrker.
14533         * unicode.c, decimal.c: constify some arrays.
14534
14535 2003-07-15  Dick Porter  <dick@ximian.com>
14536
14537         * socket-io.c: Fixed compilation for gcc < 3.2.
14538
14539         Fixed compilation for machines that don't have AF_INET6 (thanks to
14540         Bernie Solomon <bernard@ugsolutions.com> for that part.)
14541
14542         Fixed compile warnings.
14543         
14544         Fixed formatting and line endings.
14545
14546 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
14547
14548         * socket-io.h:
14549         * socket-io.c: Added IPv6 support.
14550
14551 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
14552
14553         * class.c (mono_class_is_assignable_from): New function to implement
14554         the is_assignable_from logic. Used by mono_object_isinst, 
14555         Type::IsAssignableFrom () and the interpreter.
14556
14557         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
14558         Object, even interfaces.
14559         
14560         * object.c (mono_object_isinst): Implement in terms of 
14561         is_assignable_from.
14562
14563         * icall.c (ves_icall_type_is_assignable_from): New icall.
14564
14565 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
14566
14567         * domain.c (foreach_domain): fix compiler warning.
14568
14569 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
14570
14571         * image.c (load_metadata_ptrs): use g_strndup because strndup is
14572         not available on all plattforms
14573
14574 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
14575
14576         * image.h image.c: Store the metadata version string in MonoImage.
14577         * icall.c: New icall to retrieve the image version.
14578         * reflection.c (create_dynamic_image): Fill in the image version field
14579         * reflection.c (build_compressed_metadata): Use the image version
14580         from the image structure.
14581
14582 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14583
14584         * appdomain.c: modified comment.
14585         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
14586         That will be its last iteration when mono_gc_cleanup is called from
14587         mono_runtime_cleanup and before the domain is unloaded.
14588
14589         Fixes bug #45962.
14590
14591 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
14592
14593         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
14594         attributes.
14595
14596 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14597
14598         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
14599         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
14600         Bernie Solomon <bernard@ugsolutions.com>.
14601
14602 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14603
14604         * object.c, object.h: provide mono_object_new_fast() for faster
14605         allocation in some special cases.
14606
14607 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14608
14609         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
14610         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
14611
14612 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14613
14614         * threadpool.c: fix leaks.
14615
14616 2003-07-01  Dick Porter  <dick@ximian.com>
14617
14618         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
14619         using MonoGHashTables.  Fixes threadpool bug posted to list.
14620
14621 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
14622
14623         * image.h, image.c: added support to load an assembly from a byte array.
14624         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
14625         assembly bundle support.
14626
14627 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
14628
14629         * threadpool.c (mono_thread_pool_add): keep a reference to the
14630         AsyncResult to prevent GC
14631
14632 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14633
14634         * class.c: leak fix.
14635
14636 2003-06-25  Dick Porter  <dick@ximian.com>
14637
14638         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
14639         for the async object, the WaitHandle object will close the handle.
14640         Fixes bug 45321.
14641
14642 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14643
14644         * class.c: in mono_array_class_get (), lookup from the hash with the
14645         same type we insert: this works around a bug in
14646         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
14647         lluis. The real fix will have to wait for after the release.
14648
14649 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14650
14651         * icall.c: fix memory leak when getting type members.
14652
14653 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14654
14655         * reflection.c: added more pubtoken special cases.
14656
14657 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14658
14659         * class.c: handle field offset correctly when class size
14660         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
14661
14662 2003-06-20  Martin Baulig  <martin@ximian.com>
14663
14664         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
14665         *image' field.
14666
14667 2003-06-20  Martin Baulig  <martin@ximian.com>
14668
14669         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
14670
14671 2003-06-20  Martin Baulig  <martin@ximian.com>
14672
14673         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
14674         just distinguish between variables in registers and variables at
14675         an offset relative to a register.
14676
14677 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14678
14679         * icall.c: #ifdef out latest changes until mcs is fixed.
14680
14681 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14682
14683         * icall.c: return members in metadata order.
14684
14685 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14686
14687         * icall.c: avoid infinite loop in GetTimeZoneData.
14688
14689 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14690
14691         * icall.c: added Marshal.Prelink/All icalls.
14692
14693 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
14694
14695         * object.c, object.h: fix warnings and do some overflow checking
14696         when creating arrays.
14697
14698 2003-06-17  Dick Porter  <dick@ximian.com>
14699
14700         * file-io.h:
14701         * file-io.c: File attributes need to be tweaked slightly when
14702         passed from the managed to the w32 world.
14703
14704 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14705         * profiler.h profiler-private.h profiler.c: Rework last patch
14706         based on suggestion by Paolo.
14707         
14708 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14709
14710         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
14711         instruction level coverage data collection.
14712         * profiler.h profiler.c (: Added new callback function which can be
14713         used by the profiler to limit which functions should have coverage
14714         instrumentation.
14715         * profiler.c (mono_profiler_load): Call g_module_build_path to
14716         generate the file name of the profiler library.
14717
14718 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14719
14720         * profiler.c, profiler.h, profiler-private.h: added basic block 
14721         coverage profiling API.
14722
14723 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
14724
14725         * reflection.c (mono_reflection_create_runtime_class): Add support
14726         for events in dynamically generated code.
14727
14728         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
14729         not allocated.
14730
14731 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14732
14733         * icall.c: when getting timezone info, return reasonable values if we
14734         can't get the actual data.
14735
14736 2003-06-14  Dick Porter  <dick@ximian.com>
14737
14738         * threads.c (start_wrapper): Remove the reference to the thread
14739         object in the TLS data, so the thread object can be finalized.
14740         This won't be reached if the thread threw an uncaught exception,
14741         so those thread handles will stay referenced :-( (This is due to
14742         missing support for scanning thread-specific data in the Boehm GC
14743         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
14744
14745 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
14746
14747         * reflection.c: ensure streams and tables are first allocated with
14748         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
14749
14750 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14751
14752         * icall.c: fixed GetElementType for byrefs (bug# 44792).
14753
14754 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
14755
14756         * reflection.c (mono_reflection_create_runtime_class): Add support for
14757         properties to dynamically created classes.
14758         * reflection.c: Fix a few places where non-MonoObjects were inserted
14759         into the tokens hashtable.
14760
14761 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14762
14763         * object.c: some support to handle out of memory exceptions.
14764
14765 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
14766
14767         * marshal.c (mono_marshal_get_native_wrapper): support reference
14768         return types
14769
14770 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14771
14772         * object.h, object.c: more portability stuff from Bernie Solomon.
14773         Unexport mono_object_allocate(). Added mono_object_unbox ().
14774         Set exitcode when an unhandled exception is thrown.
14775
14776 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
14777
14778         * marshal.c (mono_marshal_get_native_wrapper): use custom
14779         marshaler for return types.
14780
14781 2003-06-10  Dick Porter  <dick@ximian.com>
14782
14783         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
14784         ip_mreq is available
14785
14786 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14787
14788         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
14789         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
14790         by Bernie Solomon <bernard@ugsolutions.com>.
14791
14792 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
14793
14794         * gc.c (mono_gc_init): Avoid error message on shutdown when
14795         GC_DONT_GC=1 is used.
14796
14797         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
14798         New icall to return the GUID of a module.
14799
14800 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14801
14802         * class.c: ensure instance size always includes the parent's size
14803         even whem class size is set explicitly (fixes bug#44294).
14804
14805 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14806
14807         * profiler.h, profiler.c: made the simple profiler thread-safe,
14808         get more accurate timing info. Allow the loading of an
14809         externally-developed profiler module.
14810
14811 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
14812
14813         * marshal.c (mono_marshal_get_native_wrapper): improved
14814         class/byref arguments.
14815         (mono_marshal_get_native_wrapper): better string marshaling support.
14816
14817 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14818
14819         * class.c: ensure .pack and .size are handled correctly and
14820         simplified layout of static fields.
14821
14822 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14823
14824         * appdomain.c
14825         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
14826
14827         * loader.c (mono_lookup_pinvoke_call): look for modules in the
14828         current directory (fix bug 44008)
14829
14830 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
14831
14832         * marshal.c (mono_marshal_get_native_wrapper): started support for
14833         custom marshalers.
14834         (mono_delegate_to_ftnptr): consider marshalling specifications
14835
14836 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14837
14838         * reflection.c, reflection.h: emit custom marshal info.
14839
14840 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14841
14842         * object.c: free the GError.
14843         * icall.c: added CloseEvent_internal.
14844         * threads.[ch]:
14845         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
14846         call.
14847
14848 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
14849
14850         * loader.c (mono_method_get_signature): Add support for dynamic
14851         assemblies.
14852
14853 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14854
14855         * reflection.c: fixed bug #43905.
14856
14857 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14858
14859         * class.c, domain.c, icall.c, metadata.h, object.h: support for
14860         handling TypedReference and ArgIterator.
14861         * loader.c, loader.h: added function to get signature at call site.
14862
14863 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14864
14865         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
14866         data readonly. Buglets and warning fixes. Some MethodSpec support.
14867
14868 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14869
14870         * class.h, class.c, object.c: remove relative numbering support.
14871
14872 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
14873
14874         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
14875         free the string, until we get a chance to fix Gtk#
14876
14877 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14878
14879         * marshal.c: revert last patch.
14880
14881 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14882
14883         * icall.c: updates for new mono_class_vtable() not calling
14884         the type constructor anymore.
14885
14886 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14887
14888         * object.h, object.c: separate vtable creation from type
14889         initialization. Make running the .cctor thread safe.
14890
14891 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14892
14893         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
14894
14895 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14896
14897         * loader.c (mono_get_method): consider calling convention
14898
14899 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
14900
14901         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
14902         to return the invisible global type for a module.
14903
14904         * reflection.c (mono_image_build_metadata): Emit global fields too.
14905
14906 2003-05-20  Peter Williams  <peterw@ximian.com>
14907
14908         * loader.c (mono_lookup_internal_call): Add a few newlines.
14909
14910 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
14911
14912         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
14913         literal strings.
14914
14915         * appdomain.c (set_domain_search_path): Recalculate search path when
14916         AppDomainSetup.PrivateBinPath changes.
14917
14918         * object.c (mono_class_compute_gc_descriptor): It turns out some
14919         parts of the class libs (like System.Thread) holds pointers to
14920         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
14921         to treat native int a pointer type here.
14922         
14923 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
14924
14925         * appdomain.h, domain.c: add hashtable for jump target resolution.
14926
14927 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
14928
14929         * reflection.h reflection.c icall.c: Added new icalls 
14930         GetManifestResourceInfoInternal, GetModulesInternal and support
14931         infrastructure.
14932
14933 2003-05-16  Dick Porter  <dick@ximian.com>
14934
14935         * icall.c:
14936         * file-io.h:
14937         * file-io.c: Implement System.IO.MonoIO::GetTempPath
14938
14939 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
14940
14941         * object.c: mono_store_remote_field: little fix to previous patch.
14942
14943 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14944
14945         * class.c: add constructors to array classes.
14946         * icall.c: special case array construction for InternalInvoke (),
14947
14948 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
14949
14950         * class.h class.c reflection.c object.c: Added support for field
14951         defaults in dynamically generated classes.
14952
14953 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14954
14955         * reflection.c: properly encode charset for ddlimport.
14956
14957 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14958
14959         * threads.c: allow compiling without GC.
14960
14961 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14962
14963         * appdomain.h, object.c, object.h, threads.c, threads.h: added
14964         handling of thread static data.
14965
14966 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14967
14968         * reflection.h, reflection.c: added mono_custom_attrs_free ().
14969
14970 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14971
14972         * class.c (mono_array_class_get): always set the serializable flags
14973         (mono_array_class_get): always set the SEALED attribute for array types
14974
14975 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
14976
14977         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
14978         attributes (fix for bug 42021).
14979
14980 2003-05-12  Dick Porter  <dick@ximian.com>
14981
14982         * gc.c: Don't run finalizers when the finalizer thread is
14983         finishing up, because the default domain has already been
14984         destroyed.
14985
14986 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
14987
14988         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
14989         value is null, we should throw an exception.   This is slightly
14990         different than the other conventions used for the constructor.
14991
14992 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14993
14994         * socket-io.c: fixed windows build.
14995
14996 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14997
14998         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
14999
15000 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
15001
15002         * object.c (mono_string_new_wrapper): Compatibility fix for MS
15003         compilers.
15004
15005 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
15006
15007         * class.c (mono_class_layout_fields): Add experimental GC aware
15008         auto layout facility. Requires class library changes to work correctly.
15009
15010         (mono_class_setup_vtable): Avoid overriding explicit interface
15011         method implementations. Fixes iface3.exe test.
15012
15013         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
15014         object reference.
15015         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
15016         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
15017
15018         * metadata.h: Add new type classification macro which determines
15019         whenever the type holds an object reference.
15020
15021 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15022
15023         * marshal.c (mono_marshal_get_native_wrapper): cleanups
15024
15025 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
15026
15027         * gc.c (finalizer_thread): Work around a GC bug.
15028
15029 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
15030
15031         * marshal.c (emit_struct_conv): allow unions
15032
15033         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
15034
15035 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
15036
15037         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
15038
15039 2003-05-06  Martin Baulig  <martin@ximian.com>
15040
15041         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
15042
15043 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15044
15045         * socket-io.c:
15046         (Select_internal): allow NULLs, don't create arrays if not needed.
15047         Coupled with Socket.cs changes.
15048
15049         * threadpool.c:
15050         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
15051         register a finalizer for it that will close the semaphore handle. This
15052         fixes the leak and make Lupus' test run with > 4080 loops.
15053
15054 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15055
15056         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
15057         Jerome Laban (bug #42287)
15058
15059 2003-05-02  Martin Baulig  <martin@ximian.com>
15060
15061         * debug-mono-symfile.h
15062         (MonoSymbolFile): Moved declaration into mono-debug.h.
15063         (MonoDebugMethodJitInfo): Likewise.
15064         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
15065         argument.
15066         (_mono_debug_address_from_il_offset): Take a
15067         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
15068
15069         * mono-debug.h
15070         (MonoDebugDomainData): New struct.
15071         (mono_debug_get_domain_data): New function.
15072         (mono_debug_add_method): Take an additional `MonoDomain *'
15073         argument.
15074         (mono_debug_source_location_from_address): Likewise.
15075         (mono_debug_il_offset_from_address): Likewise.
15076         (mono_debug_address_from_il_offset): Likewise.
15077
15078 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
15079
15080         * reflection.c: one more check for null type in custom attrs.
15081
15082 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15083
15084         * reflection.c: avoid warning (comparison is always false due to limited
15085         range of data type).
15086
15087 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15088
15089         * icall.c: throw an exception in Type.GetField if the argument 'name'
15090         is NULL.
15091
15092 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
15093
15094         * reflection.c: fixed handling of enums in named arguments to custom
15095         attributes (bug #42123).
15096
15097 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15098
15099         * reflection.c: use the right array element type and handle
15100         a null for a Type argument, too.
15101
15102 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
15103
15104         * reflection.c: handle arrays as arguments to custom attributes.
15105
15106 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
15107
15108         * reflection.c: handle a string value in a custom attr
15109         ctor that takes an object.
15110
15111 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15112
15113         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
15114         (fix bug #42063)
15115
15116 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15117
15118         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
15119
15120 2003-04-27  Martin Baulig  <martin@ximian.com>
15121
15122         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
15123         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
15124         MONO_DEBUGGER_EVENT_BREAKPOINT.
15125         (mono_breakpoint_trampoline_code): Removed.
15126         (mono_debugger_event_handler): The last argument is now a
15127         `guint32'.
15128         (mono_debugger_insert_breakpoint_full): Removed the
15129         `use_trampoline' argument.
15130         (mono_debugger_method_has_breakpoint): Likewise.
15131         (mono_debugger_trampoline_breakpoint_callback): Renamed to
15132         mono_debugger_breakpoint_callback(); take the method and
15133         breakpoint number as arguments.
15134
15135 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15136
15137         * metadata.c: fix off by one when loading parameters attributes.
15138
15139 2003-04-24  Martin Baulig  <martin@ximian.com>
15140
15141         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
15142
15143 2003-04-24  Martin Baulig  <martin@ximian.com>
15144
15145         * mono-debug-debugger.c: Moved all code which interacts with the
15146         Mono Debugger here.
15147
15148         * debug-mono-symfile.c: This code now just deals with the symbol
15149         file itself, the debugger code is now in mono-debug-debugger.c.
15150
15151 2003-04-23  Martin Baulig  <martin@ximian.com>
15152
15153         * mono-debug.c (mono_debug_source_location_from_il_offset):
15154         New method; like mono_debug_source_location_from_address(), but
15155         takes an IL offset instead of a machine address.
15156
15157 2003-04-23  Martin Baulig  <martin@ximian.com>
15158
15159         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
15160         `line' field; this is now computed by the debugger.
15161
15162 2003-04-23  Martin Baulig  <martin@ximian.com>
15163
15164         * mono-debug.[ch]: New files.  This is the new debugging interface.
15165
15166         * mono-debug-debugger.[ch]: New files.  Moved all code which
15167         interacts with the Mono Debugger here.
15168
15169 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15170
15171         * domain.c (mono_init): initialize mono_defaults.monitor_class
15172
15173 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
15174
15175         * reflection.c (method_encode_code): Add a spicy exception to help
15176         future compiler authors.
15177
15178 2003-04-21  Martin Baulig  <martin@ximian.com>
15179
15180         * icall.c
15181         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15182         Make this work with relative pathnames; g_filename_to_uri() needs
15183         an absolute filename.
15184
15185 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
15186
15187         * icall.c: Track name changes in Object and ValueType.
15188
15189 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
15190
15191         * metadata.c (mono_type_stack_size): size should be a multiple of
15192         sizeof (gpointer)
15193
15194 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15195
15196         * gc.c:
15197         (internal_domain_finalize): moved into mono_domain_finalize. No need
15198         to create another thread because the finalizers will be run in the
15199         finalizer thread.
15200         
15201         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
15202         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
15203         to be run (MS does this too).
15204
15205 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15206
15207         * object.c (mono_class_compute_gc_descriptor): Update comment.
15208
15209         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
15210
15211         * image.h: Add synchronized wrapper cache.
15212
15213         * image.c (do_mono_image_open): Initialize cache.
15214
15215         * reflection.c (create_dynamic_mono_image): Initialize cache.
15216
15217 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15218
15219         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
15220         ves_icall_System_Buffer_ByteLengthInternal.
15221
15222 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15223
15224         * reflection.c: setup klass->nested_in earlier. Allow
15225         a dash in the assembly name.
15226
15227 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
15228
15229         * metadata.c (mono_type_to_unmanaged): dont access
15230         type->data.klass for MONO_TYPE_OBJECT
15231         (mono_type_to_unmanaged): consider System.Delegate class
15232
15233 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
15234
15235         * class.c: just setup supertypes in the proper place instead of
15236         initializing the full element class for arrays.
15237
15238 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15239
15240         * class.c: ensure the element class of arrays is initialized.
15241         Setup the supertype info for array classes, too.
15242
15243 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
15244
15245         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
15246
15247 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15248
15249         * Makefile.am: re-added -m option when running cygpath. This way,
15250         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
15251         separator.
15252         * mono-config.c: same codepath for locating mono config file for WIN32
15253         and the rest.
15254         * assembly.c: if mono_assembly_setrootdir is called, don't override
15255         the value set.
15256
15257 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15258
15259         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
15260         MONO_ASSEMBLIES variable.
15261
15262 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15263
15264         * icall.c: added Assembly::GetNamespaces() icall.
15265
15266 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15267
15268         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
15269
15270 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
15271
15272         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
15273         * object.c: fixed bug in the construction of vtable for proxies
15274
15275 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15276
15277         * object.c (mono_array_new): Mark mono_array_new as an icall.
15278
15279 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15280
15281         * class.c: fixed test for public method when overriding interfaces.
15282         Closes bug #40970.
15283
15284 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15285
15286         * appdomain.h, domain.c: added mono_domain_foreach() to
15287         be able to access the currently loaded appdomains.
15288         * object.c: make string interning work across sppdomains.
15289         Mark some functions for use as icalls.
15290
15291 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15292
15293         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
15294
15295         * reflection.h reflection.c: Allocate long living data using 
15296         GC_MALLOC_ATOMIC so the collector does not need to scan it.
15297
15298         * reflection.c: Double the allocation size in streams instead of
15299         increasing it, to prevent unneccesary copying on large assemblies.
15300         
15301         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
15302         creation if the assembly does not have the Run flag set.
15303
15304 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15305
15306         * class.h: avoid the C++ keywords in header files (Jerome Laban
15307         spotted and fixed this).
15308
15309 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15310
15311         * object.c:
15312         (mono_unhandled_exception): fill in the arguments for the
15313         UnhandledException event. Only trigger that event for the default
15314         domain (as MS does).
15315
15316 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
15317
15318         * object.c: Improve typed allocation stuff based on suggestions from
15319         Paolo. Also turn it on if the GC library supports it.
15320
15321 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
15322
15323         * object.c object.h class.h: Added experimental typed allocation
15324         facility using the interfaces in gc_gcj.h.
15325
15326         * os/gc_wrapper.h: Added new include files.
15327         
15328 2003-04-03  Martin Baulig  <martin@ximian.com>
15329
15330         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
15331         which is not yet enabled by default.
15332
15333         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
15334         functions.
15335         (mono_gc_lock, mono_gc_unlock): New static functions.
15336
15337         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
15338         functions; stop/start the world for the garbage collector.  This
15339         is using the windows API; we need to complete the SuspendThread()/
15340         ResumeThread() implementation in the io-layer to make this work on Unix.
15341         (mono_gc_push_all_stacks): New public function; tells the garbage
15342         collector about the stack pointers from all managed threads.
15343
15344 2003-04-03  Martin Baulig  <martin@ximian.com>
15345
15346         * object.h (MonoThread): Added `gpointer stack_ptr'.
15347
15348         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
15349
15350 2003-04-03  Martin Baulig  <martin@ximian.com>
15351
15352         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
15353
15354 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
15355
15356         * reflection.c (typebuilder_setup_fields): Initialize field.first and
15357         field.last.
15358
15359 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
15360
15361         * loader.c (mono_lookup_internal_call): Report the corlib that is
15362         out of sync.
15363
15364 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
15365
15366         * icall.c (ves_icall_type_GetTypeCode): fixed check for
15367         System.DBNull (it's class not valuetype).
15368
15369 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15370
15371         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
15372         if the array method was already assigned a token (fixes bug#40646).
15373
15374 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
15375
15376         * reflection.c (mono_reflection_get_type): Attempt type resolve even
15377         if no assembly is given.
15378
15379 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
15380
15381         * metadata.h: Added the new tables.
15382
15383         * row-indexes.h: Added definitions for new tables.
15384
15385         * metadata.c: Add schemas for new tables, and add support for
15386         computing the sizes of them.
15387
15388         * class.c: Update for handling the new type cases.
15389
15390 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
15391
15392         * metadata.h (MONO_TYPE_IS_VOID): new macro
15393
15394 2003-03-31  Martin Baulig  <martin@ximian.com>
15395
15396         * threads.h (MonoThreadCallbacks): Added `thread_created'.
15397
15398         * threads.c (mono_thread_new_init): Call `thread_created' in the
15399         mono_thread_callbacks.
15400
15401 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
15402
15403         * loader.h: added marshalbyrefobject_class to mono_defaults
15404         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
15405         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
15406           generation of output parameters.
15407           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
15408         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
15409           contextbound and the target object belongs to the context of the caller.
15410         * object.h: added context and unwrapped_server variables in MonoRealProxy.
15411         * object.c: Implemented support for interfaces and abstract classes
15412           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
15413           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
15414
15415 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
15416
15417         * class.h class.c (mono_class_is_subclass_of): New function.
15418         
15419         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
15420         routines for most common case (calls from ArrayList::ToArray).
15421
15422         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
15423         routine so programs which call Environment::Exit() can be profiled.
15424
15425         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
15426         Added MONO_ARCH_SAVE_REGS.
15427
15428         * icall.c (ves_icall_type_is_subtype_of): Use new function.
15429
15430 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
15431
15432         * blob.h: Add a couple of new MonoType types definitions.
15433
15434         * tabledefs.h: Add a couple of new call convs.
15435
15436 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
15437
15438         * reflection.h (MonoReflectionDynamicAssembly): track changes in
15439         the layout of the class.
15440
15441         * reflection.c (alloc_table): double the size on overflow to avoid
15442         unnecessary copying.
15443
15444         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
15445         avoid filling out metadata tables and blobs. Also set mb->ilgen to
15446         null so it can be garbage collected.
15447         
15448 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
15449
15450         * reflection.c (mono_reflection_get_type): Return the resolved type
15451         only if it is in the assembly we searched.
15452
15453         * reflection.c (ensure_runtime_vtable): Initialize method slots.
15454
15455         * class.c (mono_class_setup_vtable): Set the slot of the overriding
15456         method.
15457
15458 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15459
15460         * appdomain.c:
15461         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
15462         the right one is 'file:///blah', but MS allows it.
15463         * assembly.c:
15464         (mono_assembly_open): allow 'file://blah'
15465
15466         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
15467
15468 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
15469
15470         * socket-io.c: fixes bug #40310.
15471
15472 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
15473
15474         * reflection.c (mono_reflection_parse_type): handle deeply nested
15475         types correctly.
15476
15477         * reflection.c (mono_image_create_token): Use unique token values
15478         since they will be put into a hash table.
15479
15480         * class.c (mono_class_setup_vtable): If a method occurs in more than
15481         one place in the vtable, and it gets overriden, then change the
15482         other occurances too.
15483
15484         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
15485         object as return type.
15486
15487 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
15488
15489         * icall.c: Deleted "ToString" implementation for double and float
15490         because they are full implemented in managed code.
15491
15492 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15493
15494         * reflection.c, reflection.h: implemented and exported functions
15495         to retrieve info about custom attributes.
15496
15497 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15498
15499         * appdomain.c: moved Uri handling to assembly.c
15500         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
15501         work when using a file Uri in *nix and windows.
15502
15503         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
15504         GetReferencedAssemblies.
15505
15506 2003-03-18  Dick Porter  <dick@ximian.com>
15507
15508         * icall.c: Rename a couple of internal calls
15509
15510         * threads.c: Set the thread state to Stopped when a thread exits.
15511         Fixes bug 39377.
15512
15513 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
15514
15515         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
15516         New icall.
15517
15518         * object.c (mono_class_vtable): fix warning.
15519
15520 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
15521
15522         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
15523
15524         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
15525         memory.
15526         (method_encode_clauses): Create exception info structures in the right
15527         order.
15528         (mono_reflection_setup_internal_class): Initialize supertypes field.
15529
15530         * class.c object.c: Handle interfaces which implement other interfaces 
15531         correctly.
15532
15533         * class.h class.c: Move the supertypes array initialization code into 
15534         a separate function so it can be used for dynamic types too. Also call
15535         it earlier, in mono_class_init(), since it can be used before the
15536         type is initialized.
15537
15538 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15539
15540         * Makefile.am:
15541         * assembly.c:
15542         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
15543
15544         * appdomain.c:
15545         * appdomain.h:
15546         * marshal.c:
15547         * object.c: remove warnings.
15548
15549 2003-03-13  Martin Baulig  <martin@ximian.com>
15550
15551         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
15552         (MonoDebugLexicalBlockEntry): New types.
15553
15554         * debug-mono-symfile.c
15555         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
15556
15557 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15558
15559         * process.c: ret can be any non-zero value accroding to MS doc.
15560
15561 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
15562
15563         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
15564         fixing a warning for a miss-used prototype, would have cause
15565         random memory corruption.
15566
15567 2003-03-07  Martin Baulig  <martin@ximian.com>
15568
15569         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
15570         getting really annoying ....
15571
15572 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
15573
15574         * reflection.c (fixup_method): added support for array methods.
15575
15576 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15577
15578         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
15579         (pointed out by Michael Adams).
15580
15581 2003-03-04  Dick Porter  <dick@ximian.com>
15582
15583         * icall.c: Temporarily reverted the Double and Single ToString()
15584         change, because it broke nunit.
15585
15586 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
15587
15588         * object.h, threads.h: make include files compatible with C++
15589         (patch by Jerome Laban <jlaban@wanadoo.fr>).
15590
15591 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
15592
15593         * icall.c: Erased ToString helper functions for Double and Single.
15594         Now, that implementations ar all in managed code (Double and Single
15595         Formatters).
15596
15597 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
15598
15599         * appdomain.c: Added method for initializing the default context of
15600         a domain. Added internal call for getting the default context.
15601         * appdomain.h: Added context variable in MonoDomain struct.
15602         * domain.c: mono_domain_set also sets the default context of the domain
15603         * icall.c: Mapped internal method InternalGetDefaultContext.
15604         * object.c: mono_object_get_virtual_method returns always a remoting
15605         wrapper if the object is a transparent proxy.
15606         mono_runtime_invoke_array: when creating an object by calling the
15607         constructor, if the created object is a proxy, then the constructor should
15608         be called using the a remoting wrapper.
15609
15610 2003-03-03  Dick Porter  <dick@ximian.com>
15611
15612         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
15613         variable so it compiles on solaris.  Problem spotted by
15614         Christopher Taylor <ct@cs.clemson.edu>
15615
15616 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15617
15618         * appdomain.c:
15619         (get_info_from_assembly_name): don't leak value.
15620
15621         * icall.c:
15622         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
15623         result.
15624
15625 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15626
15627         * assembly.c: export mono_image_load_references ().
15628         * class.c: handle function pointers. mono_class_from_name() now
15629         supports nested type names directly.
15630
15631 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
15632
15633         * reflection.h reflection.c: Encode already created dynamic methods 
15634         and fields correctly as a DEF instead of a REF.
15635
15636         * reflection.c: Get rid of the force_ref argument to 
15637         mono_image_typedef_or_ref since it was wrong in the first place.
15638
15639         * string-icalls.c: add error checking to string constructors according
15640         to the MSDN docs.
15641
15642         * reflection.c: Emit types in the order their TypeBuilders were 
15643         created. Previously, a new table index was assigned to each type before
15644         the tables were emitted. This was wrong because the signature blob
15645         might already refer to a type by its original table index.
15646
15647 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
15648
15649         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
15650         change.
15651         
15652 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15653
15654         * Makefile.am: make assemblies dir have \ instead of / on windows.
15655
15656 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
15657
15658         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
15659         iterate over the NESTEDCLASS table using a linear search since the
15660         table is not guaranteed to be sorted by the secondary key.
15661
15662         * class.c (mono_class_create_from_typedef): fixed up call to
15663         mono_metadata_nesting_typedef.
15664         
15665 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
15666
15667         * marshal.c (mono_string_to_byvalstr): clear the memory as
15668         suggested by Jerome Laban <jlaban@wanadoo.fr>
15669
15670 2003-02-26  Dick Porter  <dick@ximian.com>
15671
15672         * process.c: Cope with padding in .rsrc blocks
15673
15674 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
15675
15676         * metadata.h: reverted the filter_len change, it breaks reflection
15677         
15678 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
15679
15680         * metadata.h: added a new field to store the filter_len
15681         
15682
15683 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15684
15685         * reflection.c: handle custom attributes for types and members
15686         created with Reflection.Emit (bug#38422).
15687
15688 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
15689
15690         * reflection.c: define RTSpecialName automatically for constructors for
15691         compatibility with MS.NET.
15692
15693         * reflection.c (mono_reflection_create_runtime_class): initialize
15694         nested_in field of dynamically created classes.
15695
15696 2003-02-22  Martin Baulig  <martin@ximian.com>
15697
15698         * debug-mono-symfile.h: Incremented version number.
15699
15700 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
15701
15702         * object.h icall.c process.c: fix warnings.
15703
15704 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
15705
15706         * appdomain.h appdomain.c:
15707         (mono_domain_try_type_resolve): split the 
15708         name_or_tb argument into a name and a tb argument.
15709         (mono_domain_has_type_resolve): new function to check whenever the
15710         application has registered a TypeResolve event handler.
15711         
15712         * icall.c reflection.h reflection.c: move the type resolve logic into
15713         mono_reflection_get_type () so it will be invoked when 
15714         Assembly::GetType () is called.
15715
15716         * reflection.c:
15717         (mono_reflection_get_type): renamed to get_type_internal.
15718         (mono_reflection_get_type): fixed type name generation so it works 
15719         for nested types too.
15720         (mono_reflection_get_type): call has_type_resolve () to avoid the 
15721         costly type name generation if there is no resolve event handler.
15722
15723 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15724
15725         * class.c, image.c: load exported types from file references.
15726
15727 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
15728
15729         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
15730           used to cache the managed methods used to create proxies and make 
15731           remote invocation of methods.
15732         * class.h: Added in MonoVTable a flag to indicate that a class needs 
15733           to be remotely created.
15734         * object.c: Modified the method mono_class_vtable(). It now initializes 
15735           the remote flag of the vtable. Modified mono_object_new_specific(), 
15736           so now it checks the remote flag.
15737         * icall.c: Added a couple of internal methods, one for enabling instance 
15738           creation interception for a type, and one for creating objects bypassing
15739           the remote check.
15740
15741 2003-02-18  Martin Baulig  <martin@ximian.com>
15742
15743         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
15744         New interncall to get a method's metadata token.
15745
15746         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
15747         New interncall for the debugger.
15748
15749 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
15750
15751         * class.c (mono_class_setup_vtable): allocate supertype array
15752
15753 2003-02-18  Martin Baulig  <martin@ximian.com>
15754
15755         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
15756
15757 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15758
15759         * reflection.c:
15760         (assembly_name_to_aname): jump over unknown properties (i've found
15761         something like: 'type, assembly, version=xxx, custom=null, public...',
15762         so now will ignore custom=null and still get the rest of the values).
15763
15764 2003-02-17  Dick Porter  <dick@ximian.com>
15765
15766         * threads.c: Have Thread.Start() wait for a semaphore to signal
15767         that the thread has set up all its local data.  This fixes bug
15768         34323, where Abort() raced the new thread's TLS data.
15769
15770         Also removes the handle_store() call from start_wrapper, because
15771         threads are now always created suspended and there is no longer a
15772         race between the parent and child threads to store the info.
15773
15774 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
15775
15776         * image.c: explain the #- heap issue in a message, hopefully
15777         avoiding FAQs on mono-list.
15778
15779 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15780
15781         * icall.c:
15782         (GetEntryAssembly): if the domain has not invoked
15783         AppDomain.ExecuteAssembly yet, return the assembly of the default
15784         AppDomain.
15785
15786 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
15787
15788         * class.c (mono_ldtoken): make it work in dynamic assemblies.
15789
15790 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15791
15792         * metadata.c, reflection.c: simple speedup to type hash
15793         and equals code.
15794
15795 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
15796
15797         * image.c, image.h, class.c, assembly.c: move module loading
15798         to MonoImage. When loading metadata, consider alignemnet from
15799         the start of metadata, not from the metadata address in memory.
15800
15801 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
15802
15803         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
15804         AssemblyBuilder objects. Factored out custom attribute creation into
15805         a separate function.
15806         (create_custom_attr): new function to create custom attributes.
15807
15808 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
15809
15810         * Makefile.am: Got tired of typing the full pathname to pedump.
15811         Until there is another option, am installing this.
15812
15813 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
15814
15815         * class.c (class_compute_field_layout): always set field->parent 
15816         (mono_ldtoken): use mono_defaults.fieldhandle_class;
15817
15818 2003-02-11  Dick Porter  <dick@ximian.com>
15819
15820         * threads-types.h:
15821         * monitor.c: Rewrote Monitor, making lock much faster and
15822         Pulse/Wait work as specified.  Also uses much fewer handles, and only
15823         creates them as needed.
15824
15825         * exception.c: Added SynchronizationLockException
15826
15827         * threads.c: Deleted old Monitor implementation.  The new one is
15828         in a new file.
15829
15830 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15831
15832         * class.c: handled TypedReference type code. Set the correct size for
15833         class data. Setup interface_offsets for interface classes, too.
15834
15835 2003-02-09  Martin Baulig  <martin@ximian.com>
15836
15837         * debug-mono-symfile.h: Reflect latest symbol writer changes.
15838
15839 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
15840
15841         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
15842         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
15843         * object.c: fixed mono_object_get_virtual_method () for interfaces.
15844         * verify.c: check for code that runs after the end of the method.
15845
15846 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
15847
15848         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
15849         "System.Math::Round2".
15850         * sysmath.h: Added Floor, Round and Round2 definitions.
15851         * sysmath.c: Modified certain functions that were not 100% compliant
15852         with MS.NET (math precision) and added the implementation of Floor,
15853         Round and Round2.
15854
15855 2003-02-07  Martin Baulig  <martin@ximian.com>
15856
15857         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
15858
15859 2003-02-07  Martin Baulig  <martin@ximian.com>
15860
15861         * debug-mono-symfile.c: Reflected latest symwriter changes.
15862         (mono_debug_create_mono_symbol_file): Removed.
15863         (mono_debug_open_mono_symbol_file): Take an argument which
15864         specifies whether to create a dynamic symbol file.
15865
15866 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
15867
15868         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
15869
15870 2003-02-05  Martin Baulig  <martin@ximian.com>
15871
15872         * reflection.c (mono_image_build_metadata): Make this public,
15873         protect it against being called multiple times, don't create
15874         resources and don't build the compressed metadata here.
15875         (mono_image_create_pefile): Do this here.
15876
15877         * icall.c
15878         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
15879
15880 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15881
15882         * socket-io.c: fixed bug #36322.
15883
15884 2003-02-06  Piers Haken <piersh@friskit.com>
15885
15886         * appdomain.[ch]:
15887         * class.h:
15888         * debug-mono-symfile.c:
15889         * icall.c:
15890         * loader.c:
15891         * mono-config.c:
15892         * monosn.c:
15893         * reflection.c:
15894         * socket-io.c: warning cleanups
15895
15896 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
15897
15898         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
15899         function. works like remoting invoke, but does a check for the Proxy first.
15900
15901 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
15902
15903         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
15904
15905 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
15906
15907         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
15908         array of pointers.
15909         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
15910         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
15911
15912         * object.c (mono_store_remote_field_new): used by the new jit
15913         instead of mono_store_remote_field
15914         (mono_load_remote_field_new): used by the new jit
15915         instead of mono_load_remote_field
15916
15917 2003-02-05  Patrik Torstensson
15918
15919         * appdomain.c: changed unload to take the domain id instead
15920         of domain
15921         
15922         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
15923
15924
15925 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15926
15927         * appdomain.c: don't look for assemblies in ApplicationBase if
15928         PrivateBinPathProbe is set.
15929
15930 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15931
15932         * object.c: make the first argument in main_args contain the absolute
15933         path to the assembly. Fixes bug #37511.
15934
15935 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15936
15937         * icall.c: get correct UTC offset for countries not using daylight
15938         time saving. Fixes bug #30030.
15939
15940 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15941
15942         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
15943         and 1 are the family).
15944
15945 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
15946
15947         * icall.c (ves_icall_InternalExecute): removed wrong assertion
15948
15949         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
15950
15951 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
15952
15953         * reflection.c: added support for SignatureHelper tokens, which is
15954         needed by the Calli opcode.
15955
15956         * reflection.h: track changes to SignatureHelper class.
15957
15958         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
15959
15960 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15961
15962         * appdomain.c: fixed loading assemblies from PrivateBinPath.
15963
15964 2003-02-03  Patrik Torstensson
15965         * appdomain.[c|h], domain.c : 
15966          - Added support for getting a domain via domain id
15967          - Support for setting and getting domain from System.AppDomain 
15968            (used in cross appdomain channel)
15969          - Added support for get/set for a MonoAppContext on a thread 
15970            (Context class in System.Runtime.Remoting.Contexts),
15971          - Removed hack in Get/SetData and ExecuteAssembly.
15972         
15973         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
15974         the managed world to get control when a proxy is created.
15975
15976         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
15977         
15978 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
15979
15980         * icall.c
15981         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
15982         Populate the codebase field as well.
15983
15984 2003-02-02  Martin Baulig  <martin@ximian.com>
15985
15986         * debug-mono-symfile.c
15987         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
15988         (mono_debug_symfile_add_method): Allow interncalls.
15989
15990 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15991
15992         * icall.c: throw parse exception if strtod fails or the string is empty.
15993
15994 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
15995
15996         * marshal.c: handle object type separately from defined
15997         class types.
15998
15999 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
16000
16001         * marshal.c: handle NATIVE_LPSTR for strings when it's
16002         explicitly specified.
16003
16004 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
16005
16006         * reflection.c, reflection.h, icall.c: setup the reflection
16007         handle cache for ModuleBuilders and AssemblyBuilders.
16008
16009 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
16010
16011         * reflection.c (reflection_methodbuilder_to_mono_method): set
16012         pinvoke flag
16013
16014 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16015
16016         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
16017
16018 2003-01-29  Dick Porter  <dick@ximian.com>
16019
16020         * threads.c: No need for the fake_thread kludge now that Thread
16021         doesn't run a class constructor
16022         
16023 2003-01-29  Dick Porter  <dick@ximian.com>
16024
16025         * threads.c: Use g_direct_hash instead of the rather bogus
16026         g_int_hash
16027
16028 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
16029
16030         * marshal.c (mono_marshal_get_native_wrapper): add check for null
16031         (fix pinvoke12.exe)
16032         (mono_marshal_get_struct_to_ptr): generate valid IL code
16033         (mono_marshal_get_ptr_to_struct): generate valid IL code
16034         (*): correctly set sig->pinvoke, we need to memdup the signature
16035         to do that
16036
16037 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16038
16039         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
16040         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
16041
16042 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16043
16044         * profiler.c: provide more callers information.
16045
16046 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
16047
16048         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
16049
16050         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
16051
16052         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
16053
16054 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16055
16056         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
16057         exception instead of going into an infinite loop on dates which it 
16058         can't yet handle.
16059
16060         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
16061         out-of-range exception if needed.
16062
16063         * class.c (mono_class_setup_vtable): allow a virtual method to provide
16064         an implementation for an interface method and to override an inherited
16065         method at the same time. 
16066         Imagine a scenario when a virtual method is used to override a
16067         virtual abstract method in a parent class, and this same method 
16068         provides an implementation for an method inherited from an interface. 
16069         In this case, the interface resolution code will set im->slot, which 
16070         means that the virtual method override pass will skip this method 
16071         which means a pointer to the abstract method inherited from the parent
16072         will remain in the vtable of this non-abstract class.
16073
16074         * class.c: (mono_class_setup_vtable): continue search for a real 
16075         method if only an abstract method is found.     
16076
16077 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
16078
16079         * reflection.c: add size to encoding for ByValStr and ByValArray
16080         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
16081
16082 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16083
16084         * class.c (mono_class_setup_vtable): pass the override info as an
16085         argument.
16086
16087         * class.c (mono_class_setup_vtable): set the slot of overriding methods
16088         correctly.
16089         
16090         * reflection.c (ensure_runtime_vtable); add support for method 
16091         overrides.
16092         
16093 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16094
16095         * reflection.c (resolution_scope_from_image): Hack to work to work with
16096         dynamic assemblies.
16097
16098         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
16099         added a 'force_ref' argument to force this function to allways return 
16100         a TypeRef. This is needed by mono_image_get_memberref_token ().
16101         
16102 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16103
16104         * reflection.c (mono_image_get_type_info): interfaces really don't have
16105         a parent.
16106
16107         * reflection.c (mono_image_basic_init): fill out missing fields of
16108         image structure.
16109
16110         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
16111         dynamic assemblies. This is required so dynamic assemblies show up in
16112         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
16113         Type::GetType() etc. This is consistent with MS behaviour.
16114
16115         * image.c image.h reflection.c: add newly created classes to the name 
16116         cache so mono_class_get () will find them.      
16117
16118 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
16119
16120         First part of changes to get IKVM.NET running under mono.
16121         
16122         * appdomain.h, appdomain.c: added new function 
16123         mono_domain_try_type_resolve() which will emit TypeResolve events. 
16124         This function will call AppDomain::DoTypeResolve to do the actual work.
16125
16126         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
16127         moved existing code dealing with dynamic tokens to a new function 
16128         called mono_reflection_lookup_dynamic_token (). This function will 
16129         raise TypeResolve events when appropriate. Since reflection.c is not 
16130         part of libmetadata, a new hook function called 
16131         mono_lookup_dynamic_token() is added to class.c which will call this.
16132
16133         * assembly.h assembly.c: make the invoke_load_hook function public,
16134         so it can be called for dynamic assemblies.
16135
16136         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
16137
16138         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
16139         type isn't found.
16140
16141         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
16142         MonoGHashTable, since it contains pointers to objects which the GC 
16143         needs to track.
16144
16145         * assembly.c (search_loaded): remove unused variable.
16146         
16147 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
16148
16149         * object.c: fixed issue exposed by gcc-generated IL programs
16150         that use RVA data for pointers.
16151
16152 2003-01-25  Martin Baulig  <martin@ximian.com>
16153
16154         * threads.c (start_wrapper): Moved the initialization of
16155         `start_func' above the mono_new_thread_init() call to which we
16156         pass it as argument.
16157
16158 2003-01-24  Martin Baulig  <martin@ximian.com>
16159
16160         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
16161         the MonoThread pointer.
16162
16163 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
16164
16165         * icall.c: Rename `PowImpl' to Pow.
16166
16167 2003-01-23  Dick Porter  <dick@ximian.com>
16168
16169         * threads.c (start_wrapper): Create a Thread object if needed, so
16170         the Main() thread can do the class initialisation in a subthread
16171         that has been set up to allow managed code execution.
16172
16173         Pass the thread ID instead of the MonoThread pointer to the thread
16174         start and attach callbacks.  This change is required, because the
16175         jit thread start callback must be called _before_ the Thread
16176         object can be created.
16177         
16178         (mono_thread_init): Removed much object creation code that is no
16179         longer needed.  No managed code is called from here now.
16180
16181         * object.c (mono_runtime_exec_managed_code): Create a subthread
16182         for Main, and call back to the runtime to use it.
16183         Set the exit code when Main exits.
16184
16185         * gc.c: Make sure domain finalisation happens in a subthread.
16186         Re-enable threaded GC, fixing bug 31333 (again).
16187
16188         * environment.c: System.Environment internall calls (so far just
16189         ExitCode is here, the others are still in icall.c)
16190
16191         * appdomain.c (mono_runtime_cleanup): All threads running managed
16192         code should have finished before mono_runtime_cleanup() is
16193         reached, so no need to clean up threads.
16194
16195 2003-01-22  Martin Baulig  <martin@ximian.com>
16196
16197         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
16198         `gpointer func' arguments.      
16199         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
16200         but added `MonoThread *thread' argument.
16201         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
16202
16203         * threads.c (mono_new_thread_init): Added `gpointer func' argument
16204         and pass it to the mono_thread_start_cb callback.
16205         (mono_install_thread_callbacks): New public function to install a
16206         set of callbacks which are set by the debugger.
16207         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
16208
16209 2003-01-22  Martin Baulig  <martin@ximian.com>
16210
16211         * Makefile.am: Install debug-mono-symfile.h.
16212
16213 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
16214
16215         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
16216
16217 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
16218
16219         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
16220         * class.c (mono_ptr_class_get): correctly set access levels of pointers
16221         (mono_array_class_get): correctly set access levels of arrays
16222
16223 2003-01-20      Patrik Torstensson
16224         * image.h (MonoAssemblyName): changed major, minor, build, revision
16225         from signed to unsigned.
16226
16227 2003-01-20  sean kasun <skasun@azstarnet.com>
16228
16229         * reflection.c (load_cattr_value): Now this handles
16230         MONO_TYPE_SZARRAY.  Fixes bug #35629
16231
16232 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
16233
16234         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
16235         integer value
16236
16237 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16238
16239         * decimal.c: fixed bug #26056.
16240
16241 2003-01-17  Martin Baulig  <martin@ximian.com>
16242
16243         * gc.c: Raise an ExecutionEngineException instead of using g_error().
16244
16245 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16246
16247         * exception.[ch]:
16248         (mono_get_exception_type_initialization): new function.
16249
16250         * object.c: throw a TypeInitializationException when an exception is
16251         thrown invoking the class constructor.
16252
16253 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16254
16255         * reflection.c: fixed attribute reading.
16256
16257 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16258
16259         * icall.c:
16260         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
16261         provided, look for the type in the calling assembly and then in
16262         mscorlib; if the assembly name is provided, only try that one.
16263
16264 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
16265
16266         * object.c: register the vtable before there is a chance it's
16267         queried again recursively.
16268
16269 2003-01-13  Duncan Mak  <duncan@ximian.com>
16270
16271         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
16272         gc-internal.h. 
16273         
16274 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
16275
16276         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
16277
16278 2003-01-11  Martin Baulig  <martin@ximian.com>
16279
16280         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
16281         this to 20 for the release.
16282
16283 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
16284
16285         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
16286
16287         * loader.c (mono_method_get_marshal_info): bug fix
16288
16289         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
16290         structures with explicit layout
16291
16292 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16293
16294         * profiler.c: made the output more readable (and sorted). 
16295         Added caller information for the allocation profiler.
16296
16297 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
16298
16299         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
16300
16301 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16302
16303         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
16304         to get value types.
16305         
16306 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
16307
16308         * object.c, profiler.h, profiler.c, profiler-private.h:
16309         Added object allocation profiler.
16310
16311 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
16312
16313         * reflection.h, reflection.c: handle global methods.
16314         Compress blob entries.
16315
16316 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
16317
16318         * marshal.c: fix compilation.
16319
16320 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
16321
16322         * loader.c (mono_method_get_marshal_info): impl.
16323
16324         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
16325
16326 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16327
16328         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
16329         for reference types.
16330
16331 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
16332
16333         * loader.c: fixed off by one error in loaded parameter names.
16334
16335 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
16336
16337         * marshal.c (mono_marshal_get_icall_wrapper): like
16338         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
16339         instead of a MonoMethod.
16340
16341 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16342
16343         * decimal.c: fixed bug #36537.
16344
16345 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
16346
16347         * marshal.c: throw a missing method exception if a
16348         P/Invoke method is not found.
16349
16350 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16351
16352         * icall.c: allow a null this for constructors.
16353
16354 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
16355
16356         * icall.c: raise the proper exceptions if the arguments to the
16357         internal Invoke are incorrect.
16358
16359 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
16360
16361         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
16362
16363 2003-01-03  Martin Baulig  <martin@ximian.com>
16364
16365         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
16366
16367 2002-12-31  Martin Baulig  <martin@ximian.com>
16368
16369         * debug-mono-symfile.c: Completely rewrote the type section.
16370         Instead of using individual malloc()ed fields, we use one big
16371         continuous memory area and offsets into this area.
16372         See the comments in the source code for details.
16373
16374 2002-12-30  Martin Baulig  <martin@ximian.com>
16375
16376         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
16377
16378 2002-12-30  Martin Baulig  <martin@ximian.com>
16379
16380         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
16381         line number table in this data blob instead of using an external
16382         pointer.
16383
16384 2002-12-28  Martin Baulig  <martin@ximian.com>
16385
16386         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
16387
16388 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
16389
16390         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
16391         as a boxed return type.
16392
16393 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
16394
16395         * appdomain.c
16396         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
16397         g_build_filename to properly get separators on the filename created.
16398
16399         * object.h: Small change, introduce MonoMarshalByRefObject to
16400         track the layout of that structure in the C# universe as we make
16401         changes there.
16402
16403 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
16404
16405         * object.c: removed assert to allow static fields on interfaces.
16406         * loader.c: a TypeSpec may be used for any type, not just arrays.
16407
16408 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16409
16410         * class.c, class.h: added mono_class_array_element_size ().
16411         Ignore static methods in interfaces.
16412
16413 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16414
16415         * threads.c: fixed the build under cygwin.
16416
16417 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
16418
16419         * reflection.c: handle nullref constants. Allocate keys for
16420         reflection handles with the GC.
16421
16422 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16423
16424         * threads.c, threads.h: added mono_thread_get_abort_signal()
16425         to get a suitable signal for thread abort.
16426
16427 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
16428
16429         * metadata.c: fix handling of ExportedType table.
16430
16431 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16432
16433         * icall.c: added WriteWindowsDebugString internal call.
16434
16435 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16436
16437         * reflection.h: added fields to match C# implementation.
16438
16439 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16440
16441         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
16442
16443 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
16444
16445         * gc.h, gc-internal.h: Rename header for GC internal calls to
16446         gc-internal.h from gc.h as to not clash with Boehm GC having its
16447         header installed as <gc.h> in outside include paths.
16448         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
16449         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
16450
16451 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16452
16453         * icall.c: assign minor, build and revision in FillName.
16454
16455 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
16456
16457         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
16458         Added support for running code generated by Reflection.Emit.
16459
16460 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16461
16462         * appdomain.c: check for NULL argument in LoadFrom.
16463
16464 2002-12-10  Dick Porter  <dick@ximian.com>
16465
16466         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
16467
16468 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16469
16470         * appdomain.c: fix buglet when building exe file name.  Handle full
16471         assembly name (needed after latest changes to AssemblyName).
16472         * image.c:
16473         (mono_image_close): free some hashtables.
16474
16475 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
16476
16477         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
16478         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
16479         on some systems (redhat 7.3) 
16480
16481 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
16482
16483         * threads.c: delete the critical section of a sync block,
16484         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
16485
16486 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
16487
16488         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
16489
16490 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16491
16492         * appdomain.[ch]: handle the assembly preload event to try loading the
16493         assemblies using the paths we have in the current domain.
16494
16495         * assembly.[ch]: created an assembly preload hook that is called to try
16496         loading the assembly by other means that the ones provided here.
16497
16498         * domain.c: initialize the domain search path.
16499
16500         From now on, assemblies (TODO: except corlib and System) are loaded
16501         according to these rules when using mono_assembly_load ():
16502
16503                 1. It tries to load the assembly from the ApplicationBase
16504                 of the current domain appending .dll and .exe (TODO: have to
16505                 try loading from name/name.dll and name/name.exe).
16506
16507                 2. It tries the search path specified in PrivateBinPath for the
16508                 current domain (if any).
16509
16510                 3. Previous behavior.
16511
16512 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
16513
16514         * icall.c: implemented GetInterfaceMap() related icall.
16515         * domain.c, loader.h: load MethodInfo in mono_defaults.
16516
16517 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16518
16519         * gc.c: disable the finalizer thread for now, untill all the issues
16520         with it are resolved.
16521
16522 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16523
16524         * string-icalls.c: handle embedded nulls in string ctor when the
16525         length is specified.
16526
16527 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16528
16529         * class.c: look for explicit interface implementation in parent
16530         classes, too.
16531
16532 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
16533
16534         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
16535
16536 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16537
16538         * gc.c: protect handles with a critical section.
16539
16540 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16541
16542         * icall.c:
16543         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
16544         parameters. If no assembly specified, try getting the type from all
16545         the assemblies in the current domain, else, load the assembly and get
16546         the type from it.
16547
16548 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16549
16550         * marshal.c: applied patch from Aleksey Demakov that fixes
16551         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
16552
16553 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16554
16555         * icall.c: fixed get_location.
16556
16557 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
16558
16559         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
16560         declarations to make it work with older gcc. 
16561
16562         * loader.c (mono_get_method): set signature->pinvoke for native calls
16563
16564 2002-11-20  Dick Porter  <dick@ximian.com>
16565
16566         * threads.c (mono_thread_init): Set the main thread's handle
16567
16568 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16569
16570         * gc.c: allow compilation without GC support. Changed to match the
16571         mono coding style.
16572
16573 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16574
16575         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
16576
16577 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
16578
16579         * reflection.c: set a public key token on the core assemblies.
16580
16581 2002-11-18  Dick Porter  <dick@ximian.com>
16582
16583         * threads.c: Split out some thread initialisation so that other
16584         files can set the start callback function.
16585
16586         * gc.c: Run finalisers in a separate thread, to avoid stack
16587         overflow.  Fixes bug 31333.
16588
16589         * appdomain.c: Set up GC finalisation thread.
16590
16591         * reflection.c: 
16592         * object.c: 
16593         * domain.c: Use gc.h macros for GC_malloc
16594         
16595 2002-11-15  Dick Porter  <dick@ximian.com>
16596
16597         * threadpool.c: 
16598         * threads.c:
16599         * appdomain.c: Removed mono_runtime_init_with_attach(),
16600         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
16601         merging the extra parameter with the existing function.  Removed
16602         unneeded code in mono_thread_attach().
16603
16604 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
16605
16606         * image.c (mono_image_loaded_by_guid): a method to get loaded
16607         images by guid. 
16608         (load_metadata_ptrs): we store the guid as string.
16609
16610 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
16611
16612         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
16613
16614         * metadata.c (mono_guid_to_string): imported method form Zoltan
16615         Varga (slightly modified)
16616
16617         * assembly.c (mono_assembly_open): load precompiled code
16618
16619         * loader.h (MonoMethod): we store the method token for use in the
16620         aot compiler. 
16621
16622 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16623
16624         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
16625         the hook function called when an assembly is loaded.
16626         
16627         * domain.c: Modified file.
16628         (mono_domain_assembly_load): removed hash table insertion of assemblies.
16629
16630         Fixes bug #33196.
16631
16632 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
16633
16634         * reflection.c: Map PEFileKind to the value expected by the WinNT
16635         image loader. 
16636
16637 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16638
16639         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
16640         Read until the buffer is filled completely.
16641
16642 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16643
16644         * icall.c: implemented MonoType.InternalGetEvent ().
16645
16646 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16647
16648         * appdomain.c: implemented InitAppDomainSetup. Delayed
16649         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
16650         the entry_assembly.
16651
16652         * assembly.c: base_dir is now an absolute path ending with
16653         G_DIR_SEPARATOR.
16654
16655         * icall.c: modified get_location according to the above changes.
16656
16657         * object.c: init AppDomain.SetupInformation for the default domain after
16658         we have the entry assembly.
16659
16660         * domain.c: when unloading a domain, setup = NULL.
16661
16662 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
16663
16664         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
16665
16666 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
16667
16668         * object.h, object.c: introduced mono_object_get_virtual_method ()
16669         to lookup the method invoked on an object when a callvirt is done on
16670         a method.
16671         * icall.c: make MethodInfo::Invoke() always do a virtual call.
16672
16673 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16674
16675         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
16676         current domain when loaded an assembly and failed to load it.
16677
16678         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
16679
16680 2002-10-31  Dick Porter  <dick@ximian.com>
16681
16682         * icall.c: 
16683         * file-io.h: 
16684         * file-io.c: Return the error status in a parameter, as the
16685         GetLastError() value has long since been blown away if we try and
16686         look it up in a subsequent internal call invocation.  Delete the
16687         GetLastError() internal call, because it's useless.
16688
16689 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
16690
16691         * class.[ch]: added cast_class to fix bug 29517
16692
16693 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
16694
16695         * marshal.c: create valid IL code in the filter clause:
16696         the new JIT is less forgiving:-)
16697
16698 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16699
16700         * icall.c: removed get_property internal call.
16701
16702 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
16703
16704         * appdomain.h domain.c: Added an ID to appdomains.
16705         
16706         * threads.c threads.h icall.c: Implement icall
16707         Thread:GetDomainID(), and remove unused icall 
16708         CurrentThreadDomain_internal.
16709
16710 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16711
16712         * icall.c: Don't recurse through the base types in GetConstructor.
16713         Fixes bug #32063. 
16714
16715 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16716
16717         * mempool.h, mempool.c: added mono_mempool_empty() and
16718         mono_mempool_stats().
16719
16720 2002-10-23  Dick Porter  <dick@ximian.com>
16721
16722         * file-io.c: 
16723         * file-io.h: 
16724         * icall.c: Added MonoIO.GetFileType internal call
16725
16726 2002-10-17  Dick Porter  <dick@ximian.com>
16727
16728         * appdomain.c (mono_runtime_cleanup): Don't signal the async
16729         delegate semaphore before waiting for all threads to finish,
16730         because new threads can also call async delegates.  Fixes bug
16731         32004.
16732
16733         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
16734         of 3 seconds, in case another async job is queued.  (This part is
16735         needed because the bug fix reintroduced the 3s exit lag.)  This
16736         makes the mono_runtime_shutdown flag superfluous.
16737
16738 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16739
16740         * reflection.c: include ehader size in method section headers.
16741         Really check for suplicated modules entries.
16742
16743 2002-10-17  Martin Baulig  <martin@gnome.org>
16744
16745         * debug-mono-symfile.c: Added back support for locals.
16746
16747 2002-10-14  Martin Baulig  <martin@gnome.org>
16748
16749         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
16750         MONO_TYPE_VOID.
16751
16752 2002-10-14  Martin Baulig  <martin@gnome.org>
16753
16754         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
16755         mono_class_get() instead of looking in the class cache. 
16756
16757 2002-10-13  Martin Baulig  <martin@gnome.org>
16758
16759         * debug-mono-symfile.c: Set version number to 28, include the
16760         signature in method names.
16761
16762 2002-10-13  Martin Baulig  <martin@gnome.org>
16763
16764         * debug-mono-symfile.h: Set version number to 27.
16765
16766 2002-10-11  Martin Baulig  <martin@gnome.org>
16767
16768         * gc.c: Don't register/unregister NULL pointers as disappearing links.
16769
16770 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16771
16772         * metadata.c, metadata.h: added helper function to allocate signatures.
16773
16774 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16775
16776         * icall.c: added internal call to get the location of machine.config.
16777
16778 2002-10-08  Martin Baulig  <martin@gnome.org>
16779
16780         * debug-mono-symfile.c: Ignore classes with a pending init for the
16781         moment.
16782
16783 2002-10-03  Dick Porter  <dick@ximian.com>
16784
16785         * threads.c: Freebsd pthread_t is a pointer
16786
16787 2002-10-03  Dick Porter  <dick@ximian.com>
16788
16789         * socket-io.c: Implemented GetHostName_internal
16790
16791 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16792
16793         * mono-config.c:
16794         (mono_config_parse_file): don't leak the text.
16795
16796 2002-10-02  Martin Baulig  <martin@gnome.org>
16797
16798         * debug-mono-symfile.c: Added support for methods.
16799
16800 2002-10-01  Martin Baulig  <martin@gnome.org>
16801
16802         * debug-mono-symfile.c: Don't emit methods and line numbers for
16803         the dynamic symbol file, just write the type table.  We can easily
16804         have an external helper program which creates a symbol file for an
16805         IL file.        
16806
16807 2002-10-01  Dick Porter  <dick@ximian.com>
16808
16809         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
16810         Only add the handle to the cleanup array when we're about to
16811         launch the thread.  Bug 31425 deadlocked when the test was run on
16812         mono under w32.
16813
16814 2002-10-01  Martin Baulig  <martin@gnome.org>
16815
16816         * debug-mono-symfile.c: Added support for properties.
16817
16818 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16819
16820         * reflection.c: unaligned store fix from Mark Crichton
16821         <crichton@gimp.org>.
16822
16823 2002-09-27  Martin Baulig  <martin@gnome.org>
16824
16825         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
16826         New interncall.
16827
16828 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
16829
16830         * assembly.h, assembly.c: use a sane API to hook into the assembly
16831         loading process instead of a useless special-purpouse hack
16832         (ngen needs a hook, too, for example).
16833
16834 2002-09-27  Dick Porter  <dick@ximian.com>
16835
16836         * threads.c (mono_thread_init): Call GetCurrentProcess() so
16837         io-layer can set up some process handle info.  Not needed on w32,
16838         but doesn't hurt either.
16839
16840         * process.c: Pass the program name in the second parameter to
16841         CreateProcess, so the path is searched.  Include the working
16842         directory. Implemented process name, process enumeration, and some
16843         process detail internal calls.
16844         
16845         * icall.c: Added internal calls for process lookup, and some
16846         process details
16847
16848 2002-09-26  Martin Baulig  <martin@gnome.org>
16849
16850         * assembly.c (mono_install_open_assembly_hook): New global
16851         function to install a function to be invoked each time a new
16852         assembly is loaded.
16853         (mono_assembly_open): Run this callback function if set.
16854
16855         * debug-mono-symfile.c: Put back line numbers for the dynamic
16856         symbol file and also record the .il file as source file.  This
16857         allows us to install the temporary symbol file as `file.dbg' just
16858         like a compiler-generated one.
16859
16860 2002-09-26  Nick Zigarovich <nick@chemlab.org>
16861
16862         * Corrected typo in gc.c (BOHEM vs BOEHM).
16863
16864 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16865
16866         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
16867         GetProperties. Also avoid calling g_slist_length in GetProperties and
16868         GetMethods.
16869
16870 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16871
16872         * reflection.c: avoid unaligned stores (bug spotted by
16873         Mark Crichton  <crichton@gimp.org>).
16874
16875 2002-09-25  Martin Baulig  <martin@gnome.org>
16876
16877         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
16878         instead of guint64 for addresses and added prologue/epilogue info.
16879
16880 2002-09-25  Martin Baulig  <martin@gnome.org>
16881
16882         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
16883         store line number info.  For the dynamic symbol file, we only need
16884         to provide the JIT generated dynamic line number info for the dynamic
16885         symbol file.
16886
16887 2002-09-25  Martin Baulig  <martin@gnome.org>
16888
16889         * debug-mono-symfile.h: Incremented version number.
16890
16891 2002-09-24  Martin Baulig  <martin@gnome.org>
16892
16893         * class.c (mono_debugger_class_init_func): New global function
16894         pointer variable.
16895         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
16896         call it.
16897
16898         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
16899         function.  This is called via the mono_debugger_class_init_func
16900         hook to add all types to the dynamic type table.
16901         (ves_icall_MonoDebugger_GetType): New interncall to get a class
16902         from its metadata token.
16903
16904         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
16905         New interncall for the debugger.
16906
16907 2002-09-24  Nick Drochak <ndrochak@gol.com>
16908
16909         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
16910         before using it in case it is null.
16911         
16912 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16913
16914         * metadata.c: allow custom modifiers in local var signatures
16915         (bug spotted by Zoltan Varga).
16916
16917 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16918
16919         * class.c: deal with the <Module> class that may have a NULL vtable.
16920         Eliminate warnings.
16921
16922 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16923
16924         * image.c, image.h: more strong name helpers.
16925         * monosn.c: more work: convert pem keys to cryptoapi format.
16926
16927 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16928
16929         * string-icalls.c: speedup IndexOf.
16930
16931 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16932
16933         * icall.c: updates from Zoltan.2.Varga@nokia.com.
16934
16935 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
16936
16937         * icall.c: cleanup: use mono_object_domain ().
16938
16939 2002-09-23  Martin Baulig  <martin@gnome.org>
16940
16941         * debug-mono-symfile.c: Improved type support.
16942
16943 2002-09-22  Martin Baulig  <martin@gnome.org>
16944
16945         * debug-mono-symfile.c: Added support for reference types and strings.
16946
16947 2002-09-22  Martin Baulig  <martin@gnome.org>
16948
16949         * debug-mono-symfile.c: Started to work on the type table.
16950
16951 2002-09-21  Martin Baulig  <martin@gnome.org>
16952
16953         * debug-mono-symfile.c: Largely reworked the symbol table format.
16954         The symbol table is now incrementally updated each time a new
16955         method is added.  We're now also using our own magic and version
16956         so that you don't need to recompile all your classes if the
16957         dynamic table changes.
16958         (mono_debug_update_mono_symbol_file): Removed.
16959         (mono_debug_symfile_add_method): New function to add a method.
16960
16961 2002-09-21  Martin Baulig  <martin@gnome.org>
16962
16963         * icall.c
16964         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
16965         New interncall.
16966
16967         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
16968         New interncall to get a method from its metadata token.
16969
16970 2002-09-21  Martin Baulig  <martin@gnome.org>
16971
16972         * debug-mono-symfile.c: Create type table.
16973
16974 2002-09-20  Martin Baulig  <martin@gnome.org>
16975
16976         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
16977
16978 2002-09-20  Martin Baulig  <martin@gnome.org>
16979
16980         * debug-mono-symfile.c: Provide information about params and locals.
16981
16982 2002-09-20  Martin Baulig  <martin@gnome.org>
16983
16984         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
16985         New interncall.
16986
16987         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
16988         interncall to get a method from its metadata token.
16989
16990 2002-09-20  Martin Baulig  <martin@gnome.org>
16991
16992         * debug-mono-symfile.c: Added a few checks for method->header
16993         being non-NULL.  This should never happen, but for the moment
16994         let's use a g_warning() rather than a g_assert().
16995
16996 2002-09-19  Mark Crichton  <crichton@gimp.org>
16997
16998         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
16999         even if support for it isn't present.  Added an #ifdef to fix this.
17000
17001         * socket-io.c: Added checks back for Solaris support.
17002
17003 2002-09-19  Martin Baulig  <martin@gnome.org>
17004
17005         * debug-mono-symfile.c (read_string, write_string): Reflect latest
17006         changes in the symbol file format.
17007
17008 2002-09-18  Martin Baulig  <martin@gnome.org>
17009
17010         * debug-mono-symfile.c: Set version number to 21.
17011
17012 2002-09-18  Dick Porter  <dick@ximian.com>
17013
17014         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
17015         on netbsd.  Fixes bug 30051.
17016
17017 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17018
17019         * reflection.c:
17020         (set_version_from_string): little fix.
17021
17022 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17023
17024         * monosn.c, Makefile.am: added strong name utility.
17025         * reflection.h, reflection.c: implemented delayed signing,
17026         locale, version and hash id assembly attributes.
17027
17028 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17029
17030         * loader.c, metadata.c: load param attributes in signatures.
17031
17032 2002-09-16  Martin Baulig  <martin@gnome.org>
17033
17034         * debug-mono-symfile.c: Added string table with all method names.
17035
17036 2002-09-14  Martin Baulig  <martin@gnome.org>
17037
17038         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
17039         fast method lookup.
17040
17041 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17042
17043         * reflection.c: record the public key token of referenced assemblies.
17044
17045 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17046
17047         * image.c, image.h: added functions to get the strong name and the
17048         public key of an assembly.
17049         * pedump.c: use them.
17050
17051 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
17052
17053         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
17054
17055 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
17056
17057         * marshal.c (mono_marshal_get_managed_wrapper): Added
17058         MONO_TYPE_BOOLEAN 
17059
17060 2002-09-11  Martin Baulig  <martin@gnome.org>
17061
17062         * gc.c: Call GC_unregister_disappearing_link() on all links when
17063         finalizing them, this is necessary to aviod a crash in boehm's
17064         finalize handler.
17065
17066 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17067
17068         * gc.c: handle GetTarget for finalized objects spotted and fixed by
17069         nick@chemlab.org.
17070
17071 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17072
17073         * icall.c: implemented MonoType::Module.
17074         * reflection.c, reflection.h: mono_module_get_object () from
17075         Tomi Pakarinen <tomi.pakarinen@welho.com>.
17076
17077 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17078
17079         * icall.c: ignore overridden methods in GetMethods ().
17080         Fix for FieldInfo::SetValue().
17081         * object.c: handle float/double in runtime invoke.
17082
17083 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17084
17085         * object.c: allow a constructor to be called again on an object.
17086
17087 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17088
17089         * class.h, class.c: move field layout code to it's own function and
17090         export it. Get an interface id earlier. Move fields in MonoClass
17091         so they are more cache friendly and align the bitfields.
17092         * loader.c: temporary handle get_param_names() for a runtime method.
17093         * reflection.c, reflection.h: more code to handle runtime creation of
17094         types.
17095
17096 2002-09-09  Martin Baulig  <martin@gnome.org>
17097
17098         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
17099         signature with the pinvoke field being set for the actual call.
17100
17101 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17102
17103         * icall.c: removed some unused icalls. Start of map of glib charsets
17104         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
17105
17106 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17107
17108         * debug-helpers.c: break infinite loop (found and fixed by
17109         Holger Arnold <harnold@gmx.de>).
17110
17111 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
17112
17113         * icall.c: target may be null in create_delegate.
17114
17115 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17116
17117         * marshal.c: handle a boolean return type.
17118
17119 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
17120
17121         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
17122
17123 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17124
17125         * gc.c: fix weakreferences.
17126
17127 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
17128
17129         * icall.c: added icall to get default codepage.
17130
17131 2002-09-03  Dick Porter  <dick@ximian.com>
17132
17133         * threads.h: 
17134         * threads.c: Use MonoThread instead of MonoObject where
17135         apropriate.
17136
17137         Store running thread objects in a hash table, so that we have all
17138         the info to hand when waiting for them to finish
17139         (means we don't need OpenThread() any more, so mingw builds should
17140         be fully functional again.)
17141
17142         * verify.c:
17143         * object.h: Added thread ID to MonoThread
17144
17145 2002-09-03  Martin Baulig  <martin@gnome.org>
17146
17147         * icall.c (System.Reflection.Assembly::get_location): New interncall.
17148
17149 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17150
17151         * icall.c: fixed leak in get_temp_path. Thanks lupus.
17152
17153 2002-09-03  Martin Baulig  <martin@gnome.org>
17154
17155         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
17156         argument to store the end address of the disassembled instruction.
17157
17158         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
17159         here from debug-symfile.h.
17160         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
17161         JIT into this struct.
17162         (MonoSymbolFile): Added `char *image_file' field.
17163         (MonoDebugGetMethodFunc): Removed.
17164         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
17165         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
17166         (mono_debug_find_method): New method.
17167
17168         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
17169         create a full symbol file.
17170         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
17171         and static symbol files.
17172         (mono_debug_find_method): The symbol file keeps an internal method hash,
17173         call this to get a MonoDebugMethodInfo from a MonoMethod.
17174
17175         * debug-symfile.[ch]: Removed.
17176
17177 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
17178
17179         * image.c (do_mono_image_open): Remove linker version check.
17180
17181 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
17182
17183         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
17184         wrappers for instance methods.
17185         
17186 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17187
17188         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
17189
17190 2002-08-28  Dick Porter  <dick@ximian.com>
17191
17192         * Makefile.am: Export HOST_CC for w32 builds
17193
17194 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17195
17196         * file-io.c process.c: MonoString are null terminated, no
17197         need for mono_string_to_utf16() anymore.
17198
17199 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17200
17201         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
17202
17203 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
17204
17205         * icall.c, reflection.h: speedup System.MonoType.
17206
17207 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
17208
17209         * reflection.c: allow null as the value of a string argument in
17210         custom attributes constructors.
17211
17212 2002-08-27  Martin Baulig  <martin@gnome.org>
17213
17214         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
17215         `trampoline_address' field.
17216
17217 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
17218
17219         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
17220         check (fixes bug #29486) 
17221
17222 2002-08-27  Martin Baulig  <martin@gnome.org>
17223
17224         * debug-mono-symfile.c: Changed the file format in a way that allows us
17225         open it read-only and to use a specially malloced area for all the
17226         dynamic data.  We can now also generate a symbol file on-the-fly if we're
17227         debugging IL code and there is no MCS generated symbol file for it.
17228
17229 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17230
17231         * object.c: added a define for a good string and array
17232         creation speedup (not enabled by default because we need to deal with
17233         the synch stuff).
17234
17235 2002-08-26  Martin Baulig  <martin@gnome.org>
17236
17237         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
17238         function to create a dynamic symbol file.  This is used by the
17239         debugger to create a symbol file for IL code on-the-fly.
17240
17241 2002-08-26  Martin Baulig  <martin@gnome.org>
17242
17243         * loader.c (mono_lookup_pinvoke_call): Include the error message
17244         from g_module_error() in the error message.
17245
17246 2002-08-24  Martin Baulig  <martin@gnome.org>
17247
17248         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
17249         function to update the symbol file.  The symbol file is mmap()ed
17250         writable, but private.  This allows us to install the symbol file
17251         together with the assembly.
17252
17253 2002-08-24  Martin Baulig  <martin@gnome.org>
17254
17255         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
17256         but they can read the new symbol file format which mcs is now creating.
17257
17258         * debug-symfile.c (mono_debug_find_source_location): Moved to
17259         debug-mono-symfile.c; this is now operating on the new symbol file.
17260
17261 2002-08-23  Martin Baulig  <martin@gnome.org>
17262
17263         * debug-helpers.c (mono_method_desc_from_method): New function to get
17264         a MonoMethodDesc from a MonoMethod.
17265
17266 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17267
17268         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
17269         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
17270
17271 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
17272
17273         * string-icalls.[ch]: make helper methods static.
17274
17275 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17276
17277         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
17278         types to it and to SetValueInternal.
17279
17280         * object.c: Moved handle_enum label to its proper place. This was the
17281         f... bug! ;-)
17282
17283         This time i compiled mcs and gtk-sharp and they both work.
17284
17285 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17286
17287         * icall.c: reverted partially my previous patch until 
17288         object.c:set_value handles enums correcly.
17289
17290 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17291
17292         * icall.c:
17293         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
17294         (ves_icall_System_Environment_get_MachineName): removed warning when
17295         compiling under cygwin.
17296
17297 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17298
17299         * object.c: fixed field_get_value() for reference types.
17300
17301 2002-08-22  Dick Porter  <dick@ximian.com>
17302
17303         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
17304         Don't free a buffer while it's still needed.  Patch from Jonathan
17305         Liger <Jonathan.liger@wanadoo.fr>
17306
17307 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
17308
17309         * icall.c (ves_icall_System_Environment_get_Platform): Add new
17310         internal call.
17311
17312 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
17313
17314         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
17315         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
17316
17317         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
17318         we call unmanaged code which throws exceptions.
17319
17320 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17321
17322         * appdomain.h: added per-domain entry_assembly.
17323         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
17324         arguments.
17325         * icall.c: Assembly::GetEntryAssembly icall.
17326         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
17327         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
17328
17329 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
17330
17331         * appdomain.h, gc.c: added mono_domain_finalize ().
17332
17333 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17334
17335         * object.c:
17336         (mono_print_unhandled_exception): changed g_warning by g_printerr
17337         because g_log has a 1024 characters limit (yeah, i got a big stack
17338         trace). Don't print exception name, that should be in ToString 
17339         returned string.
17340
17341 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17342
17343         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
17344         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
17345
17346 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17347
17348         * object.c:
17349         (mono_print_unhandled_exception): after previous commit, i realized
17350         that MS calls ToString on the exception. I changed this function to
17351         do that. This way we get stack_trace for free.
17352
17353 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17354
17355         * object.c:
17356         (mono_print_unhandled_exception): invoke Message property instead of
17357         getting 'message' field from Exception. Don't allocate memory for
17358         'trace' and 'message' if not needed.
17359
17360 2002-08-18  Dick Porter  <dick@ximian.com>
17361
17362         * unicode.c: Fix asserts to match Encoder.cs checks
17363
17364 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17365
17366         * marshal.c: fix unaligned store issue and a few wrong
17367         opcode argument types.
17368
17369 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17370
17371         * icall.c: added GetUninitializedObjectInternal internal call.
17372
17373 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
17374
17375         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
17376         to the right domain.
17377
17378 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
17379
17380         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
17381
17382         * class.c (class_compute_field_layout): set blittable to false for Strings
17383
17384         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
17385
17386 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17387
17388         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
17389         first chunk of code to create types at runtime. Code to
17390         handle ReflectedType/DeclaringType. Make reflection handles
17391         domain specific.
17392
17393 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
17394
17395         * class.c: set correct name in arrays.
17396
17397 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
17398
17399         * appdomain.c (mono_domain_transfer_object): make it work with
17400         valuetypes. bug fixes.
17401
17402 2002-08-12  Dick Porter  <dick@ximian.com>
17403
17404         * object.h: Rename some parameters to avoid c++ keywords (Patch
17405         from Joseph Wenninger <kde@jowenn.at>)
17406
17407 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
17408
17409         * icall.c: added icall to implement Assembly.GetFile*.
17410
17411 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
17412
17413         * reflection.h, reflection.c: code to embed managed resources.
17414
17415 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
17416
17417         * class.c: move all the type size stuff into
17418         class_compute_field_layout().
17419
17420 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
17421
17422         * class.c: ensure enums have always the correct instance size.
17423         * unicode.c: remove wrong assert.
17424
17425 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17426
17427         * assembly.c: fix mem corruption issue.
17428         * image.h, image.c: added mono_image_get_resource () to access
17429         managed resources.
17430         * icall.c: implemented Assembly.EntryPoint property and some
17431         Managed Resources related internalcalls.
17432
17433
17434 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17435
17436         * image.c, image.h: impemented mono_image_get_entry_point ().
17437         * appdomain.c: use mono_image_get_entry_point.
17438
17439 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
17440
17441         * reflection.c: support the object type argument when loading
17442         custom attributes.
17443
17444 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
17445
17446         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
17447         String as return type.
17448
17449 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
17450
17451         * reflection.c: fix encoding of named args for custom attrs to match
17452         the ms implementation. Read them back when instantiating custom
17453         attributes.
17454
17455 2002-08-02  Radek Doulik  <rodo@ximian.com>
17456
17457         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
17458         by Dietmar as quick fix
17459         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
17460         16 as stack size, used on more places as quick fix before Dietmar
17461         will fix it properly
17462
17463 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
17464
17465         * object.h, object.c: added accessors for fields and properties.
17466
17467 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
17468
17469         * class.c, class.h: made mono_class_get_field_from_name ()
17470         loop on parent types.
17471         Added mono_class_get_property_from_name ().
17472
17473 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17474
17475         * class.c, class.h: move the code to setup the type vtable in its own
17476         function so that it can be reused also for types created at runtime.
17477         Eliminate the "class" identifier from the header file.
17478         * reflection.c: setup the vtable for enums so that we can create
17479         objects for use in SetConstant ().
17480
17481 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
17482
17483         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
17484         instead of the delegate itself as this pointer (bug #28383)
17485
17486 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
17487
17488         * marshal.c (mono_marshal_get_managed_wrapper): added return type
17489         conversions.
17490
17491 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17492
17493         * loader.c: don't set the pinvoke bit on icalls.
17494
17495 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
17496
17497         * debug-helpers.c (mono_method_full_name): only print a number to
17498         indicate wrapper type (so that the output is more readable in traces).
17499
17500 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
17501
17502         * class.c (mono_class_init): include method override patch from Paolo
17503
17504 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
17505
17506         * icall.c: fixed GetTypeCode().
17507
17508 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
17509
17510         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
17511         use real delegate invoke function to make it work with multicast
17512         delegates (fix bug# 28291).
17513
17514 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17515
17516         * object.c: load constant strings.
17517
17518 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17519
17520         * reflection.c: no magic numbers.
17521         * tabledefs.h: security action enum.
17522
17523 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17524
17525         * assembly.c: fix possible memory corruption.
17526
17527 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
17528
17529         * reflection.h, reflection.c: added support for linking resources.
17530         * verify.c: check we have an updated corlib.
17531
17532 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
17533
17534         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
17535         string arrays.
17536         (mono_marshal_string_array): null terminate unmanaged string arrays.
17537         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
17538
17539 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17540
17541         * icall.c: Type.GetType () can now return also types from the
17542         calling assembly.
17543
17544 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17545
17546         * loader.h, loader.c: stack walking support.
17547         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
17548         GetCallingAssembly.
17549
17550 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
17551
17552         * marshal.c: added optimisations for blittable types 
17553
17554         * class.c (mono_array_class_get): do not set blittable attribute on arrays
17555         (mono_class_setup_mono_type): set blittable attribute for single
17556         and double.
17557
17558         * marshal.c (mono_string_utf8_to_builder): impl.
17559         (mono_string_builder_to_utf8): impl.
17560         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
17561
17562 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
17563
17564         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
17565         (mono_marshal_get_managed_wrapper): impl. byref types
17566
17567 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17568
17569         * icall.c:
17570         (search_method): don't display debug message. 
17571
17572 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
17573
17574         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
17575
17576 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
17577
17578         * appdomain.c: set the missing filename when throwing exception.
17579
17580 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
17581
17582         * metadata.c (mono_type_size): code cleanup
17583         (mono_type_stack_size): removed some test code
17584
17585 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
17586
17587         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
17588         mono_get_exception_file_not_found now.
17589
17590         * exception.c (mono_exception_from_name_two_strings): New version
17591         that will call a constructor with two string arguments. 
17592         (mono_get_exception_file_not_found): New helper routine, used to
17593         report file-not-found errors.
17594
17595 2002-07-20  Dick Porter  <dick@ximian.com>
17596
17597         * process.h:
17598         * process.c: Pass file handles to CreateProcess
17599         
17600         * icall.c:
17601         * file-io.h:
17602         * file-io.c: Implemented CreatePipe
17603
17604 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
17605
17606         * metadata.c (mono_get_param_info): set alignment for value types
17607
17608 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
17609
17610         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
17611         Constify mono_domain_assembly_open().
17612         * loader.c: handle null namespace in icalls.
17613
17614 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
17615
17616         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
17617         (emit_str_to_ptr_conv): marshal object as structs
17618
17619         * metadata.c (mono_type_to_unmanaged): marshal object as structs
17620
17621         * marshal.c (mono_marshal_get_runtime_invoke): support value types
17622
17623 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
17624
17625         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
17626         (mono_marshal_get_native_wrapper): we an now return value types
17627
17628 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17629
17630         * verify.c: more checks implemented.
17631
17632 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
17633
17634         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
17635         (fix bug #27695)
17636         (mono_marshal_get_native_wrapper): allow byref arguments
17637         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
17638         impl. PtrToStringXXX methods
17639         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
17640         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
17641         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
17642         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
17643         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
17644
17645 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17646
17647         * reflection.c: fix buglet in parsing an assembly name.
17648
17649 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
17650
17651         * marshal.c (emit_ptr_to_str_conv): first impl.
17652
17653 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17654
17655         * object.c, class.h: cache the vtable in the class as suggested by
17656         vargaz@freemail.hu (Zoltan Varga).
17657
17658 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17659
17660         * class.h, loader.c: added mono_field_from_token().
17661         * verify.c: first cut of type checking code.
17662
17663 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
17664
17665         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
17666
17667 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
17668
17669         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
17670         (fix bug #27782)
17671         (mono_marshal_get_remoting_invoke): impl.
17672         (mono_delegate_begin_invoke): impl.
17673         (mono_mb_emit_save_args): impl.
17674         (mono_delegate_end_invoke): impl.
17675         (mono_marshal_get_delegate_begin_invoke):
17676         (mono_marshal_get_delegate_end_invoke):
17677         (mono_marshal_get_delegate_invoke): generate a special name for
17678         those methods (including the signature) and associate them whith
17679         the delegate class. 
17680
17681 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
17682
17683         * reflection.[ch]: 
17684         (mono_reflection_type_from_name): now it has a MonoImage parameter
17685         which is used as the default image to search the type in. If the image
17686         is NULL or getting the type from it fails, it defaults to corlib.
17687
17688         * icall.c: changed 1 call to mono_reflection_type_from_name to match
17689         new parameter.
17690
17691 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17692
17693         * reflection.c: update the parameter table index.
17694
17695 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17696
17697         * domain.c: don't include the mark byte in the string hash.
17698
17699 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17700
17701         * icall.cs: icall for Type.GetTypeCode ().
17702         * verify: a couple of fixes and disabled local initialization checks.
17703
17704 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
17705
17706         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
17707
17708         * debug-helpers.c (mono_method_full_name): print the type of the
17709         runtime wrapper
17710
17711         * metadata.c (mono_signature_hash): a hash function for signatures
17712         (mono_signature_hash): better hash algorithm
17713
17714         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
17715
17716         * debug-helpers.c (mono_method_full_name): this can now generate
17717         method names with signatures
17718
17719         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
17720         method dont have this pointers.
17721
17722 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17723
17724         * reflection.c: fixup typebuilder tokens.
17725         * image.c: fix buglet.
17726         * marshal.h: remove whitespace.
17727         * metadata.h, metadata.c: reinstate code that was removed.
17728         * verify.c: handle catch directives and fix another couple of bugs.
17729
17730 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
17731
17732         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
17733         (mono_marshal_get_native_wrapper): make it comp. with the old code
17734         (mono_marshal_get_native_wrapper): support boolean
17735         (mono_marshal_get_managed_wrapper): support more types
17736
17737 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
17738
17739         * class.c (class_compute_field_layout): compute class->blittable attribute.
17740
17741 2002-07-09  Dick Porter  <dick@ximian.com>
17742
17743         * threads.c: Make the thread cleaning up cope with threads that
17744         call ExitThread()
17745
17746 2002-07-08  Radek Doulik  <rodo@ximian.com>
17747
17748         * reflection.c (method_encode_code): use non-translated values to
17749         compute finally_start, this fixes exception handling on ppc, yay!
17750
17751         * decimal.h (struct signscale): fix endianess
17752
17753 2002-07-07  Radek Doulik  <rodo@ximian.com>
17754
17755         * reflection.c: swap box_val and not val
17756
17757 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
17758
17759         * reflection.c, reflection.h: handle full assembly info in type name.
17760         Handle Type arguments when loading custom attributes.
17761         * icall.c: updated to use new mono_reflection_type_from_name () method.
17762
17763 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17764
17765         * loader.c:
17766         (method_from_memberref): also print assembly name when method not found.
17767
17768 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17769
17770         * icall.c:
17771         (ves_icall_TypeGetProperties): fixed bug #27473. 
17772
17773 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17774
17775         * reflection.c: display image name and token when cannot find the
17776         .ctor for an attribute.
17777
17778 2002-07-05  Martin Baulig  <martin@gnome.org>
17779
17780         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17781
17782 2002-07-04  Dick Porter  <dick@ximian.com>
17783
17784         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
17785         compile on mingw.  This will cause mingw builds to not wait for
17786         subthreads to terminate after the main thread does.  I've lodged a
17787         bug with the mingw developers for them to wrap OpenThread().
17788
17789 2002-07-03  Dick Porter  <dick@ximian.com>
17790
17791         * threads.c: Store thread IDs instead of handles, because
17792         GetCurrentThread() returns a pseudohandle and therefore stores
17793         useless values.  mono_thread_cleanup() continues checking the
17794         array of threads until it is empty, to cope with subthreads
17795         spawning new threads after the main thread has finished.
17796
17797         * profiler.h:
17798         * profiler.c:
17799         * profiler-private.h: Pass the thread ID to thread profiler
17800         functions, instead of a handle
17801
17802 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17803
17804         * verify.c: fixes to make it more usable.
17805         * pedump.c: added --verify code to verify IL code in an assembly.
17806
17807 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17808
17809         * reflection.c: turn errors into warnings to allow compiling corlib.
17810
17811 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
17812
17813         * reflection.c: add special cases to compile corlib.
17814
17815 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17816
17817         * reflection.c: handle properties with only a set method.
17818
17819 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
17820
17821         * opcodes.h: add enum with opcodes in opval order.
17822
17823 2002-07-01  Dick Porter  <dick@ximian.com>
17824         
17825         * object.h:
17826         * object.c (mono_runtime_run_main): Removed unneeded argument
17827
17828 2002-06-28  Martin Baulig  <martin@gnome.org>
17829
17830         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
17831
17832 2002-06-27  Dick Porter  <dick@ximian.com>
17833
17834         * threads.c: Store the handle in both the parent thread and in the
17835         subthread, to minimise the time between starting a new thread and
17836         storing its ID.
17837
17838 2002-06-26  Dick Porter  <dick@ximian.com>
17839
17840         * appdomain.c (mono_runtime_cleanup): Close the socket library
17841         after all the threads have finished, not before
17842
17843 2002-06-26  Martin Baulig  <martin@gnome.org>
17844
17845         * debug-symfile.c (mono_debug_find_source_location): Added
17846         `guint32 *line_number' argument.  If it's not NULL, store the line number
17847         there and return the file name without the line number.
17848
17849 2002-06-25  Dick Porter  <dick@ximian.com>
17850
17851         * icall.c:
17852         * process.h:
17853         * process.c: Process forking and other support functions
17854
17855 2002-06-25  Dick Porter  <dick@ximian.com>
17856
17857         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
17858         things dont happen when the image is closed.
17859         (mono_image_lookup_resource): Walk the resource section looking
17860         for a particular entry
17861
17862         * cil-coff.h: PE resource section decoding
17863
17864 2002-06-25  Dick Porter  <dick@ximian.com>
17865         
17866         * assembly.h:
17867         * assembly.c: 
17868         (mono_assembly_foreach): Accessor functions to walk the list of
17869         loaded assemblies
17870         (mono_assembly_set_main):
17871         (mono_assembly_get_main): Process methods need to know which
17872         assembly is the "main" one
17873
17874         * object.c (mono_runtime_run_main): Record the main assembly
17875
17876         * debug-helpers.c: Fix typo
17877
17878 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
17879
17880         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
17881         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
17882
17883 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17884
17885         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
17886
17887 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
17888
17889         * image.c (do_mono_image_open): Initialize reference count,
17890         otherwise we leak the MonoImage.
17891
17892 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
17893
17894         * reflection.c: small tweak to handle self-hosting.
17895
17896 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
17897
17898         * reflection.c: fix type name parse code.
17899
17900 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17901
17902         * reflection.c: break out of the loop.
17903         * image.c: special case corlib.
17904
17905 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17906
17907         * reflection.c: add all the custom attrs at the end to ensure the
17908         ctors have been properly initialized when the attributes are defined
17909         in the current assembly.
17910
17911 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17912
17913         * reflection.c: handle correctly multiple-nested types.
17914
17915 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
17916
17917         * row-indexes.h: fix typos.
17918         * reflection.c: adjust for typos and fix method_def_or_ref
17919         encoding in MethodImpl table.
17920
17921 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17922
17923         * reflection.c: fix entry point patching (thanks Serge!).
17924
17925 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
17926
17927         * verify.c: add check for System.Exception
17928
17929 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
17930
17931         * image.c, class.c: minifix for code just c&p'ed.
17932         * reflection.c: warning fix.
17933         * object.h, loader.h, domain.c: load also StringBuilder.
17934
17935 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
17936
17937         * marshal.h, marshal.c: some support code to handle complex marshaling.
17938
17939 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17940
17941         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
17942         Better signatures with vtable error dump.
17943
17944 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
17945
17946         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
17947
17948 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
17949
17950         * icall.c (ves_icall_Type_GetField): impl.
17951
17952 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17953
17954         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
17955         to retrieve a marshal description blob for a field or param.
17956
17957 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
17958
17959         * reflection.h, reflection.c: change order of nested type emission
17960         to avoid table corruption. The NestedTypes table is sorted.
17961         * icall.c: change order of GetConstructor results to workaround mcs bug.
17962
17963 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17964
17965         * reflection.h, reflection.c: handle field and param marshal
17966         information.
17967
17968 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
17969
17970         * icall.c, marshal.c marshal.h: more Marshal class implementation.
17971
17972 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17973
17974         * reflection.c: fix call convention.
17975
17976 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
17977
17978         * reflection.h, reflection.c: mono_image_get_memberref_token()
17979         takes a type instead of a class, now. Added
17980         mono_image_get_array_token() to create tokens for the special
17981         multi-dim array methods.
17982
17983 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
17984
17985         * assembly.c: handle modules (no assembly table). Split
17986         loading references in its own function.
17987         * class.c: handle moduleref resolution scope.
17988         * image.c, image.h: cache module name in image.
17989
17990 2002-06-07  Martin Baulig  <martin@gnome.org>
17991
17992         * reflection.c (mono_image_get_type_info): Only add a class layout entry
17993         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
17994
17995 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
17996
17997         * icall.c: more signature fixes that used uint instead of int.
17998
17999 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18000
18001         * reflection.c: fixed signature of field refs.
18002
18003 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18004
18005         * class.c, reflection.c: handle typerefs of nested types
18006         (both on read and when writing files).
18007
18008 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
18009
18010         * icall.c: fix method signatures that tried to workaround the previous
18011         typo, d'oh!
18012
18013 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18014
18015         * debug-helpers.c: fix typo.
18016
18017 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18018
18019         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
18020         rewrote the PE/COFF writing code (our programs are understood by the
18021         ms runtime, now).
18022
18023 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
18024
18025         * gc.c, gc.h, icall.c: weakreference support.
18026
18027 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
18028
18029         * Makefile.am, mono-config.c: use $(sysconfdir).
18030
18031 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18032
18033         * icall.c: changed default precision of Double.ToString() to 15.
18034         Fixed memory leak. Unified with Single.ToString.
18035
18036 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
18037
18038         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
18039
18040 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
18041
18042         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
18043         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
18044         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
18045         and myself.
18046
18047 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18048
18049         * debug-symfile.c, sysmath.c: yet more compilation fixes.
18050
18051 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18052
18053         * reflection.c, socket-io.c: more compilation fixes.
18054
18055 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18056
18057         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
18058         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
18059         unicode.c: warning and compiler compatibility fixes.
18060
18061 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18062
18063         * class.h, metadata.c: fixed warnings/compilation errors.
18064
18065 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
18066
18067         * Makefile.am, mono-config.c, mono-config.h: configuration file
18068         support routines.
18069         * loader.c, loader.h: make Dll mapping configurable at runtime in the
18070         config file. Export methods to insert and lookup mappings.
18071
18072 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
18073
18074         * reflection.c: handle types and boxed objects in custom attr
18075         constructors.
18076
18077 2002-05-30  Martin Baulig  <martin@gnome.org>
18078
18079         * debug-symfile.c
18080         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
18081
18082 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
18083
18084         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
18085         to lookup the implmap row for a P/Invoke method.
18086         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
18087         P/Invoke method from the runtime on an as needed basis.
18088
18089 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
18090
18091         * metadata.c (mono_metadata_parse_signature): impl.
18092
18093 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18094
18095         * class.c: handle .pack directive.
18096
18097 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
18098
18099         * object.c: initialize static fields with RVA data.
18100
18101 2002-05-25  Martin Baulig  <martin@gnome.org>
18102
18103         * debug-symfile.c
18104         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
18105
18106 2002-05-24  Martin Baulig  <martin@gnome.org>
18107
18108         * debug-symfile.c
18109         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
18110         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
18111         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
18112
18113 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18114
18115         * object.c: special case string ctros in invoke.
18116         * gc.c: silly whitespace changes.
18117
18118 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
18119
18120         * threadpool.[ch]: impl. a threadpool that can
18121         be used by mint and mono.
18122
18123 2002-05-22  Martin Baulig  <martin@gnome.org>
18124
18125         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
18126         The first argument is now a `MonoReflectionModuleBuilder *', the return
18127         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
18128         `methods' field to get the method builder.  The `token' argument is the
18129         unfixed token.
18130
18131         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
18132         invalid characters instead of g_assert_not_reached()ing.  This seems
18133         to be the behaviour of mscorlib.
18134
18135 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
18136
18137         * object.c (mono_runtime_invoke_array): applied patch from Rachel
18138         Hestilow to fix bug #25104
18139
18140 2002-05-21  Martin Baulig  <martin@gnome.org>
18141
18142         * debug-symfile.c (mono_debug_find_source_location): New function.
18143         Looks up an IL offset in the line number table and returns the source
18144         location as a string.
18145
18146 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18147
18148         * icall.c:
18149         (mono_double_ToStringImpl): changed %f by %g until we have something
18150         better.
18151
18152 2002-05-21  Nick Drochak  <ndrochak@gol.com>
18153
18154         * icall.c : Use different name for Math.Pow's icall.  Needed to check
18155         parameters first in C#.
18156
18157 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18158
18159         * icall.c, reflection.h: added icall to get info about an event.
18160
18161 2002-05-20  Radek Doulik  <rodo@ximian.com>
18162
18163         * object.c (mono_value_box): don't use memcpy for boxing on BIG
18164         endian
18165         (mono_value_box): don't use memcpy for small sizes on
18166         architectures with unaligned access
18167
18168 2002-05-20  Martin Baulig  <martin@gnome.org>
18169
18170         * reflection.c (mono_reflection_setup_internal_class): Don't crash
18171         if `tb->parent == NULL'.
18172         (mono_reflection_create_internal_class): New function.  This is
18173         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
18174         for enum types.
18175
18176         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
18177         New interncall.
18178
18179 2002-05-19  Martin Baulig  <martin@gnome.org>
18180
18181         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
18182         argument to get the length, don't default to the array length.
18183
18184 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
18185
18186         * assembly.c (mono_assembly_setrootdir): New function used to
18187         override the MONO_ASSEMBLIES directory.
18188
18189 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18190
18191         * icall.c: ValueType_GetHashCode() initialize local var.
18192
18193 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18194
18195         * reflection.c: sort custom attributes table.
18196
18197 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18198
18199         * reflection.c: support named args in custom attributes (write support).
18200
18201 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
18202
18203         * reflection.c: fix finally position calculation.
18204
18205 2002-05-15  Radek Doulik  <rodo@ximian.com>
18206
18207         * reflection.c: fixed endianess at many places
18208
18209         * icall.c (ves_icall_InitializeArray): comment out debug msg
18210
18211 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
18212
18213         * object.c (mono_unhandled_exception): new function to handle
18214         unhandled exceptions.
18215         (mono_unhandled_exception): call the UnhandledException event.
18216         (mono_runtime_delegate_invoke): impl.
18217
18218 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
18219
18220         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
18221         returns the RVA, not the direct pointer to the data. Handle the case
18222         when the class size is fixed.
18223
18224 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
18225
18226         * reflection.c: fix some endianess issues.
18227
18228 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
18229
18230         * object.c (mono_runtime_invoke): is now able to catch exceptions.
18231
18232         * threads.c (mono_thread_init): added a callback which is invoked
18233         at thread start.
18234
18235 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
18236         
18237         * icall.c: make GetHashCode return non-negative values.
18238
18239 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
18240
18241         * object.c, icall.c, gc.c: revert to address-based hashcode.
18242
18243 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
18244
18245         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
18246
18247 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18248
18249         * icall.c, class.c: special case <Module>.
18250
18251 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
18252
18253         * icall.c: fix bug in GetNow().
18254
18255 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
18256
18257         * object.c (mono_runtime_class_init): make sure that we call all
18258         static class constructors.
18259
18260 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
18261
18262         * reflection.c: sort methodsemantics table.
18263
18264 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
18265
18266         * reflection.h, reflection.c: honour init locals setting.
18267
18268 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
18269
18270         * icall.c: copied Double ToStringImpl for Single ToStringImpl
18271
18272 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18273
18274         * reflection.c: support ContructorBuilders in attribute blob creation.
18275
18276 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18277
18278         * reflection.c: some changes to build a binary that can be run
18279         directly in windows.
18280
18281 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
18282
18283         * loader.c: print a big message when an icall can't be found.
18284
18285 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18286
18287         * string-icalls.c: fix bug 24248.
18288
18289 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
18290
18291         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
18292         icall.c, reflection.h: separate assembly loading by pathname and by
18293         assembly name. Use the MONO_PATH env var to search for assemblies.
18294
18295 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18296
18297         * assembly.c, image.h: add some support for assemblies
18298         with multiple modules.
18299         * class.c, class.h: export mono_class_from_typeref().
18300         * loader.c: remove duplicated code and use mono_class_from_typeref(),
18301         instead.
18302
18303 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18304
18305         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
18306         documentation says (the ECMA one is correct).
18307
18308 2002-05-02  Dick Porter  <dick@ximian.com>
18309
18310         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
18311         Don't name the synchronisation mutex.
18312
18313 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
18314
18315         * rand.c
18316         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
18317         Make the prototypes match.
18318         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
18319         Same.
18320
18321         * icall.c
18322         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
18323         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
18324         all systems have tm.tm_zone, so use strftime() with %Z to print
18325         the timezone abreviation into a temp string.
18326
18327         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
18328         rather than mono_array_addr() on a MonoString on Big Endian
18329         machines.
18330
18331 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
18332
18333         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
18334         fix bug 24041
18335
18336 2002-04-30  Dick Porter  <dick@ximian.com>
18337
18338         * socket-io.c: Cope with SOCKET being an integer rather than a
18339         pointer now.
18340
18341         * threads.c: Added Thread_free_internal, to deal with thread
18342         handle cleanup.  Moved calls to handle_store() and handle_remove()
18343         to start_wrapper(), so each can only be called once.  Allocate
18344         synchronisation blocks with GC_malloc(), and use GC finalisation
18345         to close the handles.
18346
18347         * icall.c: added System.Threading.Thread::Thread_free_internal
18348
18349 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18350
18351         * icall.c: support Environment.Exit, CommandLineArgs().
18352
18353 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
18354
18355         * object.c, object.h: added mono_runtime_run_main () and
18356         mono_runtime_get_main_args () for use in System.Environment.
18357
18358 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
18359
18360         * gc.c: fix thinko, enable actual finalization since the jit is now
18361         fixed.
18362
18363 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18364
18365         * gc.c, object.c: take into account that an object may be offset wrt the address
18366         returned by GC_malloc().
18367
18368 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
18369
18370         * image.c: handle files without entries in the assembly table (modules).
18371
18372 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
18373
18374         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
18375         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
18376         allowed to be null when it's System.Object class setup.
18377
18378 2002-04-27  Martin Baulig  <martin@gnome.org>
18379
18380         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
18381         if `tb->parent == NULL' rather than crashing.
18382
18383 2002-04-28  Nick Drochak  <ndrochak@gol.com>
18384
18385         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
18386         calling acos() where asin() should have been called.
18387
18388 2002-04-26  Martin Baulig  <martin@gnome.org>
18389
18390         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
18391         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
18392         there's a subdirectory called `System', but we don't want to read that
18393         subdirectory as an assembly.
18394
18395 2002-04-25  Martin Baulig  <martin@gnome.org>
18396
18397         * debug-symfile.c: Reflect latest MonoString changes.
18398
18399 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
18400
18401         * rand.c, rand.h: instance method icalls need to have an explicit
18402         this pointer as first argument in the C implementation.
18403
18404 2002-04-25  Nick Drochak <ndrochak@gol.com>
18405
18406         * icall.c: Fix typo in map for GetNonZeroBytes
18407
18408 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
18409
18410         * string-icalls.c : String does now passes unit tests without any 
18411         errors, the following changes has been made:
18412         
18413         Implemented replace methods.
18414         Renaming of methods to (try) follow the standard.
18415         Fixed compare ordinal
18416         Made all memory allocated directly to function instead of via icall function.
18417         Small performance fix in is_in_array function
18418                         
18419  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
18420
18421         c (mono_string_Internal_ctor_charp_int_int):
18422         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
18423         sindex < 0, throw ArgumentOutOfRangeException instead of
18424         ArgumentNullException.
18425
18426         Added new check for length == 0, however
18427         I need to make it return String.Empty from the C code.
18428         
18429         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
18430         that calculate the length for us here.
18431         
18432         (mono_string_Internal_ctor_sbytep_int_int): Replaced
18433         mono_string_new_utf16 with mono_string_new, since value is utf8.
18434
18435 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18436
18437         * object.c: register the object for finalization if needed.
18438         Allocate one more char in the string for the terminating 0 char.
18439
18440 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
18441
18442         * class.c, class.h, image.c: check if a type implemenst a destructor.
18443         Use the proper key for array class lookups.
18444         * icall.c: register the icalls in the System.GC class.
18445         * gc.c, gc.h: GC-related functions and icalls.
18446
18447 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18448
18449         * icall.c:
18450         * socket-io.c:
18451         * unicode.c: free some strings gotten from mono_string_to_utf8 and
18452         changed a couple of free () by g_free ().
18453
18454         * decimal.c: one-liner in the comments for decimal2string ().
18455
18456 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
18457
18458         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
18459
18460 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
18461
18462         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
18463         * object.c (mono_runtime_invoke_array) : handle null in params
18464
18465 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
18466
18467         * string-icalls.c: fixed bug in split (one off bug)
18468
18469 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
18470
18471         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
18472         * icalls.c: added String::Equals as internal method
18473
18474 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
18475
18476         * threads.c: fixed bug in the double interlocked functions
18477
18478 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
18479
18480         * threads.c: implemented all of the new interlocked icalls.
18481         * string-icalls.c: fix a bug in insert.
18482         * icalls.c: added the icalls for interlocked, removed old string functions.
18483         
18484 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18485
18486         * loader.c: fix off-by-one error when reading argument names.
18487
18488 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18489
18490         * profiler.c: win32 counter implementation (untested).
18491         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
18492         (the latter needs testing and more complete impl. from win32 folks).
18493
18494 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
18495
18496         * object.c: mono_array_new_full workaround mono_array_class_get
18497         problem.
18498
18499 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18500
18501         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
18502         * object.h (mono_string_chars): Changed casting type.
18503
18504 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18505
18506         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
18507                            method signatures to use gunichar2 instead of gint16.
18508
18509 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
18510
18511         * object.h, object.c: domain-specific versions of mono_object_new and
18512         mono_array_new.
18513
18514 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
18515
18516         * object.c: changed String layout
18517
18518         * string-icalls.c (mono_string_Internal_ctor_chara): added
18519         internal string constructors.
18520
18521 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
18522
18523         * threads.c: pass 'this' to the thread start routine.
18524
18525 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18526
18527         * string-icalls.c: fix IndexOf and LastIndexOf. Now
18528         InternalCompareStr don't call twice mono_string_cmp_char for the last
18529         character. Improved performance in mono_string_cmp_char.
18530
18531 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
18532
18533         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
18534         code into its own library: libmonoruntime.
18535
18536 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
18537
18538         * object.h, object.c: changed array format so that szarrays do not
18539         require a bounds structure.
18540         * icall.c, appdomain.c: support for new szarray format.
18541
18542 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
18543
18544         * metadata.c: compare also the retuns type when comparing signatures:
18545         we didn't do this as an optimization since really overloaded methods
18546         must differ also in the arguments, but this doesn't work with
18547         low-level IL code (or when using explicit conversion operators: see
18548         bug#23498 for an example).
18549
18550 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
18551
18552         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
18553
18554 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
18555
18556         * icall.c: make MonoType::GetElementType its own icall.
18557
18558 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
18559
18560         * icall.c: remove MonoMethod_get_Name().
18561         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
18562         object.
18563
18564 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18565
18566         * string-icalls.c: optimized a few methods.
18567
18568 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
18569
18570         * icall.c: added all new string internal calls
18571         * string-icalls.c: added, new string internal call implementation.
18572         * object.c: added mono_string_new_size for allocating a string a size
18573
18574 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
18575
18576         * object.c (mono_object_isinst): use the same code as in the
18577         optimized x86 version.
18578
18579 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
18580
18581         * profiler.c: TSC-based timer code (faster and more accurate).
18582         Not hooked up in configure, yet (set USE_X86TSC to 1).
18583
18584 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
18585
18586         * profiler.c, profiler.h: track time spent compiling methods.
18587         * threads.c: track thread creation/destruction.
18588
18589 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
18590
18591         * profiler.c, profiler.h, profiler-private.h: profiling interface
18592         and sample implementation. Moved here so that it can be used also by
18593         the jit.
18594
18595 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
18596
18597         * reflection.c, reflection.h: keep types and other handles separate in
18598         the hash tables for referred tokens. Add guid for modules.
18599
18600 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
18601
18602         * assembly.c: fix bugs found with valgrind.
18603         * metadata.h, metadata.c: added mono_metadata_guid_heap().
18604
18605 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
18606
18607         * threads: added icall support for getting current domain for
18608                    the thread.
18609  
18610 2002-04-13  Martin Baulig  <martin@gnome.org>
18611
18612         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
18613         (MonoDebugVarInfo): Added `index' field for register based addresses.
18614         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
18615         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
18616         `MonoDebugVarInfo *params' and `guint32 this_offset' with
18617         `MonoDebugVarInfo *this_var'.
18618
18619         * debug-symfile.c (relocate_variable): New static function to write
18620         a location description for a local variable or method parameter.
18621
18622 2002-04-12  Martin Baulig  <martin@gnome.org>
18623
18624         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
18625         stack offset and begin/end scope address of a local variable.
18626         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
18627         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
18628         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
18629
18630         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
18631         Added new relocation types for start/end scope of a local variable.
18632
18633 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
18634
18635         * object.h: add mono_object_domain() macro.
18636         * reflection.c: handle typespecs.
18637         * icall.c: MonoMethod::get_Name() implementation.
18638
18639 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18640
18641         * icall.c: String::GetHashCode() icall implementation.
18642
18643 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18644
18645         * icall.c: String::IndexOfAny icall.
18646         * object.c, object.h: make array->max_length more useful.
18647         Intrduced mono_object_class() and mono_string_length() macros.
18648
18649 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18650
18651         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
18652         instead of g_unichar_isdigit.
18653
18654 2002-04-11  Nick Drochak  <ndrochak@gol.com>
18655
18656         * icall.c: Implement a simple Double.ToString().
18657
18658 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
18659
18660         * appdomain.h: only io-layer.h is supposed to be included.
18661         * icall.c: explicitly import environ. Fix warning.
18662
18663 2002-04-10  Nick Drochak  <ndrochak@gol.com>
18664
18665         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
18666                 return true even if it's not Daylight Savings time.
18667                 Only return false for the case where the function isn't
18668                 implemented for a plaform (read Windows).
18669
18670 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
18671
18672         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
18673         data with a mutex.
18674
18675 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
18676
18677         * mempool.c (mono_mempool_alloc): only use g_malloc when
18678         absolutely necessary.
18679
18680 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
18681
18682         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
18683
18684         * class.c (mono_class_vtable): use domain mempool to allocate vtable
18685         (mono_class_proxy_vtable): use domain mempool
18686
18687 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
18688
18689         * appdomain.h, appdomain.c: split initialization that requires the
18690         execution engine support into mono_runtime_init().
18691
18692 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
18693
18694         * class.c (mono_class_init): don't include vtable inside MonoClass
18695         to save some memory, gather some statistics.
18696         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
18697
18698 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18699
18700         * icall.c: internalcall implementation for ValueType.Equals().
18701
18702 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
18703
18704         * object.c (mono_message_init): moved 
18705         (mono_runtime_exec_main): new arch. independent impl.
18706         (mono_runtime_invoke_array): new method - like
18707         mono_runtime_invoke, but you can pass an array of objects.
18708         (mono_remoting_invoke): new arch. independent impl.
18709         (mono_message_invoke): new arch. independent impl.
18710         (mono_runtime_class_init): new arch. independent impl.
18711         (mono_runtime_object_init): new arch. independent impl.
18712
18713 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
18714
18715         * metadata.c, object.c, reflection.c: documented the exported
18716         functions.
18717
18718 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
18719
18720         * icall.c: simpler code to pass the assembly builder data to corlib.
18721         Implement GetNestedTypes() internalcall.
18722
18723 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
18724
18725         * class.c: warn if a type can't be loaded.
18726
18727 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
18728
18729         * image.h: typedef MonoImageOpenStatus
18730         * types.h: removed unused file
18731         
18732 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
18733
18734         * icall.c: Enum_ToObject accepts enum value arguments.
18735
18736 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
18737
18738         * class.c: move initialization of properties, events and nested
18739         classes, so that they happen for interfaces, too.
18740
18741 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
18742
18743         * icall.c: cleanup some ugly casts in Array_SetValue*.
18744
18745 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
18746
18747         * icall.c: the values array fro enums is of the correct type, now.
18748         Implement (correctly) getFullName instead of assQualifiedName for
18749         MonoType.
18750         * reflection.h, reflection.c: added mono_type_get_name ().
18751
18752 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
18753
18754         * assembly.c, image.h: for each MonoImage, record from wich assembly
18755         it was loaded.
18756         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
18757         Make Type.Assembly work.
18758
18759 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
18760
18761         * debug-symfile.h: use char* instead of gpointer to avoid
18762         unnecessary casts.
18763
18764         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
18765
18766         * icall.c (ves_icall_InternalExecute): impl. FielSetter
18767         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
18768
18769 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
18770
18771         * icall.c (mono_message_init): impl. (code cleanup)
18772         (ves_icall_InternalExecute): impl. FieldGetter
18773
18774         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
18775         defined we call all (non-static)methods through the vtable. 
18776
18777 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
18778
18779         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
18780         finalizer even though the memory is still referenced (and the chunk of
18781         memory is not freed).
18782
18783 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18784
18785         * assembly.c: fix brokeness.
18786
18787 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
18788
18789         * class.c: kill some warnings. Check explicit interface method
18790         implementation also without considering the namespace.
18791         Load also literal strings in static class data.
18792
18793 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
18794
18795         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
18796         (default_assembly_name_resolver): Make the resolver take the
18797         "base" directory where the assembly was originally defined, so we
18798         can load DLLs that are in the same directory as the assembly that
18799         is being referenced.
18800
18801 2002-03-28  Dick Porter  <dick@ximian.com>
18802
18803         * file-io.h: 
18804         * file-io.c:
18805         * socket-io.c: 
18806         * unicode.h: 
18807         * unicode.c: Warning cleanups
18808
18809 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
18810
18811         * object.h, reflection.h: use the correct type instead of MonoObject.
18812
18813 2002-03-28  Martin Baulig  <martin@gnome.org>
18814
18815         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
18816         (mono_debug_update_symbol_file): Initialize classes if necessary.
18817
18818 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
18819
18820         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
18821         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
18822
18823 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
18824
18825         * assembly.h: fix function prototype.
18826         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
18827         * mono-endian.h: use const cast.
18828
18829 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
18830
18831         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
18832
18833 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
18834
18835         * loader.c: don't assert when a typeref can't be loaded, give
18836         a chance to the runtime to trow an exception instead.
18837         * loader.h: fix warning.
18838
18839 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
18840
18841         * class.c (mono_class_proxy_vtable): added proxy support
18842
18843 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
18844
18845         * icall.c: removed last of PAL calls, added System.Environment
18846         * file-io.h, file-io.c: MonoIO implementation
18847         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
18848
18849 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
18850
18851         * appdomain.c: do not use the byte marker in ldstr table lookup.
18852         * debug-helpers.c: allow two ':' to separate class and method name.
18853         * object.c: allocate arrays bounds with the GC, too.
18854         * verify: add a few more checks.
18855
18856 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
18857
18858         * reflection.c: output also literal strings. Allocate parameter data
18859         with GC_malloc() (thanks, Martin, for catching this!).
18860
18861 2002-03-26  Martin Baulig  <martin@gnome.org>
18862
18863         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
18864         include the `this' offset in the `param_offsets'.
18865
18866 2002-03-25  Martin Baulig  <martin@gnome.org>
18867
18868         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
18869         mono_debug_get_class() function to get the classes. Added new
18870         relocation types for arrays and strings.
18871         (mono_debug_get_class): New static function to search in all
18872         referenced assemblies for a metadata token.
18873
18874         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
18875
18876 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
18877
18878         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
18879         hold gc-allocated objects. Make the string heap a stream like the
18880         others. Removed duplicated code when writing stream info.
18881         Added asserts to catch possible buffer overflows. Set the sorted map
18882         for tables that need sorting. Added some documentation.
18883
18884 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
18885
18886         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
18887         for interned strings and vtables.
18888
18889 2002-03-24  Martin Baulig  <martin@gnome.org>
18890
18891         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
18892         it in the array since it was created with g_slist_prepend().
18893
18894 2002-03-24  Martin Baulig  <martin@gnome.org>
18895
18896         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
18897         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
18898         (mono_debug_method_from_token): Renamed to
18899         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
18900         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
18901
18902         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
18903         relocation types.
18904
18905         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
18906
18907 2002-03-24  Martin Baulig  <martin@gnome.org>
18908
18909         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
18910         (mono_debug_method_from_token): New func.
18911
18912         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
18913         New interncall, calls mono_debug_local_type_from_signature().
18914         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
18915         calls mono_debug_method_from_token().
18916
18917 2002-03-23  Martin Baulig  <martin@gnome.org>
18918
18919         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
18920         specifies the number of bytes to be converted, not the array size.
18921         Return the number of chars, not the number of bytes.
18922         (ves_icall_iconv_get_chars): The `byteCount' argument
18923         specifies the number of bytes to be converted, not the array size.
18924
18925 2002-03-23  Martin Baulig  <martin@gnome.org>
18926
18927         * reflection.h (MonoReflectionSigHelper): New type.
18928
18929         * reflection.c (mono_reflection_sighelper_get_signature_local),
18930         (mono_reflection_sighelper_get_signature_local): New functions.
18931
18932         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
18933         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
18934         interncalls.
18935
18936 2002-03-23  Martin Baulig  <martin@gnome.org>
18937
18938         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
18939         is_writeable is set.
18940         (mono_raw_buffer_update): New function to write the modified map
18941         back to disk.
18942
18943         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
18944
18945         * debug-symfile.c (mono_debug_update_symbol_file): Call
18946         mono_raw_buffer_update() when done writing.
18947
18948 2002-03-23  Martin Baulig  <martin@gnome.org>
18949
18950         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
18951
18952         * debug-symfile.c: Added support for arguments and local variables.
18953
18954 2002-03-23  Dick Porter  <dick@ximian.com>
18955
18956         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
18957         protected by ifdefs, hence breaking the w32 build.
18958
18959 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
18960
18961         * object.c: implement is_interned() the right way.
18962
18963 2002-03-21  Martin Baulig  <martin@gnome.org>
18964
18965         * debug-symfile.[ch]: New files to handle debugging information
18966         files. There's also support to dynamically update these symbol
18967         files to include machine dependent information.
18968
18969 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
18970
18971         * threads.c (mono_thread_create): new function to create thread
18972         from C
18973
18974 2002-03-20  Martin Baulig  <martin@gnome.org>
18975
18976         * icall.c (ves_icall_InternalInvoke): Create a new object if the
18977         method is a constructor.
18978         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
18979         points to ves_icall_InternalInvoke().
18980
18981 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
18982
18983         * file-io.c: Flush shouldn't throw exceptions.
18984
18985 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
18986
18987         * file-io.c: FileStream flush support; FileSetLength now
18988         restores file pointer.
18989
18990 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
18991
18992         * class.c: set image for pointer classes.
18993
18994 2002/03/19  Nick Drochak <ndrochak@gol.com>
18995
18996         * sysmath.c: Forgot one.
18997
18998 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
18999
19000         * sysmath.c: Avoid redefining existing names.
19001
19002 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
19003
19004         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
19005         handled by runtime as icall rather than dllimport from libm.so
19006         * file-io.c, file-io.h: fixed handle argument type.
19007
19008 2002-03-18  Dick Porter  <dick@ximian.com>
19009
19010         * reflection.c (mono_image_get_type_info): rename interface to
19011         iface, because of "#define interface struct" on windows.
19012
19013 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
19014
19015         * class.c, class.h: rename and export mono_ptr_class_get().
19016         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
19017         * reflection.c, reflection.h, icall.c: better/saner type name
19018         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
19019         method signatures.
19020
19021 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
19022
19023         * class.c (mono_class_init): removed hardcoded GHC_SLOT
19024
19025         * icall.c (ves_icall_InternalInvoke): impl.
19026
19027 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
19028
19029         * reflection.c: output the interface map table, too.
19030
19031 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
19032
19033         * class.c (class_compute_field_layout): separate computation of 
19034         static field layout
19035
19036 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
19037
19038         * icall.c: added System.Buffer support.
19039         * file-io.c: moved file icalls from PAL to FileStream.
19040
19041 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
19042
19043         * icall.c (ves_icall_System_Object_GetHashCode): impl.
19044
19045 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
19046
19047         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
19048
19049 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19050
19051         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
19052
19053 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19054
19055         * debug-helpers.{c,h}: moved here from monograph some useful functions
19056         to locate a method by name/signature in a class or image. Included
19057         also a small and flexible IL disassembler.
19058
19059 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19060
19061         * reflection.c: fixup tokens in methods with small header size, too.
19062
19063 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
19064
19065         * object.c (mono_string_to_utf8): remove assert(!error), instead
19066         print a warning. 
19067
19068 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
19069
19070         * icall.c: update to the new mono_Array_class_get interface.
19071
19072 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
19073
19074         * appdomain.c, object.c: Boehm-GC enable.
19075         * icall.c: make get_data_chunk() support split data requests.
19076         Ensure a class is initialized in more cases. Return only the first
19077         property found in GetProperties() or the compiler gets confused. 
19078         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
19079         * reflection.h, reflection.c: add fixup mechanism for field and method
19080         tokens. Initialize assembly->typeref in a single place. Output
19081         properties after events. Support custom attributes for events, too.
19082         Typo fix for paramter custom attrs.
19083
19084 2002-03-07  Martin Baulig  <martin@gnome.org>
19085
19086         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
19087
19088 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
19089
19090         * class.c (mono_array_class_get): fix. for multi. dim. arrays
19091
19092 2002-03-06  Martin Baulig  <martin@gnome.org>
19093
19094         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
19095         non-zero lower bounds. See testcases #F10-#F13.
19096
19097 2002-03-05  Martin Baulig  <martin@gnome.org>
19098
19099         * exception.c (mono_get_exception_argument_out_of_range): New exception.
19100
19101         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
19102         ves_icall_System_Array_GetValue(), only calculate the absolute array position
19103         here.
19104         (ves_icall_System_Array_SetValue): Likewise.
19105         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
19106         as argument and does the actual work. This function is used when copying a
19107         multi-dimensional array.
19108         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
19109         now do all the widening conversions of value types.
19110         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
19111
19112 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19113
19114         * class.c: remove some magic numbers and use the smbolic names,
19115         instead. Added init_events() to load event info at class init time.
19116         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
19117         and mono_metadata_methods_from_event().
19118         * reflection.h, reflection.c: added support for writing out the evnets
19119         related information.
19120
19121 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
19122
19123         * reflection.h, icall.c: use a different method (GetInterfaces)
19124         to gather interface info and add isbyref, isprimitive and
19125         ispointer to the ves_icall_get_type_info() return value.
19126
19127 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
19128
19129         * class.h: stared adding support for events.
19130         * icall.c: split find_members implementation. Added debug icall to get
19131         the address of an object.
19132         * reflection.c: handle TypeBuilders in mono_type_get_object().
19133
19134 2002-03-01  Martin Baulig  <martin@gnome.org>
19135
19136         * icall.c (ves_icall_System_Array_GetLength): This must throw an
19137         ArgumentOutOfRangeException(), not an ArgumentException().
19138         (ves_icall_System_Array_GetLowerBound): Likewise.
19139         (ves_icall_System_Array_GetValue): Improved argument checking.
19140         (ves_icall_System_Array_SetValue): Improved argument checking.
19141
19142 2002-03-01  Martin Baulig  <martin@gnome.org>
19143
19144         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
19145         called with invalid arguments rather than just dying with g_assert().
19146         (ves_icall_System_Array_SetValue): Likewise.
19147         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
19148         raise a NotImplementedException instead.
19149         (ves_icall_System_Array_GetLength): Added argument checking.
19150         (ves_icall_System_Array_GetLowerBound): Added argument checking.
19151
19152 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
19153
19154         * object.h (mono_assert): new macros mono_assert and
19155         mono_assert_not_reached
19156
19157 2002-02-28  Martin Baulig  <martin@gnome.org>
19158
19159         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
19160         and "System::String::IsInterned" to "System::String::_IsInterned".
19161
19162 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
19163
19164         * icall.c: remove hacks for typebuilder. Added icall to create a
19165         modified type from a tybebuilder.
19166         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
19167         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
19168         to create a backing MonoClass for a TypeBuilder.
19169
19170 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
19171
19172         * class.c, class.h: more refactoring of class init.
19173         Export mono_class_setup_mono_type() and mono_class_setup_parent().
19174
19175 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
19176
19177         * marshal.c, marshal.h: start of marshaling interface.
19178
19179 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
19180
19181         * icall.c: fix order in assembly qualified name icall.
19182
19183 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
19184
19185         * class.c: do not free str, since we store it in the hash table.
19186         * reflection.h: add label field to MonoILExceptionInfo.
19187         * reflection.c: handle references to more than one assembly. Handle
19188         case when there isn't a module created in the assembly.
19189
19190 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
19191
19192         * class.c: Fix typo. Start refactoring of class init code.
19193
19194 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
19195
19196         * appdomain.c: exit with 1 on error.
19197         * class.c: we already have the name in MonoClassField.
19198         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
19199         MonoStreamHeader instead of an offset of image->raw_metadata.
19200
19201 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
19202
19203         * appdomain.c (mono_init): Be even more descriptive about the error.
19204
19205 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
19206
19207         * appdomain.c: give the user an informative message when corlib can't
19208         be loaded.
19209
19210 2002-02-26  Martin Baulig  <martin@gnome.org>
19211
19212         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
19213         New icall to get the time zone data.
19214
19215 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
19216
19217         * reflection.c: set virtual and raw size of section correctly.
19218         * threads.c: transfer domain information to newly created threads.
19219
19220 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
19221
19222         * class.c: when instancing a class in a domain, load the default
19223         vaules for static fields from the constant table. Fix System.Enum to
19224         not be an enum.
19225         * icall.c: implement Object::GetType() internalcall. Implemented
19226         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
19227         Fixed checking of binding flags in find_members().
19228         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
19229         * reflection.c: handle enumerations when writing to the constant
19230         table. Use a different object cache for types.
19231
19232
19233 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
19234
19235         * object.c (mono_object_isinst): fix for arrays
19236
19237         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
19238
19239 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
19240
19241         * object.c: don't use mprotect ()  and fix intern pool hash table
19242         lookup for big endian systems.
19243
19244 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19245
19246         * icall.c: change type_is_subtype_of () signature.
19247
19248 2002-02-21  Mark Crichton  <crichton@gimp.org>
19249
19250         * rand.c, rand.h: Added random number generator for
19251         System.Security.Cryptography classes.
19252
19253         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
19254
19255         * icall.c: Added System.Security.Cryptography calls.
19256
19257 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
19258
19259         * class.c, icall.c, metadata.c: better support for pointer types.
19260         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
19261         * reflection.c: Add support for getting custom attrs for properties
19262         and simplify some code.
19263
19264 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
19265
19266         * icall.c: change getToken () and add custom attribute GetBlob()helper
19267         method.
19268         * reflection.h: add custom attrs array to the reflection builder structures.
19269         * reflection.c: encode and emit custom attributes for all the relevant
19270         reflection objects. Cache fieldref and methodref tokens. Change
19271         mono_image_create_token() interface to take a MonoDynamicAssembly.
19272         More complete custom attributes decoder. Load custom attributes for
19273         Assembly, Field, Method and Constructor objects, too. Make the
19274         returned array an Attribute[] one, not object[]. Added
19275         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
19276         custom attribute constructor.
19277
19278 2002-02-20  Dick Porter  <dick@ximian.com>
19279
19280         * icall.c:
19281         * rawbuffer.c:
19282         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
19283         problem code out for now).
19284
19285 2002-02-19  Radek Doulik  <rodo@ximian.com>
19286
19287         * object.c (mono_ldstr): use hash table to avoid multiple swapping
19288
19289 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
19290
19291         * icall.c: register the GetCustomAttributes method.
19292         * object.c, object.h: add mono_string_new_len ().
19293         * reflection.h, reflection.c: added mono_runtime_invoke(),
19294         mono_install_runtime_invoke(). Added
19295         mono_reflection_get_custom_attrs () to load custom attributes and
19296         create the attribute objects.
19297
19298 2002-02-19  Dick Porter  <dick@ximian.com>
19299         * threads-dummy-types.c:
19300         * threads-dummy-types.h:
19301         * threads-dummy.c:
19302         * threads-dummy.h:
19303         * threads-pthread-types.c:
19304         * threads-pthread-types.h:
19305         * threads-pthread.c:
19306         * threads-pthread.h:  Deleted obsolete files
19307
19308 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
19309
19310         * class.c (mono_class_vtable): runtime init the class when we
19311         allocate static class data.
19312
19313         * icall.c (ves_icall_System_Array_SetValue): check for null values.
19314
19315         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
19316         and String - but we will need generic marshalling support in the
19317         future. 
19318         (mono_init): set the domain name in a ms compatible way
19319
19320         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
19321         String[].
19322
19323 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
19324
19325         * object.c (mono_array_clone): use alloca() instead of g_malloc  
19326         for sizes
19327
19328         * appdomain.c (mono_domain_unload): impl.
19329
19330 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
19331
19332         * appdomain.c, object.c: fix intern pool implementation.
19333         * class.c: fix alignment code.
19334
19335 2002-02-16  Radek Doulik  <rodo@ximian.com>
19336
19337         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
19338         and s2 > s1, just copy lower bytes to be compatible with little
19339         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
19340         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
19341
19342         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
19343         force big_endian to be 1 for big endian machines 
19344         (ves_icall_iconv_new_decoder): ditto
19345
19346 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
19347
19348         * socket-io.c (convert_sockopt_level_and_name): If the system
19349         doesn't define SOL_IP or SOL_TCP, get them by hand using
19350         getprotobyname() and caching the values (because this could be a
19351         slow operation).
19352         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
19353         Use the appropriate struct when the system does support it. Ie,
19354         not all systems have struct ip_mreqn so use struct ip_mreq when
19355         appropriate.
19356
19357 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
19358
19359         * reflection.c: handle finally clauses.
19360
19361 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
19362
19363         * socket-io.c: use g_snprintf() instead of snprintf.
19364
19365 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
19366
19367         * reflection.c (mono_param_get_objects): Cast second argument to
19368         mono_method_get_param_names to a const char** to silence the
19369         compiler warning.
19370
19371         * appdomain.c (mono_domain_assembly_open): Put parens around the
19372         truth statement in the for-loop.
19373
19374         * unicode.c (iconv_convert): Got rid of a compiler warning about
19375         int i being unused when the system has a new iconv.
19376         (iconv_get_length): Same.
19377
19378         * image.c (load_class_names): Cast the second argument to
19379         g_hash_table_insert() to char* to hush compiler warnings about the
19380         arg being a const.
19381         (mono_image_open): Same here.
19382
19383         * socket-io.c: Don't conditionally include sys/filio.h or
19384         sys/sockio.h here anymore since we now get them from
19385         io-layer/io-layer.h
19386         (inet_pton): If the system doesn't support inet_aton, implement
19387         using inet_addr and also #define INADDR_NONE if it isn't defined
19388         by the system.
19389
19390 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
19391
19392         * metadata.c, metadata.h: added function to get packing and size info
19393         of a typedef.
19394         * reflection.h, reflection.c: handle field RVA data. Save info about
19395         the table layout if needed. Assign typedef indexes to all the types
19396         before dumping the info about them to avoid forward reference problems.
19397
19398 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
19399
19400         * socket-io.c (convert_sockopt_level_and_name): ifdef
19401         SO_ACCEPTCONN because it is not defined on my system (old debian)
19402
19403 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
19404
19405         * opcode.c: use stddef.h to get NULL.
19406
19407 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
19408
19409         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
19410         for FIONBIO, FIONREAD and SIOCATMARK.
19411         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
19412         define INADDR_NONE and besides, inet_addr() is deprecated and
19413         should not be used. Use inet_pton() instead - it also has the
19414         added bonus that it can easily handle IPv6 addresses as well.
19415         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
19416
19417 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
19418
19419         * decimal.c: remove _MSC_VER conditional.
19420
19421 2002-02-13  Dick Porter  <dick@ximian.com>
19422
19423         * socket-io.c: 
19424         * icall.c: Internal calls for Blocking, Select, Shutdown,
19425         GetSocketOption and SetSocketOption
19426
19427 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19428
19429         * assembly.cs: better resolver: use it instead of some kludgy
19430         code.
19431
19432 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
19433
19434         * reflection.c: the best way to speed-up the compiler is to avoid
19435         infinite loops.
19436
19437 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
19438
19439         * class.c (mono_class_vtable): changed the object layout
19440         (obj->vtable->class). 
19441         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
19442
19443 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
19444
19445         * assembly.c: look for assemblies in the assembly dir, too.
19446
19447 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19448
19449         * class.c: fix thinko in mono_class_from_type().
19450
19451 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
19452
19453         * exception.h, exception.c: added TypeLoadException.
19454         * object.h, object.c: added mono_array_clone ().
19455         * icall.c: handle throwOnError in AssemblyGetType().
19456         Added Array.Clone().
19457         * opcode.h, opcode.c: use a single value for the opcode val.
19458         Compile fix for non-gcc compilers.
19459
19460 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
19461
19462         * opcodes.c, opcodes.h: export interesting info about opcodes.
19463
19464 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
19465
19466         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
19467         icalls. 
19468
19469         * class.c (class_compute_field_layout): set element_class for enums
19470         (mono_class_create_from_typedef): set element_class for normal classes
19471
19472         * icall.c (ves_icall_System_Enum_get_value): impl.
19473
19474         * class.c (mono_class_create_from_typedef): do not set valuetype
19475         flag for System.ValueType and System.Enum
19476
19477 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
19478
19479         * unicode.c (iconv_convert): fix big endian problem.
19480
19481 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
19482
19483         * class.c: add asserts if we are ever going to scribble over memory.
19484         * socket-io.c: not all systems have AF_IRDA defined.
19485
19486 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
19487
19488         * class.c (class_compute_field_layout): do not consider static
19489         fields to compute alignment
19490
19491 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
19492
19493         * appdomain.c (mono_appdomain_get): impl.
19494         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
19495
19496 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
19497
19498         * icall.c: ignore "file://" prefix when loading an assembly.
19499
19500 2002-01-23  Dick Porter  <dick@ximian.com>
19501
19502         * socket-io.c:
19503         * icall.c:
19504         * Makefile.am: Added socket support
19505
19506 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
19507
19508         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
19509         code back.  This should return the assemblies that are loaded by
19510         the runtime on behalf of an application domain. 
19511
19512         The current implementation is still broken, it just returns every
19513         assembly loaded, but until we get real applications domain this
19514         will do.
19515
19516 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
19517
19518         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
19519         AppDomain object.
19520
19521 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
19522
19523         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
19524         the mono_class_from_name lookup.
19525         (ves_icall_get_parameter_info): ditto.
19526         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
19527         method.
19528         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
19529
19530 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
19531
19532         * class.c: load also nested classes on class init.
19533         System.ValueType instance methods gets passed boxed
19534         values, unless methods in derived classed that get a pointer to the
19535         data.
19536         * icall.c: use better name parsing code in GetType().
19537         * image.c, image.h: add mono_image_loaded ().
19538         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
19539         * reflection.c, reflection.h: added mono_reflection_parse_type().
19540
19541 2002-01-22  Veronica De Santis <veron78@interfree.it>
19542
19543         * icall.c : Added mapping of internal calls for Manual and Auto reset events
19544         * threads.c : Added the implementation of internal calls for events
19545         * threads.h : Added prototypes of internal calls for events
19546         
19547 2002-01-21  Radek Doulik  <rodo@ximian.com>
19548
19549         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
19550
19551 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
19552
19553         * class.c (mono_class_init): set min_align to 1 (instead of 0)
19554         (mono_class_value_size): use min_align
19555
19556 2002-01-20  Dick Porter  <dick@ximian.com>
19557
19558         * threads.h:
19559         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
19560         so it compiles on w32.
19561
19562 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
19563
19564         * metadata.c (mono_type_stack_size): impl.
19565
19566         * class.c (mono_class_get_field): impl. memberref token
19567
19568 2002-01-16 Veronica De Santis <veron78@@interfree.it>
19569
19570         * icall.h : Added the internal calls mapping for CreateMutex_internal
19571                     and ReleaseMutex_internal.
19572         * threads.h : Added the prototype of mutexes internal calls.
19573         * threads.c : Added the implementations of mutexes internal calls.
19574
19575 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
19576
19577         * metaparse.h: removed unused file.
19578         * reflection.c, reflection.h: added stream_data_align () function 
19579         to align data in streams and keep stream aligned. Add support for
19580         exception support in method headers.
19581
19582 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
19583
19584         * unicode.c: make iconv_convert () return the number of bytess written
19585         in the output buffer.
19586
19587 2002-01-15  Dick Porter  <dick@ximian.com>
19588         * threads.c: Make the runtime's idea of infinite timeouts coincide
19589         with the class library's
19590
19591         Fix a particularly egregious bug in mono_thread_cleanup(). That
19592         code was so utterly bogus it must have been written on a Monday.
19593
19594 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
19595
19596         * reflection.h: add subtypes field to TypeBuilder.
19597         * reflection.c: encode constants for literal fields.
19598         Handle subtypes. Fix user string token (and add a zero byte)
19599         at the end.
19600         
19601 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
19602
19603         * class.c (mono_class_init): bug fix: assign slot numbers for
19604         abstract methods.
19605
19606 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
19607
19608         * reflection.c: don't try to output a code RVA for abstract methods.
19609         Small fixes for method header format. Output parameter info to the
19610         ParamDef table. Save method overriding info to MethodImpl table.
19611         Fix property support. Allow typedef.extends to be a type in the
19612         building assembly.
19613         * verify.c: fix off-by-one error.
19614
19615 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
19616
19617         * class.c: fix mono_class_from_mono_type () for szarray types.
19618         Remove unused cache check in mono_class_from_type_spec().
19619         * icall.c: *type_from_name () functions handle simple arrays and byref.
19620         * reflection.c: handle byref and szarray types. Handle methods without
19621         body (gets P/Invoke compilation working). Handle types and fields in
19622         get_token ().
19623         * reflection.h: add rank to MonoTypeInfo.
19624
19625 2002-01-10  Dick Porter  <dick@ximian.com>
19626
19627         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
19628         internal calls
19629
19630 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
19631
19632         * icall.c: initialize class in type_from_handle ().
19633         Loop also in parent classes for get_method ().
19634         * reflection.c: properly encode class and valuetype types.
19635         Start on encoding TypeBuilder types. Handle fieldrefs.
19636         Use correct length when registering a user string.
19637         Handle ConstructorBuilder and MonoMethod in get_token ().
19638         Make mono_type_get_object () aware of cached types.
19639         * object.c: back out change to mono_string_new ().
19640
19641 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
19642         * object.c: mono_string_new should return a NULL when the string 
19643         passed in is NULL -- not try to deference it.
19644         
19645 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
19646
19647         * icall.c: hack to make IsSubType work for TypeBuilders.
19648         * reflection.c: emit constructors before methods.
19649         Retrieve param names in mono_param_get_objects().
19650
19651 2002/01/05  Nick Drochak  <ndrochak@gol.com>
19652
19653         * Makefile.am: fix list of headers and sources so automake 1.5
19654         doesn't complain. Removed \# at end of list.
19655
19656 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
19657
19658         * reflection.c: get token for a method ref. Set return type of
19659         constructor to void.
19660         * loader.c: debug message.
19661         * class.c: typo fix.
19662
19663 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
19664
19665         * icall.c: fix array init with rank > 1. FindMembers
19666         loops in parent class as well.
19667         * image.c: do not insert nested types in name cache.
19668         * reflection.c: warning fix.
19669         * reflection.h: add override method (for interface impl).
19670
19671 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
19672
19673         * metadata.c: fix customattr decoding.
19674
19675 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
19676
19677         * rawbuffer.cs: Added native Win32 implementation, avoids using
19678         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
19679
19680 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
19681
19682         * class.c: make the low-level routines handle the cache.
19683
19684 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
19685
19686         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
19687
19688 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
19689
19690         * class.c: fix mono_array_element_size() for objects.
19691         * class.h, class.c: add properties to MonoClass and load them
19692         at init time.
19693         * icall.c: check with isinst() when assigning a value to an array
19694         instead of requiring the classes to match exactly.
19695         Implemented icall for System.Type::GetType().
19696         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
19697         enums. Handle bindingflags when looking for methods and fields.
19698         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
19699         and mono_metadata_methods_from_property().
19700         * reflection.h, reflection.c: added structures for propreties,
19701         parameters and enums. Implemented mono_property_get_object() and
19702         mono_param_get_objects().
19703
19704 2001-12-18  Dick Porter  <dick@ximian.com>
19705
19706         * file-io.c: Use mono_string_to_utf16() instead of
19707         mono_string_chars()
19708
19709         * object.c: Added mono_string_to_utf16(), which copies the non
19710         NULL-terminated MonoString into a new double-null-terminated
19711         buffer.
19712
19713 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
19714
19715         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
19716
19717 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
19718
19719         * file-io.c: raise exceptions if handle is invalid.
19720
19721 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
19722
19723         * assembly.c: yet another check for mscorlib.
19724         * class.c, class.h: load nesting info for classes.
19725         * icall.c: many new functions to support the Reflection classes.
19726         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
19727         * reflection.h, reflection.c: mono_image_create_token(),
19728         mono_assembly_get_object(), mono_type_get_object(),
19729         mono_method_get_object(), mono_field_get_object(): methods to return
19730         objects that parallel the C representation of assemblies, types,
19731         methods, fields.
19732
19733 2001-12-11  Dick Porter  <dick@ximian.com>
19734
19735         * icall.c:
19736         * file-io.c: Internal calls for file IO.
19737
19738 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
19739
19740         * tabledefs.h: missing FileAttributes.
19741         * verify.h, verify.c: use is_valid_string () to simplify and check for
19742         valid strings more correctly. Fix warnings and speeling.
19743         Check more tables: Filed, File, ModuleRef, StandAloneSig.
19744         Check code: branches, maxstack, method calls.
19745
19746 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
19747
19748         * object.c (mono_object_allocate): removed static, so that the jit
19749         can allocate value types.
19750
19751         * icall.c (ves_icall_System_DateTime_GetNow): impl.
19752
19753 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19754
19755         * class.c: init enum types right away and register the
19756         token->MonoClass map in mono_class_create_from_typedef ().
19757         * verify.h, verify.c: first cut of the verifier.
19758         * pedump.c: add --verify switch to verify metadata tables.
19759         * tabledefs.h: add some missing enums.
19760
19761 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
19762
19763         * class.c (mono_install_runtime_class_init): impl.
19764         (mono_class_init): renamed mono_class_metadata_init to
19765         mono_class_init, also removed the metadata_inited flag
19766
19767         * object.c (mono_object_isinst): use faster algorithm
19768
19769 2001-11-30  Radek Doulik  <rodo@ximian.com>
19770
19771         * mono-endian.h: reverted last change
19772         added function prototypes
19773
19774         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
19775         add mono-endian.c back
19776
19777         * mono-endian.c: returned back, as Paolo pointed out, it's needed
19778         for unaligned access, I've mistaked it with endianess. I am
19779         sorry.
19780         (mono_read16): fix reverted endianess
19781         (mono_read64): ditto
19782         (mono_read32): ditto
19783
19784 2001-11-30  Dick Porter  <dick@ximian.com>
19785
19786         * exception.c: Implement mono_exception_from_name()
19787
19788 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19789
19790         * metadata.h, metadata.c: remove params_size and locals_size and their
19791         calculation from the metadata code: they are only usefult to the
19792         interp.
19793
19794 2001-11-29  Radek Doulik  <rodo@ximian.com>
19795
19796         * object.c (mono_ldstr): swap bytes here, it's probably not the
19797         best place, but works for me now, I'll redo it once I know mono
19798         better, also note that I add PROT_WRITE and don't reset back, also
19799         note that it's only affects big endians, so x86 should be OK
19800
19801         * mono-endian.h (read16): use just glib macros for both endians
19802
19803         * mono-endian.c: removed as glib macros are used in in
19804         mono-endian.h so we don't need to care about endianess for read
19805         macros as glib does that for us already
19806
19807 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
19808
19809         * class.h, class.h: take minimum alignment into consideration so
19810         that the fields of a class remain aligned also when in an array.
19811
19812 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19813
19814         * loader.h, loader.c: add mono_method_get_param_names().
19815         * class.c: 0-init class fields.
19816
19817 2001-11-26  Dick Porter  <dick@ximian.com>
19818
19819         * icall.c:
19820         * threads-types.h:
19821         * threads.c: New file that handles System.Threading on all platforms
19822
19823         * object.c: 
19824         * object.h: Remove the synchronisation struct from MonoObject,
19825         replace it with a pointer that gets initialised on demand
19826
19827         * Makefile.am: Replace all the system-specific threading code with
19828         a single file that uses the new wrapper library
19829
19830 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
19831
19832         * class.c, class.h: add mono_install_trampoline() so that the runtime
19833         can register a function to create a trampoline: removes the ugly
19834         requirement that a runtime needed to export arch_create_jit_trampoline.
19835         * object.h, object.c: added mono_install_handler() so that the runtime
19836         can install an handler for exceptions generated in C code (with
19837         mono_raise_exception()). Added C struct for System.Delegate.
19838         * pedump.c: removed arch_create_jit_trampoline.
19839         * reflection.c: some cleanups to allow registering user strings and
19840         later getting a token for methodrefs and fieldrefs before the assembly
19841         is built.
19842         * row-indexes.h: updates and fixes from the new ECMA specs.
19843
19844 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
19845
19846         * class.h, class.c: add enum_basetype field to MonoClass.
19847         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
19848         to get index in the constant table reated to a field, param or
19849         property.
19850         * reflection.h, reflection.c: handle constructors. Set public-key and
19851         version number of the built assembly to 0.
19852         * row-indexes.h: update from new ECMA spec.
19853
19854 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19855
19856         * class.h, class.c: add a max_interface_id to MonoClass.
19857         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
19858         since it's used to do that. Added mono_type_type_from_obj().
19859         Make GetType() return NULL instead of segfaulting if the type was not
19860         found. Handle simple arrays in assQualifiedName.
19861         * object.h: add a struct to represent an Exception.
19862         * reflection.c: output call convention in method signature.
19863         Add code to support P/Invoke methods and fixed offsets for fields.
19864
19865 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
19866
19867         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
19868         the value.
19869         * icall.c: use mono_array_addr instead of array->vector: fixes the
19870         reflection image writing.
19871         * reflection.c: init call convention byte to 0 in method signature.
19872         Encode the property signature. Don't output property-related methods
19873         twice. Really process the properties for a type (don't cast a field to
19874         a property, my mom always told me that).
19875         Fix 64 bit issues in pointer alignment in a different and more
19876         readable way.
19877
19878 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
19879
19880         * loader.h: Removed type class from MonoDefaults, added monotype
19881
19882         * loader.c: Loaded MonoType, removed loading of Type
19883
19884         * icall.c (my_mono_new_object): Now returns a System.MonoType,
19885         and fills in System.Type._impl with a RuntimeTypeHandle rather
19886         than the actual MonoClass *
19887
19888         (ves_icall_type_from_handle): change from type_class to
19889         monotype_class
19890
19891         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
19892         implemented
19893
19894         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
19895         implemented
19896
19897         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
19898
19899         (ves_icall_System_Reflection_Assembly_GetType): implemented
19900
19901         (ves_icall_System_MonoType_assQualifiedName): implemented
19902
19903         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
19904
19905 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
19906
19907         * assembly.c (mono_assembly_open): Implement a cache for the
19908         assemblies. 
19909
19910         (mono_assembly_close): only destroy the assembly when the last
19911         reference is gone.
19912         
19913 2001-11-09  Dick Porter  <dick@ximian.com>
19914
19915         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
19916
19917 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
19918
19919         * class.c (mono_class_metadata_init): bug fix: compute the right slot
19920
19921 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
19922
19923         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
19924         from Martin Weindel.
19925         * object.h: add mono_string_chars ().
19926
19927 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
19928
19929         * reflection.c (build_compressed_metadata): Eliminates warnings
19930         and uses 64-bit clean code.
19931
19932         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
19933         (mono_type_equal): Change signature to eliminate warnings.
19934
19935 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
19936
19937         * icall.c, loader.c: remove the internalcall array constructors.
19938         Changes to match the new MonoArray structure.
19939         * object.h, object.c: an array object doesn't allocate an extra
19940         vector. Add mono_array_new_full () to create jagged arrays easily.
19941
19942 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
19943
19944         * metadata.h, metadata.c: add mono_metadata_field_info () to
19945         retreive all the info about a field from vairous tables.
19946         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
19947         * class.h, class.c: augment MonoClassField with more info.
19948         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
19949         policy and load a field's RVA if needed.
19950
19951 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
19952
19953         * class.c (mono_class_metadata_init): create a trampoline for all
19954         virtual functions instead of actually compiling them.
19955
19956 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
19957
19958         * class.h, class.c: include name in MonoClassField.
19959         * class.c: fix fundamental type of System.Object and System.String.
19960         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
19961         tokens in ldtoken.
19962         * icall.c: remove internalcalls for the Reflection stuff that is now
19963         done in C# code.
19964         * loader.c: mono_field_from_memberref () implementation.
19965         * mono-endian.c: thinko (s/struct/union/g).
19966         * object.c, object.h: make the mono_string_* prototypes actually use
19967         MonoString instead of MonoObject.
19968         * reflection.c, reflection.h: updates for changes in the reflection
19969         code in corlib: we use C structures that map to the actual C# classes.
19970         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
19971         fat method header if needed and use the info from the ILGenerator for
19972         methods. Handle fields in types. Misc fixes.
19973
19974 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
19975
19976         * class.c (mono_class_metadata_init): bug fix: always allocate
19977         space for static class data
19978
19979 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
19980
19981         * class.c (mono_compute_relative_numbering): use relative
19982         numbering to support fast runtime type checks.
19983
19984 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
19985
19986         * class.c (mono_class_create_from_typeref): added debugging output
19987         to print class name when MonoDummy is returned instead of real class
19988
19989 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
19990
19991         * class.c (mono_class_metadata_init): interface offset table now
19992         contains pointers into the vtable - this is more efficient for the jit
19993
19994 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
19995
19996         * class.c (mono_class_metadata_init): use a temporary vtable (the
19997         old algorithm only worked for the interpreter, but not for the jit)
19998
19999 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
20000
20001         * loader.c (method_from_memberref): use mono_class_get to get the
20002         class of an array instead of using System.Array directly.
20003         (mono_get_method): also add MEMBERREF methods to the method cache
20004         which usefull for arrays.
20005
20006 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
20007
20008         * pedump.c (arch_compile_method): added to compute vtable entry
20009
20010         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
20011         number of interfaces.
20012         
20013         * class.h: merged MonoArrayClass into MonoClass
20014
20015         * class.c (mono_class_create_from_typedef): compute the vtable size and
20016         allocate space to include the vtable inside MonoClass
20017         (mono_class_metadata_init): initialize the vtable
20018
20019 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
20020
20021         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
20022         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
20023         * image.c: endian fixes by Laurent Rioux.
20024         * object.h, object.c: rename MonoStringObject to MonoString and
20025         MonoArrayObject to MonoArray. Change some function names to conform to
20026         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
20027         guint16* as first argument, so don't use char*.
20028         Provide macros to do the interesting things on arrays in a portable way.
20029         * threads-pthread.c: updates for the API changes and #include <sched.h>
20030         (required for sched_yield()).
20031         * icall.c: updates for the API changes above.
20032         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
20033         platforms that need them.
20034
20035 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
20036
20037         * class.c: set the correct type for all the fundamental
20038         type when loading the class.
20039
20040 2001-10-05  Dick Porter  <dick@ximian.com>
20041
20042         * threads-pthread.c (pthread_mutex_timedlock): Simple
20043         compatibility version for C libraries that lack this call.
20044
20045 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20046
20047         * class.c: MonoTypes stored in MonoClass are stored as
20048         fundamental MonoTypes when the class represents a
20049         fundamental type (System.Int32, ...).
20050         The TypeHandle return by ldtoken is a MonoType*.
20051         * icall.c: ves_icall_get_data_chunk () write out all the
20052         PE/COFF stuff. Implement ves_icall_define_method (),
20053         ves_icall_set_method_body (), ves_icall_type_from_handle ().
20054         * image.c: properly skip unknown streams.
20055         * loader.h, loader.c: add type_class to mono_defaults.
20056         * metadata.c, metadata.h: export compute_size () as
20057         mono_metadata_compute_size () with a better interface.
20058         Typo and C&P fixes.
20059         * pedump.c: don't try to print the entry point RVA if there is no entry point.
20060         * reflection.c, reflection.h: many cleanups, fixes, output method
20061         signatures and headers, typedef and typeref info, compress the metadata
20062         tables, output all the heap streams, cli header etc.
20063         * row-indexes.h: typo fixes.
20064
20065 2001-10-04  Dick Porter  <dick@ximian.com>
20066
20067         * object.h: Add a synchronisation mutex struct to MonoObject
20068
20069         * object.c (mono_new_object): Initialise the object
20070         synchronisation mutexes
20071
20072         * icall.c: System.Threading.Monitor internal calls
20073         
20074         * threads-pthread.h:
20075         * threads-pthread.c: System.Threading.Monitor internal calls
20076
20077         * threads-types.h: New file, includes the system-specific thread
20078         structures
20079         
20080         * threads-pthread-types.h:
20081         * threads-pthread-types.c: New files, handle pthread-specific
20082         synchronisation types
20083
20084         * threads-dummy-types.h: 
20085         * threads-dummy-types.c: New files of dummy support for
20086         thread-specific types
20087
20088         * metadata.c:
20089         * image.c:
20090         * pedump.c: include mono-endian.h not endian.h
20091         
20092         * Makefile.am: More threads files.
20093         Name mono-endian.h not endian.h
20094
20095 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
20096
20097         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
20098         stuff and implement a few more bits.
20099         * icall.c: a field needs to be dereferenced twice. Do not use the same
20100         name for two variables in the same scope.
20101         * image.c, image.h: cleanups.
20102
20103 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
20104
20105         * class.c (mono_class_metadata_init): bug fix: compute the right size
20106
20107 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
20108
20109         * icall.c: implemented some of the Reflection internalcalls.
20110         * image.c, image.h: start writing out the PE/COFF image.
20111         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
20112         that does the reverse than decode_blob_size ().
20113         * object.c: use mono_metadata_encode_value (). Move here
20114         temporary implementation of mono_string_to_utf8 ().
20115         * rawbuffer.c: make malloc_map static.
20116
20117 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20118
20119         * metadata.c: fix type comparison for arrays.
20120         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
20121         Added a couple of new classes to monodefaults.
20122         * icall.c: added a couple of Reflection-related internalcalls.
20123         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
20124         Added a byval_arg MonoType to MonoClass.
20125
20126 2001-09-28  Dick Porter  <dick@ximian.com>
20127
20128         * icall.c:
20129         * threads-pthread.h: 
20130         * threads-pthread.c: Implemented internal calls for
20131         LocalDataStoreSlot operations.  Applied mutexes around all shared
20132         data.  Reworked the thread creation and Start() operations to
20133         avoid a race condition.
20134         
20135         * threads-dummy.h:
20136         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
20137
20138 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
20139
20140         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
20141
20142 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
20143
20144         * class.c, loader.c: warn and return NULL instead of erroring out.
20145         * icall.c: added System.AppDomain::getCurDomain().
20146         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
20147
20148 2001-09-25  Dick Porter  <dick@ximian.com>
20149
20150         * threads-pthread.h:
20151         * threads-pthread.c: Implemented timed thread joining and added
20152         System.Threading.Thread::Join_internal internal call
20153
20154         * icall.c: Added System.Threading.Thread::Join_internal internal call
20155
20156         * threads-dummy.h:
20157         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
20158
20159 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
20160
20161         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
20162         mono_string_intern () to implement the semantics of the ldstr opcode
20163         and the interning of System.Strings.
20164         * icall.c: provide hooks to make String::IsIntern and String::Intern
20165         internalcalls.
20166
20167 2001-09-23  Dick Porter  <dick@ximian.com>
20168
20169         * threads-dummy.c: 
20170         * threads-dummy.h: New files of dummy threading routines
20171
20172         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
20173         support code based on system specifics
20174
20175         Rename PTHREAD_LIBS to THREAD_LIBS
20176         
20177 2001-09-23  Dick Porter  <dick@ximian.com>
20178
20179         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
20180         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
20181         internal calls.
20182         (mono_thread_init): Set up a Thread object instance to return when
20183         the main thread calls Thread.CurrentThread
20184         (mono_thread_cleanup): Wait for all subthreads to exit
20185
20186         * icall.c: New internal calls for System.Threading.Thread::Sleep
20187         (including Schedule) and CurrentThread
20188
20189         * threads.h: New file, to insulate thread-specific stuff from the
20190         rest of the code
20191
20192 2001-09-21  Dick Porter  <dick@ximian.com>
20193
20194         * threads-pthread.h: 
20195         * threads-pthread.c: New file, for handling pthreads-style
20196         threading support.  Start() now starts a new thread and executes
20197         the ThreadStart delegate instance.
20198
20199         * icall.c: Added the internalcall for
20200         System.Threading.Thread::Start_internal
20201
20202         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
20203
20204 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
20205
20206         * loader.c: work around the different signatures for delegates
20207         constructors csc generates in compiled code vs the ones compiled in mscorlib.
20208
20209 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
20210
20211         * class.h, class.c: add mono_class_get_field_from_name ().
20212         * *: Fix C comments and other ANSI C issues.
20213
20214 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
20215
20216         * endian.h, assembly.c: fix some endianness issues.
20217
20218 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
20219
20220         * loader.h, load.c: add delegate_class to mono_defaults.
20221         Handle runtime provided methods in mono_get_method ().
20222
20223 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
20224
20225         * loader.c (mono_get_method): use pinvoke for internal call
20226
20227         * icall.c: use pinvoke for internal call
20228
20229         * loader.c (method_from_memberref): set the method name
20230
20231 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
20232
20233         * metadata.c: help the compiler generate better code for
20234         mono_class_from_mono_type ().
20235
20236 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
20237
20238         * class.c (mono_class_metadata_init): delayed computing of the
20239         class size to mono_class_metadata_init ()
20240
20241 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
20242
20243         * class.c, class.h: add an interfaces member to MonoClass.
20244         * image.c, image.h: add assembly_name field to MonoImage
20245         from the assembly table.
20246         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
20247
20248 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
20249
20250         * class.c: Handle Array in mono_class_from_mono_type ().
20251         * metadata.c, pedump.c: some endian fixes.
20252
20253 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
20254
20255         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
20256         * metadata.c: fix small problem introduced with the latest commit.
20257
20258 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
20259
20260         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
20261         We don't need a MonoMetadata pointer anymore to compare signatures in
20262         mono_metadata_signature_equal (), update callers.
20263         Reduced memory usage an number of allocations for MonoMethodHeader and
20264         MonoMethodSignature.
20265
20266 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
20267
20268         * metadata.c: added compare for szarray.
20269
20270 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
20271
20272         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
20273         and add a couple more types to it and mono_defaults. Give an hint on
20274         classes that need implementing in our corlib and are referenced
20275         in mscorlib.
20276
20277 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
20278
20279         * class.h, class.c: keep track if a class is also an Enum.
20280         * loader.c: Implement a couple more types for use in libffi
20281         marshalling. Gives better diagnostics when failing to dlopen
20282         a library. Set method->klass for P/Invoke methods, too.
20283
20284 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
20285
20286         * class.c, class.h: add a MonoType this_arg to MonoClass that
20287         represents a pointer to an object of the class' type that
20288         can be used by the interpreter and later the type cache.
20289         Add best guess alignment info for valuetype objects.
20290
20291 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
20292
20293         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
20294         into MonoType: one less level of indirection and allocation and
20295         simplifies quite a bit of code. Added cache for MonoTypes that are
20296         used frequently, so that we don't need to allocate them all the time.
20297
20298 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
20299
20300         * class.c (mono_class_create_from_typedef): System.Enum is also a
20301         value type, although it does not derive from System.ValueType
20302         (maybe a bug in the ms compiler?)
20303
20304         * metadata.c (mono_type_size): return the right size for value types
20305
20306         * loader.c (mono_get_method): only initialize method header if not abstract
20307
20308         * class.c (mono_class_from_mono_type): use mono_default values. 
20309
20310 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
20311
20312         * *: use MonoClass pointers instead of <type_tokens>
20313         
20314         * class.h: new flag: metadata_inited.
20315
20316         * class.c (mono_class_metadata_init): impl.
20317         (mono_class_instance_size): impl.
20318         (mono_class_data_size): impl.
20319
20320 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
20321
20322         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
20323         MonoClass now has the name and name_space fields. 
20324         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
20325         mono_get_method () takes and optional MonoClass as argument.
20326         Removed mono_typedef_from_name() and added mono_class_token_from_name()
20327         instead that takes advantage of a map from class names to typedef
20328         tokens in MonoImage.
20329
20330 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
20331
20332         * metadata.c: zero is not a valid alignment boundary.
20333         Merge MONO_TYPE_VOID in default decoding code.
20334
20335 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
20336
20337         * image.h: merged MonoMetadata into MonoImage
20338
20339         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
20340         identify the type of elements.
20341
20342 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
20343
20344         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
20345         * cil-coff.h: split MonoMSDOSHeader and add size info.
20346         * image.c: add some consistency checks.
20347         * metadata.c: fix row size computation: one programmer
20348         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
20349         add explanation for the locator routine.
20350         Fix decoding of size in method header.
20351         
20352 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
20353
20354         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
20355         (g_concat_dir_and_file): Bring g_concat_dir_and_file
20356         function from gnome-libs.  This uses the right path separator
20357         based on the OS, and also works around a bug in some systems where
20358         a double slash is not allowed. 
20359         (default_assembly_name_resolver): Use g_concat_dir_and_file
20360         (mono_assembly_open): ditto.
20361
20362 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
20363
20364         * metadata.c (mono_metadata_signature_equal): impl.
20365
20366         * *: void is now a realy MonoType (instead of using NULL)
20367         
20368         * metadata.c (do_mono_metadata_parse_type): use
20369         mono_metadata_parse_type to parse void value.
20370
20371 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
20372
20373         * metadata.c, metadata.h: in the signature and method header store
20374         only the space required for holding the loca vars and incoming arguments.
20375
20376 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
20377
20378         * metadata.c (do_mono_metadata_parse_type): treat void like any
20379         other type (instead of assigning NULL);
20380
20381 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
20382
20383         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
20384
20385 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
20386
20387         * image.c (do_mono_image_open): added a cache for arrays.
20388
20389 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
20390
20391         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
20392         decode a single column from a row in a metadata table and changes
20393         to take advantage of it in the typedef locator (gives a nice speed up).
20394         Store offset info for function params.
20395
20396 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
20397
20398         * image.h (MONO_IMAGE_IS_CORLIB): removed 
20399
20400 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
20401
20402         * assembly.c: how could mono_assembly_close () had ever worked?
20403         * metadata.c, metadata.h: provide offset info for local vars.
20404         Implement mono_type_size () to take care of alignment as well
20405         as size (it was mono_field_type_size in cli/class.c before).
20406
20407 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
20408
20409         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
20410
20411         * assembly.h (CORLIB_NAME): set to corlib.dll
20412
20413         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
20414
20415 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
20416
20417         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
20418         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
20419         tokentype.h: massive namespace cleanup.
20420
20421 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
20422
20423         * metadata.h, metadata.c: decode exception clauses when parsing method header.
20424
20425 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
20426
20427         * metadata.c (mono_metadata_free_type): added check for type !=
20428         NULL (void) before calling mono_metadata_free_type()
20429
20430 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
20431
20432         * metadata.h, row_indexes.h: added header with enumerations to use
20433         to index in the columns from tables in metadata and to decode coded
20434         tokens: we should start using this instead of embedding magic numbers
20435         all over the code.
20436
20437 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
20438
20439         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
20440         Move metadata_t info from cli_image_info_t to MonoImage, where
20441         it's easily accessible. Changed all the uses accordingly.
20442         Added the method and class caches to MonoImage.
20443         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
20444         and mono_metadata_decode_value () signature to be more consistent
20445         with the other parse functions (and simplify code). Taken advantage
20446         of zero-length array allocation with GCC. Removed reduntant (and
20447         wrong) MonoFieldType struct and use MonoParam instead. Changed
20448         mono_metadata_parse_field_type () to use common code for parsing.
20449         Added mono_metadata_typedef_from_field () and
20450         mono_metadata_typedef_from_method () to lookup a typedef index from a
20451         field or method token.
20452         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
20453
20454 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
20455
20456         * metadata.c (mono_metadata_parse_field_type): Implement. 
20457         (do_mono_metadata_parse_type): Split engine from
20458         mono_metadata_parse_type, so that we can create smaller structures
20459         for things that just have one pointer to the MonoType (look at
20460         the MonoFieldType)
20461
20462 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
20463
20464         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
20465         as Jan Gray found out, it is incorrect. 
20466
20467 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
20468
20469         * assembly.c: Implement asssembly loading.  This loads an image
20470         and loads all the referenced assemblies.  Come to think of it, we
20471         could always do lazy loading of the assemblies. 
20472
20473         * image.c (mono_image_open): Keep loaded images in a hashtable.
20474
20475         * image.h (MonoImage): Add reference count.
20476
20477 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
20478
20479         * assembly.c (mono_assembly_open): Keep track of the file name in
20480         case the assembly has no ASSEMBLY table.
20481
20482         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
20483         from get.c here.
20484
20485 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
20486
20487         * metadata.c, metadata.h: decode local vars in method header
20488         parse function. Change callers accordingly.
20489
20490 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
20491
20492         * metadata.h, cil-coff.h: protect against multiple inclusion.
20493         Added some new structures to hold information decoded from metadata:
20494         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
20495         and relevant decoding/free functions.
20496         * metadata.c: implement decoding functions. Add warning for out of bounds
20497         index in mono_metadata_locate(). Implement mono_get_method () to retreive
20498         all the info about a method signature and invocation. Remove check on
20499         uninitialized local var in parse_mh() and fix memory leak.
20500
20501 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
20502
20503         * metadata.h: More macros.
20504
20505         * tokentype.h: New file.
20506
20507 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
20508
20509         * assembly.c: added a consistency check and initialize
20510         some structures with g_new0().
20511         * metadata.c: fixed a couple more bugs in table size computation
20512         and add other checks for out-of bound access to metadata.
20513
20514 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
20515
20516         * metatada.c: fix bugs computing table sizes. Spew a
20517         warning when index in string heap is out of bounds.
20518
20519 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
20520
20521         * metadata.h: Add a couple of macros to manipulate tokens. 
20522
20523 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
20524
20525         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
20526         cli_section_tables).
20527
20528 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
20529
20530         * metadata.c (mono_metadata_user_string): New function, provides
20531         access to the UserString heap. 
20532
20533 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
20534
20535         * metadata.c: Add inline documentation.
20536
20537 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
20538
20539         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
20540         files. 
20541
20542 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
20543
20544         * typeattr.h: New file, TypeAttribute flags. 
20545
20546 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
20547
20548         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
20549         mono_assembly_ensure_section): Section loading code.
20550         (load_section_tables): Load the sections.
20551
20552         * mono/metadata/metadata.c (mono_metadata_locate_token,
20553         mono_metadata_locate): Functions to locate the information
20554         definition given a token or a table and an index.
20555         (mono_metadata_compute_table_bases): New.
20556         (compute_size): New function to compute the sizes of the various
20557         tables.
20558
20559         * mono/metadata/metadata.h: Finish listing the different index
20560         types. 
20561
20562         * mono/metadata/pedump.c: Improve to dump new information.
20563
20564 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
20565
20566         * mono/metadata/metadata.c: Entered all the tables matching
20567         Beta2. 
20568
20569         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
20570
20571
20572