In mono/dis:
[mono.git] / mono / metadata / ChangeLog
1 2006-01-25  Ankit Jain  <jankit@novell.com>
2             Raja R Harinath  <rharinath@novell.com>
3
4         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
5         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
6         as necessary.
7
8 2006-01-25  Martin Baulig  <martin@ximian.com>
9
10         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
11         `MonoDebuggerThread' into debug-debugger.c.
12
13 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14
15         * profiler.c: fix printing of data.
16
17 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
18
19         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
20           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
21
22 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
23
24         * object.c: fix deadlock related to string interning.
25
26 2006-01-23  Martin Baulig  <martin@ximian.com>
27
28         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
29
30         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
31
32 2006-01-23  Martin Baulig  <martin@ximian.com>
33
34         * mono-debug.h: Moved the prototypes of some functions which are
35         used by the JIT here from mono-debug-debugger.h.
36
37 2006-01-21  Martin Baulig  <martin@ximian.com>
38
39         * Makefile.am: Don't install mono-debug-debugger.h.
40
41 2006-01-21  Martin Baulig  <martin@ximian.com>
42
43         * mono-debug-debugger.h: Enforce the private status of this header
44         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
45         Moved some stuff from mono-debugger-jit-wrapper.h here.
46
47 2006-01-20  Raja R Harinath  <rharinath@novell.com>
48
49         * class.c (mono_class_from_typeref): Add a sanity test to help
50         catch lack of assembly load/search hooks.
51
52 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
53
54         * marshal.c (emit_struct_conv): Relax the fields with same offset
55         check even more. Fixes #77230.
56
57 2006-01-18  Martin Baulig  <martin@ximian.com>
58
59         * loader.c (find_method_in_class): Added `gboolean is_inflated'
60         argument; if false, we compare the uninstantiated signatures.
61         (method_from_memberref): Compare the uninstantiated signatures;
62         fixes #76417.
63
64 2006-01-18  Robert Jordan  <robertj@gmx.net>
65
66         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
67         Clear the weak link. Fixes bug #77170.
68
69         * gc.c (mono_gchandle_free):
70         Reflect *-gc.c changes (tiny optimization).
71
72 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
73
74         * metadata.c (mono_metadata_signature_dup): Applied patch from
75         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
76         Fixes #77288.
77
78 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
79
80         * marshal.c (emit_struct_conv): Allow fields with the same offset when
81         marshalling from native to managed code. Fixes #77230.
82
83 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
84
85         * threadpool.c: fix problem (Mac only) when more than one asynchronous
86         connect. Fixes bug #77020.
87
88 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
89
90         * class.c: fixed id assignement for nested interfaces (bug #77275).
91         Added also better info for --print-vtable debugging.
92
93 2006-01-12  Martin Baulig  <martin@ximian.com>
94
95         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
96         interfaces on-the-fly; fixes #76625.
97
98         * class-internals.h
99         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
100         don't need that anymore.
101
102 2006-01-12  Miguel de Icaza  <miguel@novell.com>
103
104         * socket-io.c
105         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
106         To avoid initing the nested_classes when not needed I turned the
107         PeerCredData as a toplevel internal class, as it has to be shared
108         anyways. 
109
110         Fixes the CASA issue.
111
112 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
113
114         * domain.c: Accessors for MonoJitInfo
115
116         * profiler-private.h: Add jitinfo to the end jit hook
117
118         * profiler.[ch]: Define new hooks, called after jitting which give
119         the MonoJitInfo that was compiled
120
121 2006-01-10  Martin Baulig  <martin@ximian.com>
122
123         * class.c (mono_class_setup_events): Add support for generic
124         classes; fixes #76440.
125
126 2006-01-06  Raja R Harinath  <rharinath@novell.com>
127
128         Fix #77160.
129         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
130         on passed-in method.
131
132 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
133
134         * object.c (mono_runtime_invoke_array): Add Nullable support.
135
136         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
137
138 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
139
140         * file-io.c: Don't consider sockets as directory and avoid an endless
141         loop. Fix bug #76966.
142
143 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
144
145         * object.c (mono_nullable_init): New helper function.
146         (mono_nullable_box): Ditto.
147
148         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
149
150         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
151
152         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
153         
154 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
155
156         * class.c (mono_class_is_assignable_from): Make T assignable to 
157         Nullable<T>.
158
159 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
160
161         * appdomain.c: Bump corlib version to 46.
162         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
163         serialization purpose) and changed ves_icall_System_Reflection_
164         Assembly_get_code_base signature to accept a boolean (to escape, or 
165         not, the assembly code base).
166
167 2005-12-23  Dick Porter  <dick@ximian.com>
168
169         * icall.c: 
170         * threads-types.h: 
171         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
172         CreateEvent icall now returns "created" boolean parameter.
173
174 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
175
176         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
177         #76967.
178
179         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
180         when attr_klass is an interface. Fixes #77045.
181
182 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
183
184         * marshal.c (emit_struct_conv): Fix previous patch.
185         
186         * marshal.c (emit_struct_conv): Add a check for fields with the same
187         offset.
188
189 2005-12-20  Raja R Harinath  <rharinath@novell.com>
190
191         Fix regression in Mono.C5.
192         * class.c (mono_class_create_generic): If 'klass' is an interface
193         set up the interface offsets.
194         (mono_class_is_assignable_from): Don't throw away generic arguments.
195
196 2005-12-19  Raja R Harinath  <rharinath@novell.com>
197
198         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
199         type parameters.
200
201 2005-12-15  Raja R Harinath  <rharinath@novell.com>
202
203         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
204         dead store.
205         (do_mono_metadata_parse_generic_class): Don't pass the current
206         generic context when parsing the type being instantiated: it
207         cannot use it, anyway.
208
209         * loader.c (method_from_memberref): Don't inflate a signature if
210         it doesn't contain any type parameters.
211
212 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
213
214         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
215
216 2005-12-14  Martin Baulig  <martin@ximian.com>
217
218         * class.c
219         (mono_type_get_name_recurse): Don't return null for type
220         parameters and open generic classes.
221         (mono_class_setup_methods): Don't exclude generic instances.
222         (mono_get_unique_iid): Use different IDs for different
223         instantiations of the same generic type.
224         (mono_class_setup_vtable): Only use setup_generic_vtable() for
225         open generic instances; create a normal vtable for closed generic
226         instances.
227         (mono_class_setup_vtable_general): We're now also called for
228         closed generic instances.
229
230         * reflection.c
231         (mono_reflection_bind_generic_parameters): Correctly use
232         mono_metadata_lookup_generic_inst() everywhere.
233
234 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
235
236         * object.c (mono_class_create_runtime_vtable): Call 
237         mono_class_setup_vtable ().
238
239         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
240         function.
241         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
242         #76959.
243
244         * loader.c (mono_loader_set_error_type_load): Print the type load
245         warnings to the console so they are more visible to the user.
246         (mono_loader_set_error_method_load): Ditto.
247
248         * reflection.c (ensure_runtime_vtable): Revert the last change as it
249         is still broken.
250         
251         * reflection.c (ensure_runtime_vtable): Fix build.
252
253         * reflection.c (ensure_runtime_vtable): Disable an optimization which
254         doesn't work in all cases.
255
256 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
257
258         * object.c (mono_array_new_full): Treat a single dimensional array
259         with 0 lower bounds as an szarray. Fixes #76973.
260
261         * reflection.c (custom_attr_visible): Really fix this.
262
263 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
264
265         * reflection.c (custom_attr_visible): Allow nested public attributes
266         as well.
267
268         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
269         interface check.
270
271 2005-12-12  Raja R Harinath  <harinath@gmail.com>
272
273         * class.c (set_generic_param_owner): Delete.
274         (mono_class_create_from_typedef): Don't set ->owner field of
275         generic parameters to "param containers" of enclosing classes.
276         * reflection.c (mono_reflection_initialize_generic_parameter):
277         Likewise.
278
279 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
280
281         * reflection.c (custom_attr_visible): Fix build.
282
283 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
284
285         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
286         private attributes.
287         
288         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
289         handling of null parameter defaults.
290
291 2005-12-09  Raja R Harinath  <rharinath@novell.com>
292
293         * class.c (mono_class_from_generic_parameter): Don't set
294         klass->generic_container.
295         (my_mono_class_from_generic_parameter): Likewise.
296
297 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
298
299         * reflection.c (load_public_key): Fix a warning.
300         (method_encode_code): Fix unaligned accesses.
301
302 2005-12-07  Martin Baulig  <martin@ximian.com>
303
304         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
305
306         * reflection.c
307         (write_generic_param_entry): Encode our custom attrs.
308
309         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
310
311 2005-12-07  Martin Baulig  <martin@ximian.com>
312
313         * reflection.c (encode_new_constraint): Removed; we don't use the
314         `NewConstraintAttribute' anymore.
315
316 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
317
318         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
319         not fire a TypeResolve event when Assembly.GetType () is called.
320
321 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
322
323         Beginning of support for nullable types in the runtime. Parts of
324         this patch are from Martin.
325
326         * appdomain.c (MONO_CORLIB_VERSION): Bump
327
328         * domain.c (mono_init_internal): get the nullable type
329
330         * class.c (mono_class_is_nullable): New method
331         (mono_class_get_nullable_param): New mehod
332         (mono_class_create_generic): In types T? set cast_class to T
333
334         * class-internals.h (MonoDefaults): new nullable default class
335         (mono_class_get_nullable_param, mono_class_get_nullable_param):
336         new methods.
337
338 2005-12-05  Raja R Harinath  <rharinath@novell.com>
339
340         * metadata.c (select_container): New.  Refactor code to select the
341         appropriate GenericContainer given the type of generic parameter
342         we are looking for.
343         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
344         not a MonoGenericContext.  Use select_container.  Update parameters.
345         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
346         and MONO_TYPE_MVAR.
347         (unwrap_arrays): Remove duplicate tests.
348         (find_generic_param): Rename from 'has_same_context'.  Now walks a
349         generic instantiated class to find any arguments that are generic
350         parameters.
351         (mono_type_create_from_typespec_full): Use find_generic_param to
352         avoid evicting some generic instantiations from the typespec
353         cache.
354
355 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
356
357         * reflection.c: fixed writing of doubles on ARM FPA.
358
359 2005-12-02  Robert Jordan  <robertj@gmx.net>
360
361         * icall.c: Fixed EventInfo.ReflectedType (#76829).
362
363 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
364
365         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
366         least on SUSE 10 they are not the same (on debian, they are just the
367         same thing).
368
369 2005-12-01  Raja R Harinath  <rharinath@novell.com>
370
371         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
372         DeclaringType for VARs and MVARs.
373         * class.c (set_generic_param_owner): Fix initialization of owner
374         fields.
375
376 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
377
378         * icall.c: fixed Enum.ToObject() to correctly convert the values.
379
380 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
381
382         * threadpool.c: workaround for a bug that shows up on the Mac:
383         select()+connect() on a blocking socket is not like it should
384         be, so we proceed to connect() in that case, wasting the I/O
385         threadpool thread until connect succeedes. Fixes bug #75436.
386
387 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
388
389         * threadpool.c: fix typo when setting file descriptor states.
390
391 2005-11-28  Raja R Harinath  <rharinath@novell.com>
392
393         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
394         * metadata.c (mono_metadata_parse_method_signature_full): Don't
395         create a temporary signature container.
396         (mono_metadata_parse_generic_param): Update to changes.
397         (mono_type_create_from_typespec_full): Update to changes.
398         * loader.c (method_from_memberref): Don't use a
399         MonoGenericContainer while parsing a memberref signature.
400         (method_from_methodspec): Remove dead-store of the 'container'
401         variable.  It's overwritten before use.
402
403         * metadata.c (mono_type_create_from_typespec_full): Make debugging
404         checks tighter.
405         (mono_metadata_parse_generic_param): Likewise.
406         * loader.c (find_method_in_class): Does not need a
407         MonoGenericContainer.  Use 'mono_method_signature' rather than
408         'mono_method_signature_full'.
409         (find_method, mono_get_method_constrained, method_from_memberref):
410         Update to changes.
411
412         * metadata.c (mono_type_create_from_typespec_full): Ensure that
413         owner-less generic-parameters are never evicted from the typespec
414         cache.
415
416         * loader.c (method_from_memberref): Don't use the current context
417         when parsing signatures.
418         (method_from_methodspec, mono_get_method_from_token): Update to changes.
419
420         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
421         side-effects in g_assert.
422         * loader.c (mono_get_method_from_token): Resolve klass earlier so
423         that we don't potentially lose information.
424
425 2005-11-26  Dick Porter  <dick@ximian.com>
426
427         * icall.c:
428         * threads.c: icalls to implement basic (ie, not named)
429         System.Threading.Semaphore.
430
431 2005-11-24  Dick Porter  <dick@ximian.com>
432
433         * process.c
434         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
435         Use GetProcessId() if it's available.
436
437 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
438
439         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
440
441 2005-11-23  Raja R Harinath  <rharinath@novell.com>
442             Ankit Jain  <jankit@novell.com>
443
444         * loader.c (mono_get_method_from_token): Initialize 'method' field
445         of all generic parameters before parsing the signature.  Remove
446         code that "fixed"-up MVAR references.
447
448 2005-11-23  Ankit Jain  <jankit@novell.com>
449
450         * metadata.c (mono_metadata_has_generic_params):
451         (mono_metadata_load_generic_param_constraints):
452         (mono_metadata_load_generic_params): Move duplicate code ...
453         (mono_metadata_get_generic_param_row): ... here. Returns the
454         first row-id in GenericParam table for a given owner (token).
455         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
456         prototype.
457
458 2005-11-23  Raja R Harinath  <rharinath@novell.com>
459             Ankit Jain  <jankit@novell.com>
460
461         * metadata.c (mono_metadata_class_equal): Pass signature_only when
462         comparing VARs too.
463         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
464         type->data.generic_param only if the type is an MVAR.
465         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
466         leak owner-less VARs and MVARs into managed space.
467
468 2005-11-21  Martin Baulig  <martin@ximian.com>
469
470         * class-internals.h
471         (MonoMethod): Moved the `generic_container' here from
472         `MonoMethodNormal' since we now also need it for
473         `MonoMethodPInvoke';
474         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
475         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
476         an union containing both `MonoMethodNormal' and
477         `MonoMethodPInvoke'.
478
479         * loader.c
480         (mono_get_method_from_token): Allow implementing generic methods
481         as interncalls.
482
483         * threads.c
484         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
485         icall.
486
487 2005-11-17  Dick Porter  <dick@ximian.com>
488
489         * icall.c: 
490         * process.h: 
491         * process.c: Split the Process Start_internal icall into
492         ShellExecuteEx_internal and CreateProcess_internal, which are
493         called depending on whether UseShellExecute is true.  Fixes bug
494         76670.
495
496         * appdomain.c (MONO_CORLIB_VERSION): Incremented
497
498 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
499
500         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
501         'msize' parameters, use the information in 'mspec' instead.
502         (emit_object_to_ptr_conv): Ditto.
503
504         * marshal.c (emit_struct_conv): Handle explicit layout structs with
505         fields out of order. Fixes #76733.
506
507 2005-11-17  Ankit Jain  <jankit@novell.com>
508
509         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
510
511 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
512
513         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
514           bug #76575.
515
516 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
517
518         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
519         for types with non-auto layout. Fixes #76717.
520
521 2005-11-16  Ankit Jain  <jankit@novell.com>
522
523         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
524         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
525         if generic_context is null.
526           (mono_metadata_generic_param_equal): param->owner can be null.
527           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
528         null.
529
530 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
531
532         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
533         the correct value.
534
535 2005-11-15  Martin Baulig  <martin@ximian.com>
536
537         * object.c (set_value): Use mono_class_from_mono_type() instead of
538         the hack for generic instances; fixes #76136.
539
540 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
541
542         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
543         fields.
544
545         * image.c (load_metadata_ptrs): Initialize the new fields.
546
547         * reflection.c (create_dynamic_mono_image): Ditto.
548
549         * reflection.c (build_compressed_metadata): Use the new fields.
550
551         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
552         icall.
553
554         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
555         icall.
556         
557 2005-11-15  Ankit Jain  <jankit@novell.com>
558             Raja R Harinath  <harinath@gmail.com>
559
560         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
561         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
562         new per-generic_container cache if the cached MonoType's context matches
563         the current context.
564           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
565         to the expected context.
566           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
567
568 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
569
570         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
571         we changed the signature of an icall.
572         * icall.c: Modify to mono_double_ParseImpl return true/false 
573         depending on the success, instead of throwing the exception. This will
574         help us in Double.TryParse methods.
575         
576 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
577
578         * marshal.c (emit_marshal_object): Throw an exception when
579         marshalling 'object' instead of crashing. Fixes #76696.
580
581 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
582
583         * class-internals.h: Add prototype for mono_type_get_full_name ().
584
585 2005-11-11  Dick Porter  <dick@ximian.com>
586
587         * threads.c (mono_thread_manage): Make sure the main thread has
588         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
589
590 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
591
592         * loader.c (mono_loader_set_error_type_load): Log a warning to the
593         console about the missing type.
594         (mono_loader_set_error_method_load): Ditto.
595
596 2005-11-09  Miguel de Icaza  <miguel@novell.com>
597
598         * mono-config.c (mono_get_config_dir): Set the system defaults if
599         none is specified.
600
601         * assembly.c (mono_set_dirs): New API entry point to set the
602         assembly and the config directory in one call
603
604 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
605
606         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
607         the ftnptr was created from a delegate in a domain other than the
608         current domain. Fixes #75377.
609
610         * exception.h exception.c: Add mono_get_exception_not_supported ().
611
612 2005-11-08  Martin Baulig  <martin@ximian.com>
613
614         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
615
616 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
617
618         * security-manager.h: Added definitions to deal with strongname key 
619         pairs bigger (and smaller) than 1024 bits.
620         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
621         adjust wrt the public key length being used.
622
623 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
624
625         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
626           Windows build (r51396-51397).
627
628 2005-11-03  Martin Baulig  <martin@ximian.com>
629
630         * class.c (mono_class_setup_vtable_general): Also add generic
631         methods to the vtable; fixes #76581.
632
633 2005-11-01  Miguel de Icaza  <miguel@novell.com>
634
635         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
636         sure that we lookup GetString method from the System.Text.Encoding
637         class, not the derived class or we get an empty method.
638
639         Fixed class #76612.
640
641 2005-10-25  Miguel de Icaza  <miguel@novell.com>
642
643         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
644         if it has been previously set (embedders). 
645
646         Make mono_set_rootdir available also on Unix.
647
648 005-10-24  Robert Jordan  <robertj@gmx.net>
649
650         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
651
652 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
653
654         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
655         only calls which are made to native code use this flag.
656
657         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
658
659 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
660
661         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
662         Add support for FieldBuilders.
663
664 2005-10-29  Martin Baulig  <martin@ximian.com>
665
666         * mono-debug.c
667         (mono_debug_using_mono_debugger): New public method; returns
668         whether we're running inside the debugger.
669
670 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
671
672         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
673         for Method/Constructor/FieldBuilders.
674
675 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
676
677         * reflection.c (module_add_cattrs): Save custom attributes for global methods
678         and fields as well.
679
680 2005-10-26  Martin Baulig  <martin@ximian.com>
681
682         * mono-debug-debugger.c
683         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
684
685 2005-10-24  Raja R Harinath  <harinath@gmail.com>
686
687         * icall.c (base64_to_byte_array): Don't pass an out-of-range
688         integer to isspace.
689
690 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
691
692         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
693         when passing valuetypes byref. Fixes #76502.
694
695 2005-10-19  Jackson Harper  <jackson@ximian.com>
696
697         * profiler.c: Don't put a . in front of types that are not in a
698         namespace.
699
700 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
701
702         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
703
704 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
705
706         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
707         #76436.
708         (mono_marshal_get_ldflda_wrapper): Fix a warning.
709
710 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
711
712         * assembly.c metadata-internals.h icall.c: Define an additional
713         parameter for mono_assembly_name_parse_full, so we can avoid creating
714         S.R.AssemblyName.Version when no version info wasn't passed.
715         
716 2005-10-09  Miguel de Icaza  <miguel@novell.com>
717
718         * class.c (mono_type_get_full_name): Reimplement method that was
719         removed. 
720
721         * image.c: Some docs
722
723 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
724
725         * profiler.c (output_newobj_profile): Fix printing of Total memory
726         on x86.
727
728 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
729
730         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
731
732 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
733
734         * threads.c: remove debug output.
735
736 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
737
738         * threads.c (mono_thread_manage): Fix crashes if more than 64
739         threads need to be aborted. Hopefully fixes #75899.
740
741         * assembly.c (mono_stringify_assembly_name): New helper function.
742
743         * class.c: Use mono_stringify_assembly_name instead of the similar
744         static function.
745
746         * assembly.h assembly.c: Add support for calling a postload search 
747         hook if an assembly cannot be loaded.
748
749         * appdomain.c: Register new search hooks which call the AssemblyResolve
750         events in AppDomain. Fixes #75231
751
752 2005-10-07  Martin Baulig  <martin@ximian.com>
753
754         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
755         methods without debug info.
756
757 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
758
759         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
760         wrappers.
761
762 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
763
764         * file-io.c: now that we return symlinks, use lstat and, when the file
765         is a symbolic link, stat, to get the file attributes. Also avoid the
766         conversion to/from utf16/external.
767
768 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
769
770         * class.c (mono_class_layout_fields): Compute klass->has_references
771         correctly if an embedded valuetype is not yet initialized. Fixes
772         #76331.
773
774 2005-10-04  Martin Baulig  <martin@ximian.com>
775
776         * metadata.c
777         (mono_metadata_load_generic_param_constraints): New public
778         function; splitted the constraints loading out from
779         mono_metadata_load_generic_params().
780
781         * class.c (mono_class_create_from_typedef): Call
782         mono_metadata_load_generic_param_constraints() after setting up
783         the type and creating our parent; fixes #75329.
784
785 2005-10-04  Martin Baulig  <martin@ximian.com>
786
787         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
788         non-dynamic parent classes.
789
790 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
791
792         * file-io.c : win32 build fix (ETXTBSY seems not found).
793
794 2005-10-04  Martin Baulig  <martin@ximian.com>
795
796         * reflection.c
797         (mono_image_get_methodspec_token): Make the cache actually work;
798         fixes #75974.
799
800 2005-10-04  Martin Baulig  <martin@ximian.com>
801
802         * class.c (mono_class_name_from_token): Removed the unneccessary
803         `MonoGenericContext *' argument.
804
805 2005-10-04  Martin Baulig  <martin@ximian.com>
806
807         * loader.c
808         (method_from_methodspec): Make the caching work again; fixes the
809         performance regression from #76262.
810
811 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
812
813         * file-io.c:
814         * file-io.h:
815         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
816         GetFileSystemEntries that performs the same work but without going
817         into io-layer, locking, etc.
818
819 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
820
821         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
822         ThreadState_Stopped as well. Fixes #76047.
823
824 2005-09-29  Martin Baulig  <martin@ximian.com>
825
826         * class.c
827         (inflate_generic_context): If the new context has a `gmethod', set
828         its `container' that that gmethod's `container'.
829
830         * metadata.c
831         (mono_metadata_parse_generic_param): Simplify things;
832         `generic_container = generic_context->container;' is just fine.
833
834         * loader.c (method_from_methodspec): Code cleanups.
835
836 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
837
838         * decimal.c: fix warning (and let gcc generate correct
839         code on ARM with optimizations).
840
841 2005-09-28  Martin Baulig  <martin@ximian.com>
842
843         * loader.c
844         (method_from_memberref): Added `MonoGenericContext *class_context'
845         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
846         (method_from_methodspec): If we're a memberref, use the enclosing
847         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
848
849 2005-09-28  Martin Baulig  <martin@ximian.com>
850
851         * object.c (mono_runtime_invoke_array): Added support for
852         MONO_TYPE_GENERICINST; fixes #75917.
853
854 2005-09-27  Martin Baulig  <martin@ximian.com>
855
856         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
857         `k->byval_arg.type' to determine the actual type.
858
859         * loader.c (method_from_methodspec): Removed some hacks.
860
861 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
862
863         * class-internals.h (mono_field_is_deleted): Do the test for
864         rtspecialname before we check the actual name of the field. This
865         prevents us from dereferencing a pointer into the string table,
866         saving us from accessing a few pages
867
868         * *.c: Replace the use of {Enter,Leave}CriticalSection with
869         macros. This will allow a deadlock debugger to easily be plugged
870         in.
871
872 2005-09-27  Martin Baulig  <martin@ximian.com>
873
874         * loader.c (method_from_methodspec): Create a "signature"
875         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
876
877 2005-09-27  Martin Baulig  <martin@ximian.com>
878
879         * class.c
880         (inflate_generic_class): Correctly set the new context's
881         container.
882
883         * loader.c
884         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
885         instead of a `MonoGenericContext *'.
886         (mono_method_signature_full): Take a `MonoGenericContainer *'
887         instead of a `MonoGenericContext *'.
888
889         * metadata.c
890         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
891         instead of a `MonoGenericContext *'.
892         (mono_metadata_parse_method_signature_full): Likewise.
893
894 2005-09-26  Martin Baulig  <martin@ximian.com>
895
896         * class.c
897         (mono_class_from_generic_parameter): Set `klass->generic_container'
898         (mono_class_from_generic_parameter): Likewise.
899         (mono_bounded_array_class_get): We inherit the generic container
900         from the element class.
901
902         * loader.c
903         (find_method, find_method_in_class): Take a `MonoGenericContext *'
904         argument rather than computing it here.
905         (method_from_memberref): Correctly set the generic context before
906         parsing the signature.  Fixes #75681.
907
908 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
909
910         * object.c (mono_class_has_special_static_fields): Fix warnings.
911
912 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
913
914         * assembly.c: Add parse_public_key function, to
915         par the public keys. Also added mono_assembly_name_parse_full,
916         to define it the parsed key should be freed or not.
917         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
918         to parse a long format assembly name.
919         * metadata-internals.h: Keep mono_assembly_name_parse_full as
920         private, since calling it to preserve the key requires
921         freeing it manually.
922         
923 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
924
925         * locales.c : removed HAVE_ICU part.
926
927 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
928
929         * object.c (mono_class_create_runtime_vtable): Avoid calling 
930         field_is_special_static if the klass has no special static fields.
931
932         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
933         (MonoCachedClassInfo): Likewise.
934
935         * object.c (mono_class_has_special_static_fields): New helper function.
936
937 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
938
939         * class.c (mono_class_create_from_typedef): Don't call 
940         interfaces_from_typedef_full for enums.
941         (mono_class_create_from_typedef): Compute the base types of enums directly
942         without calling mono_class_setup_fields ().
943         (mono_class_find_enum_basetype): New helper function.
944
945         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
946         one place inside the string heap.
947         
948 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
949
950         * class.c: locking fixes, code cleanups, some docs added.
951         Allocate some data structures in the image mempool.
952
953 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
954
955         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
956         the example code.
957         
958 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
959
960         * class-internals.h, class.c, reflection.c: reduce memory taken by
961         MonoClass.
962
963 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
964
965         * metadata.c, metadata.h, loader.h: documentation updates, code and
966         API cleanups.
967
968 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
969
970         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
971         the example code.
972
973         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
974         page faults caused by the runtime while reading metadata.
975
976 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
977
978         * socket-io.c: the field names were changed 3 months ago and no one
979         realized until bug #76077 got filed!
980
981 2005-09-20  Martin Baulig  <martin@ximian.com>
982
983         * icall.c (assembly_icalls): Removed some unused debugger icalls.
984
985 2005-09-20  Martin Baulig  <martin@ximian.com>
986
987         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
988         write the rank into the class entry.
989
990 2005-09-20  Martin Baulig  <martin@ximian.com>
991
992         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
993
994 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
995
996         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
997
998         * icall.c (custom_attrs_defined_internal): New icall.
999
1000         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
1001         function.
1002         (mono_custom_attrs_construct_by_type): New helper function.
1003
1004 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
1005
1006         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
1007         terminate the resulting string. Fixes #76123.
1008
1009 2005-09-16  Martin Baulig  <martin@ximian.com>
1010
1011         * mono-debug.c
1012         (mono_debug_add_method): Ignore inflated methods for the moment.
1013
1014 2005-09-14  Martin Baulig  <martin@ximian.com>
1015
1016         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
1017
1018 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
1019
1020         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
1021         return a success/failure indication.
1022         (mono_metadata_interfaces_from_typedef_full): Ditto.
1023         (get_constraints): Ditto.
1024
1025 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
1026
1027         * marshal.c (emit_marshal_array): Fix handling of null arrays.
1028         
1029         * marshal.c (emit_marshal_array): Add support for returning string
1030         arrays from delegates. Fixes #76063.
1031
1032         * marshal.c: Use the emit_ldloc/stloc macros where possible.
1033
1034 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
1035
1036         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
1037         icall.
1038
1039 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
1040
1041         * reflection.c icall.c: Fix after mono_get_exception_type_load
1042         signature change.
1043
1044         * assembly.c (mono_assembly_get_assemblyref): New helper function.
1045         (mono_assembly_load_reference): Use the new helper.
1046
1047         * class-internals.h (MonoLoaderError): New structure containing 
1048         information about type loading errors.
1049
1050         * class-internals.h loader.c: Add APIs to store per-thread loader
1051         error information.
1052
1053         * loader.c class.c: Set the loader error if needed.
1054
1055         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
1056
1057 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
1058
1059         * decimal.c: fixed to handle the broken ARM fp format.
1060
1061 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
1062
1063         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
1064         broken.
1065
1066 2005-09-06  Martin Baulig  <martin@ximian.com>
1067
1068         * domain.c (supported_runtimes): Added v2.0.50727.
1069
1070 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
1071
1072         * culture-info.h: reduce the size of some structures.
1073
1074 2005-09-05  Martin Baulig  <martin@ximian.com>
1075
1076         Reflect latest API changes in the August CTP.
1077
1078         * icall.c
1079         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
1080         ("MonoType.HasGenericArguments"): Removed.
1081         ("MonoMethod.BindGenericParameters"): Renamed to
1082         "MakeGenericMethod".
1083         ("MethodBuilder.BindGenericParameters"): Renamed to
1084         "MakeGenericMethod".    
1085
1086 2005-09-05  Martin Baulig  <martin@ximian.com>
1087
1088         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
1089
1090 2005-09-05  Martin Baulig  <martin@ximian.com>
1091
1092         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1093
1094         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
1095         generic_container is non-NULL.
1096
1097 2005-09-05  Martin Baulig  <martin@ximian.com>
1098
1099         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1100
1101         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
1102
1103 2005-08-29  Michal Moskal  <malekith@nemerle.org>
1104
1105         * reflection.c (encode_locals,
1106         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
1107         for large generic types.
1108
1109 2005-09-05  Martin Baulig  <martin@ximian.com>
1110
1111         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1112
1113         * class.c (mono_dup_array_type): New public method.
1114         (mono_metadata_signature_deep_dup): New public method.
1115         (dup_type): Correctly duplicate array and function types.
1116
1117 2005-09-05  Martin Baulig  <martin@ximian.com>
1118
1119         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1120
1121         * reflection.c (get_default_param_value_blobs): Handle generic types
1122         and generic methods.
1123
1124 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
1125
1126         * class.c: Fixed error reporting (method/class were inversed) for 
1127         inheritance demands.
1128         * security-manager.c|h: Added the AppDomain when calling the managed
1129         System.Security.SecurityManager.InheritanceDemand method.
1130
1131 2005-09-01  Raja R Harinath  <rharinath@novell.com>
1132
1133         * reflection.c (encode_marshal_blob): 'marshaltype' and
1134         'marshaltyperef' are alternate sources for the custom marshaler
1135         name.
1136
1137 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
1138
1139         * class.c: fix creation of array classes with rank == 1
1140         (patch by Ankit Jain <jankit@novell.com>).
1141
1142 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
1143
1144         * object.c: fix check for creating the bound data for arrays vs
1145         szarrays.
1146
1147 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1148
1149         * object.c: configuration file name is now based on the executable name,
1150         not the image name. Fixes bug #75931.
1151
1152 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
1153
1154         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
1155         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
1156
1157 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
1158
1159         * rand.c: Use wincrypt.h instead of WinCrypt.h.
1160
1161 2005-08-24  Ankit Jain  <jankit@novell.com>
1162             Raja R Harinath  <rharinath@novell.com>
1163
1164         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
1165           called by it recursively.
1166           (mono_class_init): Remove special case in pending_init handling, since it's
1167           superseded by the fix to mono_class_from_typeref.
1168
1169 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
1170
1171         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
1172         BROKEN_THREAD_START stuff.
1173
1174 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
1175
1176         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
1177         trampoline.
1178
1179         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
1180         
1181         * object.c (mono_delegate_ctor): Replace the original function address with
1182         a delegate trampoline.
1183
1184 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
1185
1186         * icall.c: add boolean argument to base64_to_byte_array and 
1187         InternalFromBase64String to control whether a whitespace-only string
1188         is allowed (or should casue a FormatException to be thrown). We need
1189         this as the behavior has changed between MS.NET 1.x and 2.0, and we
1190         to match the MS behaviour in both profiles.
1191         * appdomain.c: Bump corlib version.
1192
1193 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1194
1195         This patch implements a big portion of publisher policy
1196         support, used to bind assembly versions and redirect
1197         one assembly from version A to version B.
1198
1199         * assembly.c:
1200         New GSList loaded_assembly_bindings, for storing the cached
1201         assembly bindings.
1202         (assembly_binding_maps_name): New static function for checking if a 
1203         assembly binding information maps an assembly name.
1204         (mono_assembly_binding_info_free): New function for freeing
1205         assembly binding information resources.
1206         (get_publisher_policy_info): New static function for retrieving 
1207         assembly binding information from a MonoImage.
1208         (compare_versions): New static function for comparing an assembly
1209         binding information data and the version of an assembly name.
1210         (check_policy_versions): New static function for checking if an
1211         assembly binding info mapping an assembly name is valid for it.
1212         (mono_assembly_load_publisher_policy): New static function for
1213         loading the 'policy.major.minor.MyAssembly' image for an assembly
1214         with an assembly name 'aname'.
1215         (mono_assembly_bind_version): New static function for updating
1216         assembly redirection.
1217         (mono_assembly_apply_binding): New static function for applying
1218         assembly binding.
1219         (search_binding_loaded): New static function for searching 
1220         loaded assembly binding infos in the cache domain.
1221         (mono_assembly_load_full): Don't apply assembly binding for
1222         reflection only assemblies.
1223
1224         * metadata-internals.h: Add MonoAssemblyBindingInfo,
1225         which contains information about assembly binding. Also
1226         declare signature for mono_config_parse_publisher_policy ()
1227         function, used to retrieve pub policy info.
1228         
1229         * mono-config.c:
1230         (publisher_policy_start): New static function used to parse publisher 
1231         policy config files.
1232         (publisher_policy_parser): New static MonoParseHandler containing 
1233         the functions used when parsing config files.
1234         (mono_config_parse_publisher_policy): New function for parsing
1235         publisher policy files.
1236         
1237 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
1238
1239         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
1240
1241         * marshal.c (mono_delegate_free_ftnptr): Ditto.
1242
1243         * object.c (mono_get_addr_from_ftnptr): New helper function.
1244
1245         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
1246
1247         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1248
1249 2005-08-19  Dick Porter  <dick@ximian.com>
1250
1251         * threads.c, threads.h, appdomain.c, appdomain.h,
1252         profiler-private.h, monitor.c, object.c, object-internals.h,
1253         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
1254         store the thread ID, so it can hold a 64 bit value if needed.
1255
1256 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
1257
1258         * reflection.c (mono_reflection_create_dynamic_method): Store the
1259         handle class into the method references as well so ldtoken works in
1260         dynamic methods.
1261
1262         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
1263         types.
1264
1265 2005-08-19  Ankit Jain <jankit@novell.com>
1266
1267         Fix #75847.
1268         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
1269           here rather than using the method signature of a arbitrary function
1270           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
1271           two arguments.
1272           Hack done with Harinath.
1273
1274 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1275
1276         * threadpool.c: disable printing stack traces when we get a exception
1277         in a threadpool thread. I need to do more testing to figure out which
1278         cases actually print this. Fixes bug #75828.
1279
1280 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1281
1282         * icall.c: there might be ignored whitespace after the last '='. This
1283         fixes length computation and bug #75840.
1284
1285 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
1286
1287         * assembly.c (mono_assembly_load_full): Consider .exe extension as
1288         well. Fixes #75809.
1289
1290         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
1291         #75784.
1292         
1293         * reflection.c (create_custom_attr_data): Ditto.
1294
1295 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
1296
1297         * locales.c, culture-info.h : removed RegionLCIDMap.
1298         * culture-info-tables.h : regenerated.
1299
1300 2005-08-16  Martin Baulig  <martin@ximian.com>
1301
1302         * class.c (mono_type_get_name_recurse): Small fix.
1303
1304 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
1305
1306         * locales.c : indentation fixie.
1307
1308 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
1309
1310         * object-internals.h,
1311           locales.h,
1312           locales.c,
1313           culture-info.h,
1314           icall.c : added RegionInfo table support.
1315         * culture-info-table.h : regenerated for region support.
1316
1317 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
1318
1319         * reflection.c (resolve_object): handle all kinds of MonoMethod
1320         including generic ones
1321
1322 2005-08-12  Ankit Jain <jankit@novell.com>
1323
1324         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
1325           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
1326
1327 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
1328
1329         * process.c: Don't close a thread handle when it's NULL. This is a
1330         workaround for bug #75733.
1331
1332 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
1333
1334         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
1335
1336 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
1337
1338         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
1339
1340 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1341
1342         * threadpool.c: if a work item in the thread pool has a callback that
1343         catches a exception, don't propagate it after invoking the callback.
1344         Fixes bug #75336.
1345
1346 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
1347
1348         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
1349
1350         * class-internals.h (MonoCachedClassInfo): Add some new fields.
1351
1352         * class.c (mono_class_init): Load field info lazily in the AOT case.    
1353
1354         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
1355
1356 2005-08-03  Ankit Jain  <jankit@novell.com>
1357
1358         Fix #75683.
1359         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
1360           PInvoke calling convention is 0.
1361
1362 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
1363
1364         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
1365         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
1366
1367 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
1368
1369         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
1370         to handle threads not started by the GC (patch by Michael Meeks
1371         <michael.meeks@novell.com>).
1372
1373 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
1374
1375         * reflection.c: Make buffer used in emitting types larger for some
1376         big generic types (patch by Michal Moskal).
1377
1378 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
1379
1380         * mono-debug.c: Fix some (not all) alignment problems.
1381
1382 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1383
1384         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
1385         Invoke mono_image_load_from_data_full passing the refonly
1386         parameter.
1387
1388         * assembly.c
1389         (mono_assembly_open_from_bundle): Add the refonly argument, 
1390         in order to pass it to other methods it calls to.
1391         (do_mono_assembly_open): Add the refonly argument, in order 
1392         to pass it to other methods it calls to.
1393         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
1394         the refonly parameter to it.
1395
1396         * image.c: Add loaded_images_refonly_hash and
1397         loaded_images_refonly_guid_hash to cache the reflection
1398         only loaded images.
1399         (mono_images_init): Initialize the hash tables used for
1400         caching the reflection only images.
1401         (load_modules): Invoke mono_image_open_full passing the refonly
1402         parameter to load the modules the correct way.
1403         (build_guid_table): Add the refonly argument, to re-build the 
1404         correct hash table.
1405         (do_mono_image_open): Added the refonly argument, in order to
1406         define it for the loaded image.
1407         (mono_image_loaded_full): New function, which receives an
1408         additional parameter to look for the image in the refonly or
1409         non-refonly section.
1410         (mono_image_loaded): Updated, using mono_image_loaded_full.
1411         (mono_image_loaded_by_guid_full): The same case that happens
1412         with mono_image_loaded_full.
1413         (mono_image_loaded_by_guid): Likewise.
1414         (register_image): Use the ref_only variable inside MonoImage
1415         to decide in which hash table store the current image.
1416         (mono_image_open_from_data_full): Rename
1417         mono_image_open_from_data to mono_image_open_from_data_full,
1418         adding the refonly argument, to define the ref_only variable 
1419         inside MonoImage.
1420         (mono_image_open_from_data): Return 
1421         mono_image_open_from_data_full.
1422         (mono_image_open_full): Rename mono_image_open to
1423         mono_image_open_full, receiving the new refonly argument,
1424         to pass it to inner methods.
1425         (mono_pe_file_open): Update this function, to open
1426         a MonoImage as a non-refonly image.
1427         (mono_image_close): Use the refonly variable inside
1428         MonoImage to remove the image from the correct caches.
1429
1430         * image.h: Add the signatures of mono_image_open_full,
1431         mono_image_open_from_data_full, mono_image_loaded_full,
1432         mono_image_loaded_by_guid_full.
1433
1434         * metadata-internals.h: Add the ref_only field to 
1435         MonoImage.
1436         
1437 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
1438
1439         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
1440         Fix the last behavior, which used to load the assemblies and
1441         extract MonoReflectionAssemblyName information, instead of
1442         extract it from the metadata tables. Needed for Reflection
1443         Only assemblies.
1444         
1445 2005-07-29  Martin Baulig  <martin@ximian.com>
1446
1447         * mono-debug-debugger.c
1448         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
1449         not initialized.
1450
1451         * mono-debug.c
1452         (mono_debug_address_from_il_offset): Check whether we have
1453         debugging support before attempting to take the lock.
1454         (mono_debug_source_location_from_address): Likewise.
1455         (mono_debug_source_location_from_il_offset): Likewise.
1456         (mono_debug_il_offset_from_address): Likewise.
1457         (mono_debug_address_from_il_offset): Likewise.
1458
1459 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
1460
1461         * class.c (mono_class_from_name_case): Add support for dynamic images.
1462         Fixes #75650.
1463
1464         * object.c (mono_class_compute_gc_descriptor): Add a workaround
1465         for #75479.
1466
1467 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
1468         
1469         * reflection.c (mono_method_get_object): Fix warning.
1470
1471 2005-07-28  Martin Baulig  <martin@ximian.com>
1472
1473         * mono-debug.c
1474         (mono_debug_add_wrapper): Also write the wrapper type.
1475
1476 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
1477
1478         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
1479         
1480         * class.c (mono_class_init): Avoid reading nested classes if the AOT
1481         data indicates the class has none.
1482
1483 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
1484
1485         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
1486         loader lock with the debugger lock. Prevents deadlocks for beagle.
1487
1488         Beagle can now run on an smp box for a weekend without any
1489         issues. Woohoo!
1490
1491 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
1492
1493         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
1494         in a module. Fixes #75629.
1495
1496 2005-07-26  Martin Baulig  <martin@ximian.com>
1497
1498         * mono-debug.c (mono_debug_add_wrapper): New static method.
1499         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
1500         interncall or a wrapper.
1501
1502         * mono-debug.h (MonoDebugWrapperData): New public typedef.
1503         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
1504         (MONO_DEBUGGER_VERSION): Bump to 51.
1505
1506         * mono-debug-debugger.c
1507         (mono_debugger_add_type): Removed this empty function.
1508         (mono_debugger_add_method): Likewise.
1509
1510 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
1511
1512         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
1513         before accessing method->slot.
1514
1515 2005-07-21  Jb Evain  <jbevain@gmail.com>
1516
1517         * reflection.c (method_encode_clauses/class): Handle filters clauses.
1518         Fixes #75010.
1519
1520 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
1521
1522         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
1523         #75587.
1524
1525 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
1526
1527         * image.h image.c: Add mono_image_get_guid () API function.
1528
1529 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
1530
1531         There were issues when multiple threads tried to load
1532         assemblies. A deadlock was created between assemblies_mutex and
1533         mono_domain_assemblies_lock. This fixes the issue by making the
1534         assembly ref counting be lock free. See bug 75586.
1535         
1536         * image.c (mono_image_close): The add ref function here was using
1537         Interlocked operations while the unref was using a mutex and a
1538         --. I don't think this was ever a bug that would be exposed in a
1539         non-pendantic way (ie, by an embedder doing a ref on one thread
1540         and an unref on another), but for the sake of correctness, this is
1541         now Interlocked.
1542
1543         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
1544         (mono_assembly_load_reference): Call mono_assembly_addref rather
1545         than touching the refcount ourselves.
1546         (mono_assembly_close): Use InterlockedDecrement to unref the
1547         assembly. Don't acquire the lock unless it is actually needed.
1548
1549 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
1550
1551         * class.c (mono_class_layout_fields): Fix calculation of has_references
1552         for generic types.
1553
1554 2005-07-12  Martin Baulig  <martin@ximian.com>
1555
1556         Applying a patch from Michal Moskal <malekith@nemerle.org>.
1557
1558         * metadata.c
1559         (mono_type_hash): Provide better hashing for generic instances.
1560         (mono_generic_inst_hash): Improve hashing.
1561         (mono_generic_class_hash): Likewise.
1562
1563         * reflection.c (mymono_metadata_type_hash): Improve hashing for
1564         generic instances.
1565
1566 2005-07-12  Martin Baulig  <martin@ximian.com>
1567
1568         * reflection.c (mono_reflection_create_runtime_class): Remove the
1569         hack for generic type definitions and non-`Run' assemblies.
1570         (mono_reflection_bind_generic_parameters): Also use
1571         `klass->wastypebuilder' to check for TypeBuilders.
1572
1573 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
1574
1575         * class.c (mono_class_layout_fields): Fix calculation of has_references
1576         for generic types.
1577
1578         * class.c (inflate_generic_class): Fix a leak.
1579         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
1580         for generic types.
1581
1582 2005-07-11  Martin Baulig  <martin@ximian.com>
1583
1584         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
1585         on error.
1586
1587 2005-07-11  Martin Baulig  <martin@ximian.com>
1588
1589         * loader.c (find_method): Also lookup in
1590         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
1591
1592 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
1593
1594         * appdomain.c (mono_domain_unload): Don't free the error message
1595         before passing it to mono_get_exception_...
1596
1597         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
1598         
1599 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
1600
1601         * threads.c: try to better guess an available RT signal (bug #75387).
1602
1603 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
1604
1605         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
1606         and CACHE_OBJECT.
1607
1608 2005-07-07  Martin Baulig  <martin@ximian.com>
1609
1610         * class.c (mono_type_get_name_full): Return NULL for
1611         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
1612         fixes #75408.
1613
1614 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
1615
1616         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
1617         exit the appdomain as well being aborted.
1618
1619         * threadpool.c: Create all threadpool threads inside the root appdomain, and
1620         change back to the root domain after calling managed code. This enables
1621         appdomains using threadpools to be unloaded.
1622
1623 2005-07-07  Martin Baulig  <martin@ximian.com>
1624
1625         * class-internals.h
1626         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
1627         into `MonoDynamicGenericClass' since we only need it for dynamic
1628         types.
1629
1630         * reflection.c (mono_class_bind_generic_parameters): We don't need
1631         to compute the `parent' here.
1632
1633 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
1634
1635         * culture-info-table.h : regenerated.
1636
1637 2005-07-06  Martin Baulig  <martin@ximian.com>
1638
1639         * icall.c
1640         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
1641
1642         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
1643
1644 2005-07-06  Martin Baulig  <martin@ximian.com>
1645
1646         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
1647         we're doing a signature-only comparision; fixes #74945.
1648
1649 2005-07-06  Martin Baulig  <martin@ximian.com>
1650
1651         * class-internals.h (MonoGenericClass): Moved some things out into
1652         a new `MonoInflatedGenericClass' type.  
1653         (MonoInflatedGenericClass): New type; the `klass' of a
1654         `MonoGenericClass' is now computed lazyly in
1655         mono_get_inflated_generic_class().      
1656
1657         * class.c (mono_get_inflated_generic_class): New public function.
1658         (mono_class_inflate_generic_method): Removed the unused
1659         `MonoClass *' argument.
1660         (setup_generic_vtable): Don't call mono_get_inflated_method() on
1661         all the methods.
1662         (mono_class_create_generic): Make this static and merge it with
1663         mono_class_create_generic_2(); we're now called automatically from
1664         mono_get_inflated_generic_class().
1665
1666         * loader.c (mono_method_signature): Call
1667         mono_get_inflated_method() here.
1668
1669 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
1670
1671         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
1672         type of fields with RVA.
1673
1674         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
1675         for this pseudo class.
1676         (my_mono_class_from_generic_parameter): Likewise.
1677         (mono_class_init): Allow interfaces to have cctors.
1678
1679 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
1680
1681         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
1682         lazily for AOT methods.
1683
1684 2005-07-05  Martin Baulig  <martin@ximian.com>
1685
1686         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
1687         returns FALSE for a successful match, not TRUE.
1688
1689 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
1690
1691         * loader.c (mono_method_get_index): Optimize this a bit.
1692
1693 2005-07-04  Martin Baulig  <martin@ximian.com>
1694
1695         * class.c
1696         (class_compute_field_layout): Move the check for generic type
1697         definitions into mono_class_layout_fields().  Fixes #74684.
1698         (mono_class_from_generic_parameter): Correctly compute
1699         `klass->parent'; fixes #75457.
1700
1701         * reflection.c (register_assembly, register_module): Make sure
1702         `domain->rejobject_hash' is already created.
1703
1704 2005-07-02  Martin Baulig  <martin@ximian.com>
1705
1706         * class-internals.h
1707         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
1708         `MonoDynamicGenericClass'.      
1709
1710 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
1711
1712         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
1713         returned by a field getter is null, since null is a valid value.
1714
1715 2005-07-01  Martin Baulig  <martin@ximian.com>
1716
1717         * reflection.c (mono_reflection_generic_class_initialize): Update
1718         the `dgclass->fields [i].parent' to the correct class.
1719         (mono_image_get_fieldref_token): Use the declaring type, not the
1720         reflected type.
1721
1722 2005-07-01  Martin Baulig  <martin@ximian.com>
1723
1724         * loader.c (find_method): Also look in the interfaces; fixes #75429.
1725
1726 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
1727
1728         * threads.c (thread_cleanup): assert that thread != NULL
1729         (wait_for_tids_or_state_change): We were using the wrong variable
1730         when accessing wait->threads. `i' was always out of the bounds of
1731         the array.
1732
1733 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1734
1735         * loader.c: map user32 and kernel32 to libMonoSupportW
1736
1737 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
1738
1739         * appdomain.c (unload_thread_main): Mark this as WINAPI.
1740
1741 2005-06-28  Martin Baulig  <martin@ximian.com>
1742
1743         * loader.c (method_from_methodspec): Fix #75334.
1744
1745 2005-06-28  Martin Baulig  <martin@ximian.com>
1746
1747         Fix #74953 - Arrays now implement the generic IList<T> interface
1748         on the 2.0 platform.
1749
1750         * class-internals.h (MonoDefaults): Added `generic_array_class'.
1751
1752         * reflection.c (mono_class_bind_generic_parameters): New public
1753         function; similar to mono_reflection_bind_generic_parameters(),
1754         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
1755
1756         * domain.c (mono_init_internal): Try to initialize.
1757         `mono_defaults.generic_array_class' here; this'll only succeed if
1758         we're using the 2.0 corlib.
1759
1760         * icall.c
1761         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
1762         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
1763         (mono_lookup_internal_call): Added support for nested classes.
1764
1765         * loader.c
1766         (mono_get_method_from_token): Set `result->signature->pinvoke' if
1767         we're an interncall and have generic arguments.
1768
1769         * class.c
1770         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
1771         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
1772         instance of System.Array.InternalArray<T> for arrays, so they
1773         implement the generic IList<T> interface.
1774
1775 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
1776
1777         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
1778         (chastamar@yahoo.com). Fixes #75374.    
1779
1780 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
1781
1782         * culture-info-table.h: regenerated.
1783
1784 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1785
1786         * icall.c: handle spaces correctly for base64 strings.
1787
1788 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
1789
1790         * *.c: Kill some warnings.
1791
1792 2005-06-23  Duncan Mak  <duncan@novell.com>
1793
1794         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
1795         that this builds on Solaris 10 (x86).
1796
1797 2005-06-23  Martin Baulig  <martin@ximian.com>
1798
1799         * class.c
1800         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
1801         generic type definitions.
1802
1803 2005-06-23  Martin Baulig  <martin@ximian.com>
1804
1805         Fix #75331.
1806
1807         * metadata.c (mono_class_get_overrides): Renamed to
1808         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
1809         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
1810         pass it to mono_get_method_full().
1811
1812 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
1813
1814         * reflection.c (mono_reflection_create_runtime_class): take the
1815         mono_domain_lock in this method. Prevents deadlocks
1816
1817 2005-06-22  Martin Baulig  <martin@ximian.com>
1818
1819         * loader.c (method_from_methodspec): Fix #75330.
1820
1821 2005-06-22  Martin Baulig  <martin@ximian.com>
1822
1823         * reflection.c (type_get_qualified_name): Use
1824         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
1825         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
1826         argument; use it if we don't have an assembly name.
1827
1828 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
1829
1830         * object.c: In mono_message_init, set "copy out" flag for in
1831         parameters with the [Out] flag.
1832
1833 2005-06-21  Martin Baulig  <martin@ximian.com>
1834
1835         * class.c
1836         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
1837         and MONO_TYPE_PTR.
1838
1839 2005-06-21  Martin Baulig  <martin@ximian.com>
1840
1841         * class.c (mono_class_init): Don't initialize `class->fields' for
1842         generic instances since they're initialized again in
1843         compute_field_layout(). 
1844         (compute_field_layout): Set the field's `generic_info' here; fix
1845         #75320. 
1846
1847 2005-06-21  Martin Baulig  <martin@ximian.com>
1848
1849         * class-internals.h
1850         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
1851
1852         * metadata.c (mono_metadata_generic_method_equal): Also
1853         distinguish the `generic_class'; fixes #75334.
1854
1855 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1856
1857         * domain.c:
1858         * appdomain.c:
1859         * domain-internals.h:
1860         * reflection.c: 'domain_assemblies' field is now protected by its own
1861         lock. Don't call into managed code to run the AssemblyLoad event if we
1862         now there are no registered delegates for it.
1863
1864 2005-06-20  Martin Baulig  <martin@ximian.com>
1865
1866         * class.c (mono_class_is_assignable_from): Use a custom version of
1867         mono_class_has_parent() to make things work for generic instances;
1868         fix #75300.
1869
1870 2005-06-20  Martin Baulig  <martin@ximian.com>
1871
1872         * loader.c (method_from_methodspec): Apply a patch from
1873         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
1874
1875 2005-06-20  Martin Baulig  <martin@ximian.com>
1876
1877         * class.c (mono_class_init): Reverted Zoltan's last change; it
1878         breaks generics.
1879
1880 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
1881
1882         * threads.c (wait_for_tids_or_state_change): Add missing locking.
1883
1884 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1885
1886         * socket-io.c: fix the index in the socket array for writable/error
1887         sockets. Fixes bug #75306.
1888
1889 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
1890
1891         * class.c (mono_class_init): Allow interfaces to have static ctors.
1892
1893 2005-06-17  Martin Baulig  <martin@ximian.com>
1894
1895         * loader.c (method_from_methodspec): Use `context->container' when
1896         parsing the `gmethod->inst'.
1897
1898 2005-06-17  Martin Baulig  <martin@ximian.com>
1899
1900         * class.c (mono_type_get_name_recurse): Don't add the assembly
1901         name for type arguments.
1902
1903 2005-06-15  Martin Baulig  <martin@ximian.com>
1904
1905         * reflection.c (mono_image_get_inflated_method_token): Encode
1906         correct klass; fixes #75260.
1907
1908 2005-06-13 Michal Moskal <malekith@nemerle.org>
1909
1910         * icall.c: Make GetCorrespondingMethod/Constructor take
1911         MonoReflectionMethod method not MonoMethod. Removed
1912         MonoType.GetCorrespondingField, and make
1913         MonoGenericType.GetCorrespondingField take name not
1914         MonoClassField.
1915
1916 2005-06-13  Michal Moskal <malekith@nemerle.org>
1917
1918         * reflection.c (field_encode_signature, encode_locals):
1919          Make sizes of buffers for types larger (for big generic types).
1920          (create_generic_typespec,
1921          mono_reflection_sighelper_get_signature_local,
1922          mono_reflection_sighelper_get_signature_field):
1923          Add asserts for too small buffers.
1924
1925 2005-06-15  Martin Baulig  <martin@ximian.com>
1926
1927         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
1928         if our parent is not a dynamic type.
1929
1930 2005-06-15  Martin Baulig  <martin@ximian.com>
1931
1932         * class-internals.h (MonoTypeNameFormat): New enum.
1933
1934         * class.c
1935         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
1936         (mono_type_get_full_name): Removed.
1937         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
1938         argument instead of the boolean's.
1939
1940         * icall.c (ves_icall_System_MonoType_getFullName):
1941         Added `gboolean assembly_qualified'.    
1942
1943         * reflection.h
1944         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
1945
1946         * reflection.c (mono_reflection_parse_type): Parse the new type
1947         name format.
1948
1949 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1950
1951         * icall.c: no need to convert from utf16 to utf8 and then back again
1952         after the call to GetLogicalDrives.
1953
1954 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1955
1956         * icall.c: frombase64. Fix problems exposed by new tests.
1957
1958 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1959
1960         * icall.c: added internal calls for converting char [] and strings in
1961         base64 into byte [].
1962
1963 2005-06-10  Martin Baulig  <martin@ximian.com>
1964
1965         * class.c (mono_class_create_generic_2): Read the nested classes
1966         from the metadata rather than from `gklass->nested_classes' since
1967         `gklass' might not be initialized yet.
1968
1969 2005-06-09  Duncan Mak  <duncan@novell.com>
1970
1971         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
1972         all public headers. Fixes #74919.
1973
1974 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
1975
1976         * domain.c: The key for proxy_vtable_hash is now a pointer
1977         array. Added new GHashFunc and GCompareFunc functions for this.
1978
1979         * class.h: The list of interfaces in MonoRemoteClass is known in
1980         advance and can't grow (we create a new MonoRemoteClass if needed),
1981         so now the interface array can be allocated together with
1982         MonoRemoteClass.
1983         
1984         * object.c: Added a new method create_remote_class_key.
1985         Fixed mono_remote_class so it does not depend on
1986         mono_upgrade_remote_class.
1987         Removed extend_interface_array.
1988         Added new method clone_remote_class(), which makes a copy of a remote
1989         class and adds a new interface or class to it.
1990         mono_upgrade_remote_class() now creates a new remote class (or gets
1991         it from the cache) if an vtable upgrade is needed. In this way
1992         we make sure that other objects sharing the same remote class
1993         don't get the new vtable with unwanted interfaces.
1994         
1995         * object-internals.h:
1996         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
1997         
1998         * marshal.c: Track changes in mono_upgrade_remote_class().
1999
2000 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
2001         * icall.c: Add runtime methods for obtaining members of inflated
2002         class, which were created from supplied non-inflated members. It
2003         is used in internal Get{Method,Constructor,Field} methods in
2004         System.Type
2005
2006 2005-06-09  Martin Baulig  <martin@ximian.com>
2007
2008         * reflection.c
2009         (mono_reflection_bind_generic_method_parameters): Fix #75169.
2010
2011 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2012         * reflection.c (mono_image_basic_init): Define
2013         Version in MonoDynamicAssembly. 
2014         
2015 2005-06-08  Martin Baulig  <martin@ximian.com>
2016
2017         Fix #75136.
2018
2019         * loader.c
2020         (mono_method_signature_full): New public method; takes a
2021         `MonoGenericContext *'.
2022         (find_method): Use mono_method_signature_full() and pass the
2023         klass'es context to it.
2024
2025         * class.c (mono_class_is_inflated_method): Use
2026         mono_method_signature_full() and pass the context to it.
2027
2028 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
2029
2030         * object.c: add proper locking in mono_remote_class_vtable(),
2031         fixes possible memory corruption.
2032
2033 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
2034
2035         * marshal.c (mono_remoting_marshal_init): set
2036         initialized after initialization.
2037
2038 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
2039
2040         * locales.c : hush.
2041
2042 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
2043
2044         * object.c (extend_interface_array): fix really silly
2045         memory corrupting / comparison bug.
2046
2047 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2048
2049         * reflection.c: Functions added to support the creation
2050         of CustomAttributeData, which includes Attribute data
2051         used by ReflectionOnly methods.
2052
2053         * reflection.h:  mono_reflection_get_custom_attrs_data and
2054          mono_custom_attrs_data_construct added (functions exposed).
2055
2056          * icall.c: Added mono_reflection_get_custom_attrs_data
2057          as icall.
2058         
2059 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
2060
2061         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
2062         lupus's request.
2063
2064 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
2065
2066         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
2067
2068         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
2069         dynamic DllImportAttribute.
2070
2071         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
2072         dynamic DllImportAttribute.
2073
2074         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
2075         Fixes #75162.
2076
2077 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2078
2079         * threads.c: avoid segfault when an unstarted thread is aborted.
2080
2081 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
2082
2083         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
2084         Returns the name and version of the runtime for reporting.
2085
2086 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2087
2088         * appdomain.c: bump corlib version.
2089         * object-internals.h: new field in MonoReflectionAssembly.
2090
2091 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2092
2093         * object-internals.h: Carlos forgot to add this field.
2094
2095 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
2096
2097         * icall.c: Added create_version to create instances
2098         of Version of MonoReflectionAssemblyName. This change helps
2099         the AssemblyName tests to keep running fine.
2100         
2101 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
2102   
2103         * object.c (mono_method_return_message_restore): A somehow less
2104         intrusive fix for #75138.
2105
2106 2005-06-03  Raja R Harinath  <rharinath@novell.com>
2107
2108         * object.c (mono_method_return_message_restore): Fix computation
2109         of expected number of out args.
2110
2111 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
2112
2113         * reflection.c (mono_image_get_method_info): Fix the case when the
2114         charset is empty.
2115
2116 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
2117
2118         * object.c: Added missing null check in
2119           mono_method_return_message_restore.
2120
2121 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
2122
2123         * reflection.c (mono_image_get_method_info): Handle the case when
2124         dllentry is empty.
2125
2126 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
2127
2128         * object.c: When creating the vtable for a proxy, take into account
2129         all inherited interfaces, not only the ones registered in
2130         iclass->interfaces. This fixs bug #74996.
2131         Also, in mono_method_return_message_restore, verify that the array
2132         of out args has the expected lengh.
2133
2134 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2135
2136         * socket-io.c: update the timeout in Poll when the call is interrupte.
2137
2138 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2139
2140         * socket-io.c: support abort/suspend in Select_internal after last
2141         change.
2142
2143 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2144
2145         * threadpool.c: remove warning.
2146
2147 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2148
2149         * icall.c:
2150         * socket-io.[ch]: Select_internal uses poll() now when available, thus
2151         removing the 1024 limit from select(). Runtime part of the fix for
2152         bug #71203.
2153
2154 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2155
2156         * socket-io.c: when resolving the addresses for the same
2157         host returned by gethostname(), get the local IPs from the interface
2158         list. Loopback addresses are discarded if the are interfaces up with
2159         non-loopback ones. Fixes bug #63265.
2160
2161 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
2162
2163         * appdomain.c, verify.c, object-internals.h, reflection.c:
2164         bumped corlib number to 36, and added new extra_flags field
2165         to ReflectionMethodBuilder and friends.  Fixes #75060.
2166
2167 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
2168
2169         * gc.c: register a new weak link only if the object is non-null
2170         (fixes bug#75047).
2171
2172 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
2173
2174         * culture-info.h : short time pattern too.
2175
2176 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
2177
2178         * culture-info.h : expand long time pattern string length.
2179
2180 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
2181
2182         * culture-info-table.h : update (more French date format; #72788).
2183
2184 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
2185
2186         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
2187         the method is static. Fixes #75029.
2188
2189 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
2190
2191         * reflection.c: Update the table_idx field of method builders after
2192         saving the module, since it can change. This is a workaround for
2193         bug #74914. 
2194
2195 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
2196
2197         * culture-info-table.h : update (additional French date format).
2198
2199 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
2200
2201         * icall.c (ves_icall_type_Equals): Revert last change.
2202         
2203         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
2204
2205         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
2206
2207 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
2208
2209         * class-internals.h: Added executioncontext_class field to 
2210         MonoDefaults structure.
2211         * domain.c: Cache System.Threading.ExecutionContext class in 
2212         mono_defaults.
2213         * object.c: Capture the ExecutionContext for asynchroneous calls in
2214          mono_async_result_new.
2215         * object-internals.h: Added execution_context and original_context 
2216         fields to MonoAsyncResult. Added execution_context to MonoThread.
2217         * security-manager.c|.h: Added mono_get_context_capture_method to 
2218         return the capture method (if required by the security manager or by
2219         the framework version used).
2220         * threadpool.c: Apply capture (if present) ExecutionContext in 
2221         mono_async_invoke and revert to original context after it completes.
2222
2223 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
2224
2225         * culture-info-table.h : updated (real hacky solution for zh-CHT).
2226
2227 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
2228
2229         * culture-info-table.h : zh-CHT related workaround.
2230
2231 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
2232
2233         * marshal.c (emit_marshal_custom): Add some error checking and call the
2234         methods in the ICustomMarshaler interface. Fixes #74875.
2235         
2236         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
2237         native->managed wrappers.
2238
2239 2005-05-12  Martin Baulig  <martin@ximian.com>
2240
2241         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
2242         here and use the loader lock.
2243
2244         * mono-debug.c: Properly lock when the debugger is not attached.
2245         (mono_debug_init): Release the initial lock if we're not running
2246         in the debugger.
2247
2248 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
2249
2250         * marshal.c (emit_marshal_custom): Pass through NULL values without
2251         calling the custom marshalling routines.
2252
2253         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
2254         conversion in structures. Fixes #74882.
2255
2256 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
2257
2258         * culture-info-table.h : zh-* cultures were missing.
2259
2260 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
2261
2262         * threads.c: Added a new event background_change_event which is signaled
2263         when a thread changes its background mode.
2264         Moved here several checks previously done in managed code. The checks
2265         require the thread lock, and using the thread lock in managed code
2266         can result in deadlocks.
2267         Merged Start_internal and Thread_internal into a single method. Now 
2268         Thread_internal does all work of creating and starting a thread.
2269         Added icalls for setting and getting the state of the object. Moved from
2270         managed code to avoid locking there.
2271         Added wait_for_tids_or_state_change() which is called instad of
2272         wait_for_tids when waiting for non-backround threads to end. This method
2273         will return if one of the threads ends or the background_change_event
2274         is signaled.
2275         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
2276         the background mode. This method signals the background_change_event
2277         event.
2278         * icall.c:
2279         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
2280         removed Start_internal.
2281         
2282 2005-05-11  Martin Baulig  <martin@ximian.com>
2283
2284         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
2285         to order of some fields to get proper alignment on 64-bit machines.
2286
2287 2005-05-11  Martin Baulig  <martin@ximian.com>
2288
2289         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
2290         changes as they're broken and completely fuck up the debugger.
2291
2292         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
2293
2294 2005-05-10  Martin Baulig  <martin@ximian.com>
2295
2296         * reflection.c (mono_reflection_generic_class_initialize): Don't
2297         call mono_class_setup_parent() here.
2298
2299 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2300
2301         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
2302         send/receive timeout use an integer in milliseconds. We were using a
2303         struct timeval.
2304
2305 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2306
2307         * locales.c:
2308         (internal_get_cultures): reserve the first slot of the array for the
2309         InvariantCulture, which will be filled in managed code.
2310
2311 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
2312
2313         * reflection.c (mono_image_fill_module_table): Initialize the
2314         GENERATION field as well.
2315
2316 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2317
2318         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
2319         Monitor.Enter on the object.
2320
2321 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
2322
2323         * threads.c: Enable the wait for running threads when exiting.
2324         * icall.c: Suspend all threads before exiting.
2325
2326 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
2327
2328         * assembly.c (mono_assembly_load_reference): Fix warning.
2329
2330 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2331
2332         * threadpool.c: changed the default number of threads per cpu. From now
2333         on, the default will be 20 + (5 * number of cpus) instead of 50.
2334
2335 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
2336
2337         * loader.c (mono_method_get_signature_full): Add locking here.
2338
2339 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
2340
2341         * appdomain.c: Moved methods for parsing and freeing assembly
2342         names to assembly.c.
2343         * assembly.c, domain-internals.h: Created public methods for parsing
2344         assembly names. Fixed mono_assembly_load_with_partial_name:
2345         it now finds the best match, taking into account the version,
2346         token and culture specified in the partial name. Also return
2347         the latest version if no version information is specified.
2348
2349 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
2350
2351         * threadpool.c: replace check for SocketAsyncCall class.
2352
2353 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2354
2355         * threadpool-internals.h:
2356         * Makefile.am: added threadpool-internals.h
2357
2358         * threadpool.c: call mono_unhandled_exception on exceptions not handled
2359         that happen in threadpool threads (tested on MS).
2360         (mono_thread_pool_remove_socket): new function that dispatch any pending
2361         AIO call on a socket that is closing. By now only epoll really needs it,
2362         as select/poll wake up when the socket closes.
2363
2364
2365         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
2366
2367 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
2368
2369         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
2370
2371 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
2372
2373         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
2374
2375 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
2376
2377         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
2378         has an abort request, convert it into a suspend request.
2379
2380 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
2381
2382         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
2383         warning for the usage of `UnmanagedFunctionPointerAttribute' which
2384         is not supported yet.
2385
2386 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2387
2388         * image.c: register assemblies loaded from data (bundles) in the loaded
2389         assemblies hash. Fixes bug #74772.
2390
2391 2005-04-29  Martin Baulig  <martin@ximian.com>
2392
2393         * class.c (mono_type_get_name_recurse): Update to the new naming
2394         schema from the latest .NET 2.x beta2.
2395         (mono_class_setup_vtable_general): If we're a generic instance,
2396         copy the vtable from our generic type definition and inflate all
2397         the methods in it.
2398
2399         * loader.c (find_method): Update to the new naming schema from the
2400         latest .NET 2.x beta2.
2401
2402 2005-04-29  Raja R Harinath  <harinath@gmail.com>
2403
2404         * class.c (mono_class_init): Add a mono_loader_unlock to the
2405         #74734 fix.
2406
2407 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
2408
2409         * icall.c (ves_icall_System_Environment_Exit): Remove the 
2410         suspend_all_other_threads () call for the time being, since it can hang.
2411
2412         * threads.c (mono_thread_manage): Similarly, disable the waiting for
2413         the background threads to exit, since it can also hang.
2414
2415         * class.c (mono_class_init): Applied patch from Ankit Jain 
2416         (radical@gmail.com). Avoid pending init errors when a field refers
2417         to a nested class using a typeref. Fixes #74734.
2418
2419         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
2420         this for dynamic modules.
2421
2422 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2423
2424         * threads.c: don't wait for threads that are in the process of aborting
2425         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
2426         and waiting for background threads to finish. This makes xsp and
2427         mod-mono-server exit without random length delays and/or hangs.
2428
2429 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2430
2431         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
2432
2433 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
2434
2435         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
2436         dynamic types to prevent infinite loops. Fixes #74727.
2437
2438         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
2439         ..._is_assignable_to.
2440
2441 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
2442
2443         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
2444
2445 2005-04-25  Martin Baulig  <martin@ximian.com>
2446
2447         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
2448
2449         * domain.c
2450         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
2451
2452         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
2453
2454         * reflection.c (build_compressed_metadata): Set metadata header
2455         version to 2.0.
2456
2457 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
2458
2459         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
2460         number into an integral and a decimal part. Fixes #70473.
2461
2462         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
2463
2464 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
2465
2466         * culture-info-table.h : reflected the latest locale-builder output.
2467
2468 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2469
2470         * threadpool.c: check for SuspendRequested too when deciding if
2471         mono_thread_interruption_checkpoint should be called.
2472
2473 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2474
2475         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
2476         * threads.c: remove interruption_mutex and use Interlocked instead. When
2477         suspending all the threads, wait for all the suspended events at once.
2478         If we're shutting down and get an APC that is going to be queued,
2479         call mono_thread_execute_interruption immediately, as the thread might
2480         be sleeping on a pthread condition or mutex.
2481
2482         * icall.c: call mono_runtime_set_shutting_down before suspending the
2483         threads.
2484
2485         Fixes bug #74693. And now xsp is happier when exiting.
2486
2487 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
2488
2489         * loader.c (mono_stack_walk): Fix #74690.
2490
2491 2005-04-22  Martin Baulig  <martin@ximian.com>
2492
2493         * mono-debug.h (MonoDebugMethodJitInfo): Added
2494         `MonoDebugMethodJitInfo *jit'.
2495
2496         * mono-debug.c (mono_debug_read_method): Cache the
2497         MonoDebugMethodJitInfo in `address->jit'.
2498         (mono_debug_free_method_jit_info): New public method.
2499
2500 2005-04-22  Martin Baulig  <martin@ximian.com>
2501
2502         * class.c (mono_class_is_assignable_from): Disallow
2503         type parameter -> interface.
2504
2505 2005-04-21  Dick Porter  <dick@ximian.com>
2506
2507         * threads.c (mono_thread_create): Turn an assertion into an error.
2508
2509 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
2510
2511         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
2512         
2513         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
2514         Fix some gcc 4.0 warnings.
2515
2516 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
2517
2518         * file-io.c: fix alt dir separator char on unix systems
2519         and cleanup (fixes bug #71214).
2520
2521 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
2522
2523         * marshal.c: Use CALLVIRT instead of CALL when dispatching
2524         a call to a remote domain, since the method may be an
2525         interface method in the client domain. This fixes bug #74192.
2526
2527 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2528
2529         * threadpool.c: recv/send are now performed before going back to managed
2530         code to save one transition.
2531
2532 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2533
2534         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
2535
2536         * metadata/threadpool.c: removed hack to workaround the bug above.
2537
2538         Fixes bug #74618.
2539
2540 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
2541
2542         * reflection.c reflection.h: Fix handling of parameter defaults in
2543         dynamic methods. Also fixes handling of parameter attributes.
2544         Fixes #74609.
2545
2546         * mono-debug.c (mono_debug_close_image): Fix warning.
2547
2548 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2549
2550         * socket-io.h: replaced old unused field with new 'blocking'.
2551         * threadpool.c: restore socket blocking state on windows(tm).
2552
2553 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
2554
2555         * icall.c: don't return the codebase in the AssemblyName[] returned by
2556         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
2557         * object-internals.h: Removed FIXME (fields were presents) and fixed
2558         versioncompat declaration.
2559
2560 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2561
2562         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
2563         not closed, so don't cleanup when it happens.
2564
2565 2005-04-13  Chris Toshok  <toshok@ximian.com>
2566
2567         * mono-debug-debugger.h: change prototype for
2568         mono_debugger_lookup_type.
2569
2570         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
2571         this function, although it should probably be named
2572         mono_debugger_init_type.
2573
2574 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2575
2576         * threadpool.c: fix non-AIO case.
2577
2578 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
2579
2580         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
2581         the built-in profiler to measure just JIT compilation times.
2582
2583 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2584
2585         * threadpool.c: the epollfd might be closed by another thread at
2586         any time, so ignore EBADF at treat it as a "we're closing" sign.
2587
2588 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2589
2590         * threadpool.c: release the semaphores with a count equals to the number
2591         of working threads in both IO and regular pools. Fixed typo that messed
2592         up the count of IO pool threads. Don't initialize the pipe handles if
2593         we're using epoll.
2594
2595 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2596
2597         * threadpool.c: some systems don't like a NULL when deleting the socket
2598         from epoll.
2599
2600 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2601
2602         * threadpool.c: fix semaphore allocation.
2603
2604 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2605
2606         * threadpool.c: added epoll() based implementation for asynchronous IO
2607         that is used instead of the default poll() when available.
2608         It can be disabled by setting MONO_DISABLE_AIO.
2609
2610 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2611
2612         * threadpool.c: windows needs 'closesocket' and instead of returning
2613         0 when the stream is closed while in select, it returns -1. Fixes bug
2614         #74573.
2615
2616 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
2617
2618         * class.c (class_compute_field_layout): Fix the regression caused by
2619         the previous try.
2620
2621 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2622
2623         * threadpool.c: separate pool for socket async. IO.
2624         * threadpool.h: mono_max_worker_threads is not a global any more.
2625
2626 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
2627
2628         * class.c (class_compute_field_layout): Fix #74549.
2629
2630 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2631
2632         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
2633         use 2 connected sockets instead.
2634
2635 2005-04-08  Miguel de Icaza  <miguel@novell.com>
2636
2637         * mono-config.c: Add new entry point for mkbundle
2638         mono_config_parse_memory. 
2639
2640 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2641
2642         * threadpool.c: removed another unused function.
2643
2644 2005-04-08  Ankit Jain  <radical@corewars.org>
2645
2646         * reflection.c (get_default_param_value_blobs): Add 'types'
2647         parameter to get the types encoded in the constant table.
2648         (mono_param_get_objects): Use the type from the constant table,
2649         not the type of the parameter, when creating default values.
2650         Handle null default values correctly.
2651
2652 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2653
2654         * file-io.c:
2655         * file-io.h:
2656         * threadpool.c:
2657         * threadpool.h:
2658         * icall.c:
2659         * socket-io.c: removed dead code for async IO.
2660
2661 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2662
2663         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
2664
2665         * threadpool.c: intercept socket async. calls and pass them to a thread
2666         that is polling and dispatching the job items to the threadpool as
2667         socket become ready. Fixes bugs #71217, #71933.
2668
2669         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
2670         between char and short/ushort arrays.
2671
2672         * socket-io.c: remove dead code.
2673
2674 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
2675
2676         * locales.c,
2677           icall.c : removed InternalToUpper_Comp() and
2678           InternalToLower_Comp().
2679
2680 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
2681
2682         * char-conversions.h : The tables were incorrectly generated. Should
2683           be generated against invariant culture.
2684
2685 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
2686
2687         * object.c (mono_runtime_invoke_array): Fix return value when 
2688         passing pre-created valuetype objects to ctors.
2689
2690         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
2691         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
2692         Fixes #74338.
2693
2694 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
2695
2696         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
2697         only used with --security and hides the wrong corlib version error.
2698
2699 2005-03-30  Joshua Tauberer  <tauberer@for.net>
2700
2701         * class.c: Changed mono_class_name_from_token so that types
2702         outside of a namespace don't have an initial period.  Improved
2703         the g_warning message used in _mono_class_get when loading
2704         fails.
2705         * assembly.c: In mono_assembly_load_reference, when an assembly
2706         can't be found, "No such file or directory" is misleading and
2707         unhelpful because a few paths were checked for the presence of
2708         the assembly.  When that happens (ENOENT), display a nicer
2709         message indicating the directories that were searched.  In all
2710         cases, the warning is made easier to read for non-hackers.
2711
2712 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
2713
2714         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
2715         project/solution.
2716         * appdomain.h|domain.c: Removed inline from functions.
2717         * appdomain.c: Reduced warnings when compiling on windows.
2718         * icall.c: Fixed output_debug declaration to gunichar2*.
2719         * mono-config.c: Reduced warnings when compiling on windows.
2720         * rand.c: Added missing "windows.h". Added missing return value.
2721         * rawbuffer.c: Added missing winsock2.h for windows.
2722         * sysmath.h: Added mono-compiler.h header to allow/ease 
2723         compilation with non-GCC compilers.
2724         * threads.c: Fixed declarations to compile with VS.NET C compiler.
2725         Removed cast warnings.
2726
2727         Adapted from the work of J Lothian (for VC6).
2728
2729 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
2730
2731         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
2732         from default_path.
2733
2734 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
2735
2736         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
2737         the 2.0 profile.
2738
2739 2005-03-27  Raja R Harinath  <harinath@gmail.com>
2740
2741         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
2742         has to be in $(exec_prefix).  $(prefix) is for arch-independent
2743         stuff, and it would probably use $(prefix)/share rather than
2744         $(prefix)/lib.
2745
2746 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2747
2748         * console-io.c: added 2 includes that might be missing.
2749
2750 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
2751
2752         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
2753         profile.
2754
2755         * reflection.c (create_custom_attr): Allocate the params array using
2756         alloca so it gets GC tracking.
2757
2758 2005-03-23  Chris Toshok  <toshok@ximian.com>
2759
2760         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
2761         out some spew.
2762
2763 2005-03-24  Raja R Harinath  <rharinath@novell.com>
2764
2765         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
2766         changes to pick up any changes in prefix, etc.
2767
2768 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
2769
2770         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
2771         
2772         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
2773         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
2774
2775 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
2776
2777         * class-internals.h object-internals.h class.c reflection.c: Extend the
2778         mono_lookup_dynamic_token () function to return the class of the
2779         token as well. 
2780
2781         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
2782         well. Fixes #73848.
2783
2784 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
2785
2786         * security-manager.c: Skip inheritance checks for intra-corlib
2787         class inheritance and method overrides. This skips a lot of checks
2788         and (anyway) permissions cannot work until corlib is loaded.
2789
2790 2005-03-23  Martin Baulig  <martin@ximian.com>
2791
2792         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
2793         MONO_TYPE_GENERICINST.  
2794
2795 2005-03-23  Martin Baulig  <martin@ximian.com>
2796
2797         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
2798
2799 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2800
2801         * class.c: added locking comments to some functions.
2802         Cache the interface offsets arrays (saves about 20 KB
2803         of runtime memory in a typical app).
2804         Reduce the time overhead in mono_class_setup_supertypes ().
2805
2806 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
2807
2808         * icall.c: speedup and fix leaks in GetMethodsByName and
2809         GetPropertiesByName.
2810
2811 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
2812
2813         * reflection.c: some locking fixes.
2814
2815 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
2816
2817         * metadata.c: added missing break in case statement.
2818
2819 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
2820
2821         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
2822         typedbyref return values. Fixes #73941.
2823
2824 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
2825
2826         * security-manager.c|h: Added demandunmanaged method and 
2827         suppressunmanagedcodesecurity class to MonoSecurityManager.
2828         Renamed aptc class to allowpartiallytrustedcallers.
2829
2830 2005-03-17  Martin Baulig  <martin@ximian.com>
2831
2832         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
2833
2834 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2835
2836         * file-io.c: disabled file async. IO using aio_*. It uses the
2837         threadpool now. Workaround for bug #73718.
2838
2839 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
2840
2841         * assembly.h, mono-config.c: added code to deal with bundled configs
2842         for bundled assemblies.
2843
2844 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
2845
2846         * *.c, private.h: cleanup, removing old private.h header file.
2847
2848 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
2849
2850         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
2851         and throw_on_unmappable_char attributes.
2852
2853 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
2854
2855         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
2856         _ProcessName_internal.
2857
2858 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
2859
2860         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
2861         #73631.
2862
2863         * icall.c threads.c threads-types.h: Remove slothash icalls as they
2864         are no longer used.
2865
2866 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
2867
2868         * object.c (compute_class_bitmap): Add support for generics. Fixes
2869         #73527.
2870
2871 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
2872
2873         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
2874
2875 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2876
2877         * filewatcher.c: commented out the code for windows watcher, as we don't
2878         use it (we use the managed implementation instead).
2879
2880 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
2881
2882         * object-internals.h (MonoThread): Remove 'unused1' field.
2883
2884         * appdomain.c: Bump corlib version.
2885
2886         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
2887
2888         * reflection.c (mono_reflection_create_runtime_class): Remove the
2889         AssemblyBuilder.Save optimization since it causes too many problems.
2890
2891 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
2892
2893         * exception.c|h: Added mono_get_exception_reflection_type_load to
2894         create a ReflectionTypeLoadException object.
2895         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
2896         to return NULL is a InheritanceDemand fails during reflection. Updated
2897         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
2898         ReflectionTypeLoadException if an InheritanceDemand fails during 
2899         reflection. Added icall mapping for GetLinkDemandSecurity.
2900         * security-manager.c|h: Added ves_icall_System_Security_
2901         SecurityManager_GetLinkDemandSecurity internal call to return the
2902         class and methods permissions set for a LinkDemand. Removed unused
2903         fields in MonoSecurityManager.
2904
2905 2005-03-10  Martin Baulig  <martin@ximian.com>
2906
2907         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
2908         it's a generic instance.
2909
2910 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
2911
2912         * reflection.c (mono_get_object_from_blob): Applied patch from
2913         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
2914
2915         * class.c (mono_class_is_assignable_from): Another try at fixing 
2916         #73469 without breaking anything.
2917
2918 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
2919
2920         * class.c: (mono_class_is_assignable_from): Revert the last changes
2921         since they don't work with generics.
2922         
2923         * class.c (mono_class_is_assignable_from): Fix build bustage.
2924
2925         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
2926         the managed IsAssignableFrom method. Fixes #73469.
2927
2928         * reflection.c (mono_reflection_call_is_assignable_from): New helper
2929         function.
2930
2931 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
2932
2933         * object.c (mono_load_remote_field_new): Fix returning uninitialized
2934         memory when the remoting callback does not sets the out arguments.
2935         Fixes #73007.
2936
2937         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
2938         by mistake.
2939
2940         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
2941
2942         * object-internals.h (MonoStackFrame): Sync with managed object layout.
2943
2944         * appdomain.c: Bump corlib version.
2945
2946 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
2947
2948         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
2949         function.
2950
2951         * threads.c (mono_thread_attach): Detect threads which are not started
2952         by the GC pthread wrappers.
2953
2954 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
2955
2956         * icall.c: Added new icall for RNG.
2957         * rand.c|h: Added new icall to open the RNG. This allows to share a 
2958         single handle on Linux to access /dev/urandom and fix #73183.
2959
2960 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
2961
2962         * object.c: setting the new vtable in a transparent proxy object must
2963         not change the GC descriptor.
2964
2965 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
2966
2967         * object.c: fixed compilation without GCJ support.
2968         * reflection.c: for runtime-created types ensure klass->has_references
2969         is correct (bug #73215).
2970
2971 2005-03-02  Martin Baulig  <martin@ximian.com>
2972
2973         * class.c (mono_class_is_assignable_from): Make this work if
2974         `oklass' is a generic instance; fixes #72831.
2975
2976 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
2977
2978         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
2979         with hasthis set.
2980         
2981         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
2982
2983         * marshal.c: Reorganize native->managed marshalling code to also use
2984         the emit_marshal_... functions.
2985
2986 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
2987
2988         * object.c: typed allocs have issues with bitmap sizes > 30,
2989         so check for max_set >= 30.
2990
2991 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
2992
2993         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
2994         managed code. Fixes #73012.
2995
2996         * metadata.h (MonoMarshalSpec): Add elem_mult field.
2997
2998         * metadata.c reflection.c: Load/Emit elem_mult as well.
2999         
3000         * metadata.h (MonoMarshalSpec): Add comment.
3001
3002         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
3003
3004         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
3005         num_elem to -1 if not given.
3006
3007         * object-internals.h (MonoReflectionMarshal): Add has_size field.
3008
3009         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
3010         given values.
3011
3012 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
3013
3014         * null-gc.c (mono_gc_free_fixed): Was not compilable.
3015
3016 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
3017
3018         * reflection.c (encode_marshal_blob): Encode param_num field as well.
3019
3020         * object-internals.h (MonoReflectionMarshal): Add param_num field.
3021
3022 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
3023
3024         * object.c: generalized the reference bitmap creation
3025         and added hooks for the new GC.
3026         * class-internals.c: removed the gc_bitmap field from MonoClass.
3027
3028 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3029
3030         * domain.c: help the compiler to produce better code
3031         in mono_jit_info_table_find ().
3032
3033 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3034
3035         * object.c: make all allocations look typed.
3036
3037 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3038
3039         * socket-io.c: load Mono.Posix if it's not loaded already
3040         (fixes bug#73033).
3041
3042 2005-02-24  Martin Baulig  <martin@ximian.com>
3043
3044         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
3045         * reflection.c (dup_type): Likewise.
3046
3047 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
3048
3049         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
3050         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
3051
3052 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3053
3054         * domain.c, threads.c, object-internals.h: make the critical thread
3055         local vars use the fast access mode (even when we're compiled in
3056         a lib). Provide accessors to be used by the jit during codegen.
3057
3058 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
3059
3060         * appdomain.c: Changed hook functios behavior to include
3061         support for the reflection only assemblies. Some icalls were changed
3062         to support the mentioned assemblies too. Signatures of static methods
3063         try_assembly_resolve and real_load now have an additional parameter:
3064         refonly.
3065
3066         * assembly.c: General changes to mono_assembly_ methods to support
3067         reflection only api. Functions mono_assembly_open, mono_assembly_load,
3068         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
3069         suffix, to support an additional gbool parameter to specify whether
3070         the assembli is reflection only or not. Created some new hook functions 
3071         to add support for reflection only assemblies. Signatures of static 
3072         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
3073         have now an additional parameter: refonly.
3074
3075         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
3076         indicating whether the assembly is reflection only or not.
3077
3078         * exception.c: Add mono_get_exception_invalid_operation.
3079
3080         * icall.c: Throw an InvalidOperationException when trying to invoke
3081         a property/method/event, or trying to set/get the value of a field.
3082         Also add an icall to retrieve the ref_only flag to the
3083         MonoReflectionAssembly.
3084
3085 2005-02-23  Chris Toshok  <toshok@ximian.com>
3086
3087         Part of fix for #72827.
3088         * mono-debug.c (mono_debug_add_method): add lexical block data to
3089         the info we write.  Kind of a hack at the moment - we copy the
3090         lexical block info from the MonoDebugMethodInfo to the
3091         MonoDebugMethodJitInfo here, before writing it.
3092         (mono_debug_read_method): read the lexical block info.
3093
3094         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
3095
3096         * debug-mono-symfile.h: add lexical block support.
3097
3098         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
3099         support.
3100
3101 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
3102
3103         * loader.c (mono_lookup_pinvoke_call): Fix warning.
3104
3105         * object.c (mono_runtime_free_method): Call mono_free_method () and
3106         put the TODOs there.
3107
3108         * loader.c (mono_free_method): Free up most memory allocated for 
3109         dynamic methods.
3110
3111 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
3112
3113         * reflection.c: properly flag a Type argument to a
3114         named custom attr value (bug #72248).
3115
3116 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3117
3118         * reflection.c: reduce code duplication in named custom
3119         attribute encoding.
3120
3121 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
3122
3123         * reflection.c: properly encode custom attrs of type object
3124         (bug #72649).
3125
3126 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
3127
3128         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
3129
3130 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
3131
3132         * socket-io.c: load System.dll if it's not loaded already
3133         (bug #72850 and #70477).
3134
3135 2005-02-21  Martin Baulig  <martin@ximian.com>
3136
3137         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
3138         generic instances.
3139
3140 2005-02-21  Martin Baulig  <martin@ximian.com>
3141
3142         * reflection.c (mono_image_build_metadata): We also need to
3143         "fixup" the MethodImpl table after we computed the final method
3144         indices.  Call fixup_methodimpl() to do that.
3145         (fixup_methodimpl): New private method.
3146
3147 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
3148
3149         * assembly.c: special case mscorlib.dll (bug#72536),
3150         patch from Carlos Alberto Cortez.
3151
3152 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
3153
3154         * threads-types.h threads.c: Fix build bustage.
3155
3156         * threads.c: Use a union for long<->double conversions.
3157
3158         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
3159         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
3160
3161         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
3162         containing the checkpoint call with NOT_TAKEN.
3163         
3164         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
3165         checkpoint before pushing the arguments, so they won't have to be
3166         spilled to stack.
3167
3168 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3169
3170         * domain.c, assembly.c, domain-internals.h: make some data
3171         const and relocation-free.
3172
3173 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
3174
3175         * object.c, appdomain.c, class-internals.h: introduce the
3176         MonoClassRuntimeInfo structure to hold the info needed to
3177         use a class at runtime. Made mono_class_vtable() lock-free
3178         for all the appdomains.
3179
3180 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
3181
3182         * metadata-internals.h, image.c: introduce a per-image mempool to
3183         be used for memory that has the same lifetime as the image.
3184
3185 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
3186
3187         * domain.c: In mono_init_internal(), instead of selecting the first
3188         runtime version supported by an executable, get a list of all
3189         supported versions and select the one for which an mscorlib exists
3190         (since even if the runtime supports a given version, it doesn't mean
3191         that the framework for that version is installed).
3192         Modified get_runtimes_from_exe to support this behavior.
3193         In supported_runtimes, added information about additional system
3194         assembly versions.
3195         
3196         * assembly.c: Added support for more than one system assembly version
3197         per runtime version. Updated the assembly list.
3198         In mono_assembly_remap_version, removed the initial version check,
3199         since we don't know to which version we need to compare until we
3200         get the version set on which the assembly is based.
3201         Moved the code for loading corlib into the new method
3202         mono_assembly_load_corlib(), so it can be used by the initialization
3203         code.
3204         
3205         * domain-internals.h: Updated data structures and added declaration
3206         for mono_assembly_load_corlib.
3207
3208 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
3209
3210         * reflection.c (resolve_object): Fix the creation of the signature in 
3211         the SignatureHelper case.
3212
3213         * assembly.c (mono_assembly_remap_version): Fix binary search.
3214         
3215 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
3216  
3217         * class.c: Added inheritance check when a method is overloaded (from a
3218         virtual method or when implementing an interface) and when a class is
3219         inherited. Added functions to set a failure for a class and to 
3220         retreive the exception from a failure.
3221         * class-internals.h: Added fields to MonoClass to keep the exception
3222         information status for inheritance (or other exceptions) to be thrown
3223         later (i.e. not at load time).
3224         * object.c: Throw the inheritance SecurityException when a type is to 
3225         be created with either class or method inheritance violations.
3226         * reflection.c|h: Fix when getting declsec from a class. Removed 
3227         unrequired code for class. Improved sanity in parameter naming.
3228         * security-manager.c|h: Added functions to check for class and method
3229         inheritance.
3230
3231 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
3232
3233         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
3234         and has_finalize in dynamic types as well.
3235
3236 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
3237
3238         * culture-info-table.h : fixed currency format for en-GB (and so on).
3239
3240 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
3241
3242         * gc.c: ensure the GC handles never have 0 as a value.
3243
3244 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
3245
3246         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
3247         a pointer to a struct to unmanaged code. Fixes #72625.
3248
3249 2005-02-16  Martin Baulig  <martin@ximian.com>
3250
3251         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
3252
3253 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
3254
3255         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
3256
3257 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
3258
3259         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
3260
3261         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
3262         UnmanagedFunctionPointerAttribute, use it for determining calling convention
3263         etc. Fixes #71471.
3264
3265         * reflection.c (mono_custom_attrs_get_attr): New helper function.
3266
3267         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
3268
3269 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
3270
3271         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
3272         changes to make the current context a field in MonoThread.
3273
3274 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
3275
3276         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
3277         the last change.
3278         
3279         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
3280         extracted from mono_marshal_get_native_wrapper.
3281
3282         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
3283         to create wrappers around native functions.
3284
3285         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
3286         delegates for arbitrary function pointers. Fixes #71472.
3287
3288 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
3289
3290         * threads.c: cleaned up the code a little.
3291
3292 2005-02-15  Martin Baulig  <martin@ximian.com>
3293
3294         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
3295         the data table.
3296
3297         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
3298         allocate larger chunks if needed.
3299
3300 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
3301
3302         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
3303         in by mistake.
3304
3305 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
3306
3307         * domain.c: keep the domains in an array and ensure the domain ids
3308         are kept small, so they can be used as indexes to domain-specific data
3309         with a small memory overhead.
3310
3311 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
3312
3313         * icall.c: Handle byref types in Type icalls. Fixes #72544.
3314
3315 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
3316
3317         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
3318
3319 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
3320
3321         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
3322
3323         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
3324         values.
3325
3326         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
3327         
3328 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
3329
3330         * domain-internals.h: add the hashtable here.
3331
3332         * class-internals.h: Remove `info' from MonoMethod
3333
3334         * domain.c: Add a new hashtable, jit_trampoline_hash
3335
3336 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3337
3338         * object.c: don't set the value of static fields
3339         (fixes bug#72494).
3340
3341 2005-02-11  Martin Baulig  <martin@ximian.com>
3342
3343         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
3344         (mono_debug_add_method): Silently ignore the method if it's too big.
3345         (mono_debug_add_type): Likewise.
3346
3347 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
3348
3349         * threads.c, appdomain.c: remove #ifdefs from the code.
3350
3351 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
3352
3353         * metadata-internals.h: Added flags to MonoAssembly to cache the most
3354         common security informations. This allows us to stay in unmanaged code
3355         when doing LinkDemand and it's special cases (except for the first 
3356         time for initialization). The flags a very much used with --security.
3357         * reflection.c|h: Added code to get declarative security attributes 
3358         for LinkDemand and InheritanceDemand. This required to refactor the
3359         existing code for Demand.
3360         * security-manager.c|h: Added new method fields for the special cases
3361         of LinkDemand.
3362
3363 2005-02-10  Martin Baulig  <martin@ximian.com>
3364
3365         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
3366         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
3367
3368 2005-02-10  Martin Baulig  <martin@ximian.com>
3369
3370         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
3371         debugging code; this is almost a complete rewrite.
3372
3373         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
3374
3375 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3376
3377         * domain.c, object.h: expose mono_string_equal () and 
3378         mono_string_hash ().
3379         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
3380         it's implemented in managed code.
3381
3382 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3383
3384         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
3385         lo leak objects between appdomains.
3386
3387 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3388
3389         * assembly.c: old compilers compilation fix from 
3390         robertj@gmx.net (Robert Jordan).
3391
3392 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
3393
3394         * class-internals.h: Little reminder for the future.
3395
3396         * debug-helpers.c: Fix up wrapper_type_names
3397
3398 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3399
3400         * image.c, metadata-internals.h: when loading an image from a file,
3401         mmap all of it and use the same codepaths as when using a
3402         in-memory image: the code is simpler and we use less memory
3403         (both writable and readonly).
3404
3405 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3406
3407         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
3408         API to alloc runtime data structures that need to be tracked by the
3409         GC and contain pointers.
3410         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
3411         make the code more readable and eventually use a different GC.
3412
3413 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
3414
3415         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
3416         for out arguments.
3417         
3418 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
3419
3420         * object.c: In release_type_locks(), don't release the cctor lock
3421         if it has already been released. This fixes a crash in the
3422         thread5 test.
3423
3424 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
3425
3426         * gc.c, marshal.c, icall.c: register a delegate for finalization
3427         only when the native function pointer has been allocated for it.
3428
3429 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3430
3431         * object.c: cleaned up some code, allocate objects that are
3432         pointer free with the atomic malloc variant. Allocate memory
3433         for static data from the mempool if it's pointer-free.
3434         Allocate the bounds array at the end of the array data, when needed.
3435         * object-internals.h, object.h: move a private function in a private
3436         header.
3437         * class.c: handle missing case in tracking references in fields.
3438
3439 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
3440
3441         * class.c, class-internals.h: keep track if a type has
3442         reference fields in either the instance or static fields.
3443
3444 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
3445
3446         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
3447         and renamed to MonoRuntimeInfo. Added fields to store the expected
3448         framework assembly version. Changed mono_get_framework_version and
3449         mono_get_runtime_version for a single mono_get_runtime_info method.
3450         
3451         * assembly.c: Added method to remap system assembly versions to the
3452         current executing runtime version. Removed old mapping code.
3453         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
3454         
3455         * icall.c, reflection.c: Track api changes.
3456
3457 2005-02-06  Miguel de Icaza  <miguel@novell.com>
3458
3459         * loader.c (method_from_memberref): Improve error reporting,
3460         produce the class name instead of the typeref/typedef index. 
3461
3462 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
3463
3464         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
3465
3466 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
3467
3468         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
3469         stdcall and charset name mangling.  Reorganize the code and add
3470         some tracing stuff.
3471
3472 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
3473
3474         * monodiet.c: More iters!
3475
3476         * marshal.c: Iter usage.
3477
3478         * icall.c: Iter usage.
3479
3480         * object.c: Use iters.
3481
3482         * debug-helpers.c: More iters
3483
3484 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
3485
3486         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
3487         under win32.
3488
3489 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
3490
3491         * mono-debug-debugger.c: use iters
3492
3493         * class.c, class-internals.h: mono_class_setup_events is static
3494         now
3495
3496         * All callers: use iters
3497
3498 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
3499
3500         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
3501         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
3502
3503 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
3504
3505         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
3506
3507         * marshal.h: Add prototypes for ldfld/stfld_remote.
3508
3509         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
3510         this is called during startup.
3511         
3512 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
3513
3514         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
3515         MonoThreadsSync struct private in monitor.c. Changed the way
3516         MonoThreadsSync is allocated so it's faster and there is no
3517         need to keep track of it with a finalizer and it uses less memory.
3518         This also finally allows us to allocate mono objects as ptrfree when
3519         there are no reference fields.
3520
3521 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
3522
3523         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
3524         disappearing link to the GC interface and use them to simplify
3525         the gchandles code.
3526
3527 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
3528
3529         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
3530         stfld_remote which call mono_load/store_field_new. This allows methods
3531         calling ldfld/stfld wrappers to be AOTed.
3532
3533         * console-io.c: Include sys/filio.h under solaris.
3534         
3535         * console-io.c: Include curses.h if needed correctly.
3536
3537 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
3538         
3539         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
3540         method->klass as well.
3541
3542         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
3543
3544         * class.c (mono_class_init): Switch on lazy initialization of 
3545         methods.
3546
3547         * class.c (mono_class_get_finalizer): Handle the case when the 
3548         finalizer is inherited.
3549
3550 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3551
3552         * console-io.c: <curses.h> is needed by term.h on solaris.
3553
3554 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
3555
3556         * icall.c, class-internals.h, monodiet.c, class.c: Remove
3557         mono_class_setup_properties where possible. Remove this ftn from
3558         the header file, and make it static.
3559
3560 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
3561
3562         * loader.c: Add missing setup_... call.
3563
3564         * class.c: Add missing setup_... calls.
3565
3566         * class.c (mono_class_init): Switch on lazy initialization of 
3567         the generic vtable.
3568         
3569         * class.c (mono_class_init): Fix generics broken by the recent changes.
3570
3571         * monodiet.c (handle_type): Add missing setup_... calls.
3572
3573         * class.c: Back out garbage in previous patch.
3574         
3575         * class.c: Add missing setup_... calls.
3576
3577         * class.c (mono_class_get_method_from_name_flags): Avoid calling
3578         mono_class_setup_methods () if possible.
3579
3580         * class-internals.h (MonoClass): Add 'has_cctor' flag.
3581
3582         * class-internals.h (MonoCachedClassInfo): New structure.
3583
3584         * class.c: Initialize properties and events fields of MonoClass lazily.
3585
3586         * class.c: Add infrastructure for lazily initializing the methods and
3587         vtable fields of MonoClass. Not yet used.
3588
3589         * class.c (mono_class_get_finalizer): New helper function.
3590
3591         * class.c: Add infrastructure for loading some class related data from
3592         an AOT file.
3593
3594         * object.c: Add infrastructure for initializing the vtable from data
3595         in the AOT file.
3596
3597         * gc.c (run_finalize): Use mono_class_get_finalizer ().
3598
3599         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
3600         appropriate initialization function before accessing parts of the
3601         MonoClass structure.
3602
3603         * marshal.c: Fix warnings.
3604         
3605         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
3606
3607         * mono-debug-debugger.c (get_exception_message): Use 
3608         mono_class_get_method_from_name_flags ().
3609
3610 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
3611
3612         * reflection.c, appdomain.c: Replace a few manual searches that
3613         Zoltan missed. (Paolo approved this part of my initial patch).
3614
3615 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
3616
3617         * profiler.c: disable recording statistical events at report time.
3618
3619 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3620
3621         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
3622         to byteswap arrays of enum values, too (bug #72080).
3623
3624 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
3625
3626         * appdomain.c (set_domain_search_path): Allow this to be called if
3627         domain->setup is not yet set.
3628
3629         * loader.c (mono_method_get_index): New helper function.
3630
3631         * loader.c reflection.c: Use mono_method_get_index ().
3632
3633         * class.c (mono_class_get_method_from_name_flags): New helper method.
3634
3635         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
3636         this.
3637
3638         * class.c (mono_class_get_cctor): New helper method.
3639
3640         * string-icalls.c object.c class.c marshal.c reflection.c: Use
3641         mono_class_get_method () to look up methods.
3642
3643 2005-02-01  Miguel de Icaza  <miguel@novell.com>
3644
3645         * console-io.c: Fix the build, this should work on Windows.
3646
3647 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
3648
3649         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
3650         be set to null to keep things valid
3651
3652 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3653
3654         * icall.c: added Console 2.0 icalls.
3655         * Makefile.am: added console-io.[ch]
3656         * console-io.[ch]: internal calls for Console 2.0 API.
3657
3658 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3659
3660         * class.c: make sure we consider all the interfaces
3661         when calculating max_interface_id (bug found by
3662         Jeroen Frijters running ikvm).
3663
3664 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
3665
3666         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
3667         valuetype fields to null.
3668
3669         * object.c (set_value): Ditto. Fixes #71669.    
3670
3671 2005-01-31  Martin Baulig  <martin@ximian.com>
3672
3673         * metadata.c (mono_metadata_has_generic_params): New public
3674         function; checks whether something is a generic method.
3675
3676 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
3677
3678         * appdomain.c: fix infinite recursion when adding assemblies.
3679
3680 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
3681
3682         * object.c: Fix small typo to return all items for Environment.
3683         GetCommandLineArgs.
3684
3685 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
3686
3687         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
3688         reflection.c: more domain and assembly-unload related fixes
3689         and memory leaks plugs.
3690
3691 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
3692
3693         * 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.
3694
3695 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
3696
3697         * loader.c (mono_method_signature): Make this method lazy
3698         (mono_get_method_from_token): Don't computate the signature here.
3699
3700         Doing this saves quite a bit of memory. I got 90 kb on starting up
3701         monodoc. It should also save some disk reads on startup.
3702
3703         * *: MonoMethod->signature might be NULL now. You *MUST* use
3704         mono_method_signature.
3705
3706 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
3707
3708         * object.c (mono_runtime_get_main_args): Return an array from the
3709         current domain here. Fixes #71938.
3710
3711 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
3712
3713         * monitor.c: formatting changes to comply with the
3714         mono coding style and remove #ifdefs from the code.
3715
3716 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3717
3718         * metadata.c, private.h: remove some unneeded data
3719         and use a more compact representation for table schemas.
3720
3721 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
3722
3723         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
3724         to get a better distribution in hash tables.
3725         * *.c: use mono_aligned_addr_hash() where appropriate.
3726         * assembly.c: make var static.
3727
3728 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
3729
3730         * domain-internals.h: Put MonoJitInfo on a diet.
3731
3732         * domain.c: Fix a warning.
3733
3734 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3735
3736         * gc.c: rework the gc handles code to reuse handles
3737         when freed.
3738
3739 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
3740
3741         * domain.c: fixed long standing bug in mono_string_equal() which
3742         was brought to light with the ldstr changes.
3743
3744 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
3745
3746         * reflection.c: Remove warning by adding missing include for marshal.h
3747
3748 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
3749
3750         * domain.c, object.c: change the ldstr_table to hold
3751         MonoString* as keys: makes the runtime isinterned lookup
3752         faster and simplifies memory management.
3753
3754 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
3755  
3756         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
3757         possible to add imperative security checks before calling the icall.
3758         * reflection.c: Return security attributes on the original MonoMethod
3759         (and not the wrapped one). This fix permissions on icalls.
3760
3761 2005-01-25  Dick Porter  <dick@ximian.com>
3762
3763         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
3764         the check for mktime() support actually test the mktime() return
3765         value.  "Fixes" bug 71682, though the output is still different to
3766         MS.
3767
3768 2005-01-25  Martin Baulig  <martin@ximian.com>
3769
3770         * class.c (mono_class_is_assignable_from): Make this work for
3771         generic instances.
3772
3773 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
3774
3775         * marshal.c (mono_string_utf8_to_builder)
3776         (mono_string_builder_to_utf16): We might not have ownership of the
3777         string. In thise case, we need to create a new buffer.
3778
3779         * object-internals.h (mono_stringbuilder_capacity): sb->str might
3780         be null, in which case, use the default capacity.
3781
3782 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
3783
3784         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
3785         GC events to the profiler.
3786
3787 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
3788
3789         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
3790         if you don't want the GC to run.
3791
3792 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
3793
3794         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
3795         start providing a GC API and keeping different implementations in
3796         their own file.
3797         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
3798
3799 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
3800
3801         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
3802         mmap rather than allocating a huge buffer.
3803         (mono_debug_close_mono_symbol_file): Free the buffer allocated
3804         above.
3805
3806 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
3807
3808         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
3809         and CheckExecutionRights.
3810         * reflection.c|h: Keep the index of the declarative security to be 
3811         used, instead of the pointer, when AOT compiler is used. Also add 
3812         class initialization when requesting demands.
3813         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
3814         CheckExecutionRights. Both properties are now FALSE by default, and
3815         unmodifiable, unless the --security option is used.
3816
3817 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
3818
3819         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
3820         reflection.c: properly refcount images and assemblies, many leaks fixed.
3821
3822 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3823
3824         * threadpool.c: increase the timeout for threads in the thread pool to
3825         10s.  Fixes bug #67159.
3826
3827 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
3828
3829         * class-internals.h: Sun's compiler insists on explicit
3830         signed on bit fields to handle then correctly.
3831
3832 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
3833
3834         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
3835         Make the size of the array fit only the number of invalid path
3836         chars that we have.
3837
3838         * class.c (_mono_class_get): Improve the error reporting when a
3839         class referenced is not found, to assist debugging. 
3840
3841 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
3842
3843         * threads.c: fix off-by-one error.
3844         * domain.c: free data allocated in the domain.
3845
3846 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
3847
3848         * reflection.c (mono_method_body_get_object): Fill out exception info
3849         as well.
3850
3851         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
3852         structure.
3853         
3854 2005-01-19  Martin Baulig  <martin@ximian.com>
3855
3856         * loader.c (mono_get_method_constrained): Make this work again.
3857
3858 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
3859
3860         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
3861         guint16 to match the managed side.
3862
3863         * reflection.c (mono_reflection_body_get_object): Fill out local
3864         variables array.
3865
3866         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
3867         as well.
3868
3869         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
3870         'local_var_sig_token'.
3871
3872 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
3873
3874         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
3875         System.Drawing.
3876
3877         * reflection.c (mono_method_body_get_object): Handle abstract and
3878         runtime methods.
3879
3880 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
3881
3882         * marshal.c, loader.c, class-internals.h, reflection.c:
3883         store the emthod data for a wrapper in an array instead of a list.
3884
3885 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
3886
3887         * marshal.c: change the code to allocate memory more
3888         conservatively for method wrappers.
3889
3890 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
3891
3892         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
3893         fields from MonoClass to the marshal info structure where they belong.
3894
3895 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
3896
3897         * class.c, object.c, class-internals.h, marshal.c: rearrange
3898         some fields and tweak some types to lower memory usage.
3899
3900 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
3901
3902         * threads.c (signal_thread_state_change): Handle the case when the
3903         target thread is the current thread.
3904
3905         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
3906
3907         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
3908         emit_ptr_to_object_conv. 
3909
3910         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
3911         marshalling. Fixes #71352.
3912
3913 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
3914
3915         * metadata.h, blob.h: move table enum to blob.h so it can be included
3916         in any header.
3917         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
3918         cut the size of MonoImage/MonoDynamicImage.
3919
3920 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
3921
3922         * profiler.c (mono_profiler_install_simple): Fix default arguments.
3923
3924 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
3925
3926         * reflection.c, reflection.h, icall.c: add a function to check
3927         if an attribute type is defined for a metadata object.
3928
3929 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
3930
3931         * object-internals.h: Added some needed fields from StringBuilder class.
3932         * marshal.c: Set the maxCapacity when creating a StringBuilder.
3933
3934 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
3935
3936         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
3937         threads before shutting down the runtime.
3938
3939         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
3940
3941 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
3942
3943         * object-internal.h, threads.c: implement stacksize and 
3944         parameterized thread start functionality (requires
3945         matching corlib). Marked broken code for later removal.
3946
3947 2005-01-12  Martin Baulig  <martin@ximian.com>
3948
3949         * class-internals.h (MonoGenericClass): Moved the `initialized'
3950         flag to MonoDynamicGenericClass, removed `init_pending'.
3951         (MonoGenericInst): Added `is_reference' flag.
3952
3953 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
3954
3955         * reflection.c (mono_image_create_pefile): Only set the pe_offset
3956         inside the MSDOS header. Fixes #71201.
3957
3958         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
3959         gc thread.
3960         (mono_domain_finalize): Ditto.
3961
3962 2005-01-12  Martin Baulig  <martin@ximian.com>
3963
3964         * class.c (mono_get_shared_generic_class): Use the cache for
3965         non-dynamic generic classes.
3966
3967         * class-internals.h (mono_class_create_generic_2): Removed
3968         function prototype, this function is now static inside class.c.
3969
3970         * class.c (mono_class_create_generic_2): Made this static, only
3971         call it from mono_class_init() and mono_class_setup_parent().
3972         (collect_implemented_interfaces_aux): Call mono_class_init() on
3973         the interfaces we collect.
3974         (mono_class_setup_vtable): Call mono_class_init (class->parent).
3975
3976 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
3977
3978         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
3979         it a real thread handle.
3980
3981         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
3982         MonoJitExceptionInfo, since each catch clause needs its own variable.
3983         
3984 2005-01-11  Dick Porter  <dick@ximian.com>
3985
3986         * image.c (mono_pe_file_open): New variant on mono_image_open()
3987         that does not set up the CLI metadata; used for FileVersionInfo so
3988         it can get the data for windows binaries too.
3989         
3990         * process.c (process_read_string_block): Don't read off the end of
3991         the StringTable block.
3992
3993         These both fix bug 70766.
3994
3995 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
3996
3997         * gc.c: set some fields to NULL at GC cleanup time.
3998         * threads.c: if we quit the main thread, call exit ().
3999
4000 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
4001
4002         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
4003
4004 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
4005
4006         * threads.h, threads.c, object.c: added accessor and settor for
4007         main_thread. Handle it specially when exiting from it: wait
4008         for other foreground threads to exit.
4009
4010 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
4011
4012         * process.c, verify.c: remove some bloat.
4013
4014 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
4015
4016         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
4017         the calling convention to cdecl under win32.
4018
4019 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
4020
4021         * object.c (mono_object_get_size): New function to get the size of
4022         an object instance.
4023
4024         * profiler.c (simple_allocation): Use above.
4025
4026 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
4027
4028         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
4029         ves_icall_System_AppDomain_getRootDomain (as it's not required to
4030         get an appdomain by it's id and we can't assume the root's id is 0).
4031         * domain-internals.h: Change the function prototype to match.
4032         * icall.c: Change the icall table for AppDomain.
4033
4034 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
4035
4036         * locales.c (string_invariant_compare_char): Only compute
4037         GUnicodeTypes in the case where we need them.  Test for ordinality
4038         first and return if so.
4039
4040         From the commit:
4041
4042                 /*
4043                  * FIXME: here we must use the information from c1type and c2type
4044                  * to find out the proper collation, even on the InvariantCulture, the
4045                  * sorting is not done by computing the unicode values, but their
4046                  * actual sort order.
4047                  */
4048
4049 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4050
4051         * loader.c: for P/Invoke methods, allow the "Internal" shared
4052         library name to refer to the calling process symbol namespace.
4053
4054 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
4055
4056         * Makefile.am: Add the security manager to the build.
4057         * security-manager.c|h: New. Initialization of the security manager.
4058
4059 2005-01-07  Dick Porter  <dick@ximian.com>
4060
4061         * threads.c: 
4062         * monitor.c: Update thread state during Monitor and WaitHandle
4063         waits.  Fixes bug 71031.
4064
4065 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
4066
4067         * reflection.c (property_encode_signature): Correctly handle when the
4068         property has no methods.
4069
4070 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
4071
4072         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
4073         
4074         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
4075         fields from mb, not rmb. Fixes #71017.
4076
4077         * marshal.c (emit_ptr_to_str_conv): Add support for 
4078         ByValTStr -> string conversion. Fixes #71015.
4079
4080         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
4081
4082         * mempool.c (mono_mempool_contains_addr): New helper function.
4083
4084 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
4085
4086         * metadata.c (mono_metadata_compute_size): Fix size calculation of
4087         HasSematics encoded fields.
4088         
4089         * metadata.c (mono_type_to_unmanaged): Improve error message for 
4090         invalid string marshalling.
4091
4092         * metadata.c: Fix warnings.
4093         
4094 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4095
4096         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
4097         profiler support.
4098
4099 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
4100
4101         * domain.c object.c domain-internals.h: Revert part of r38077 since the
4102         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
4103         tests.
4104
4105 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
4106
4107         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
4108         so methods containing these can be AOTed.
4109
4110 2005-01-03  Martin Baulig  <martin@ximian.com>
4111
4112         * loader.c (find_method): Removed the hack for generic instances.
4113         (method_from_memberref): If our parent is a generic instance, pass
4114         its generic type definition to find_method() and then inflate the
4115         method.
4116         (mono_get_method_constrained): Pass the generic type definition to
4117         find_method() and inflate the method later.
4118
4119         * class-internals.h (MonoStats): Added `generic_class_count'.
4120
4121         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
4122         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
4123
4124         * reflection.c (mono_custom_attrs_from_params): Don't ignore
4125         generic type definitions.
4126
4127 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
4128
4129         * loader.c icall.c: Fix warnings.
4130
4131 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
4132
4133         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
4134         blittable types. Fixes #70864.
4135
4136 2004-12-29  Martin Baulig  <martin@ximian.com>
4137
4138         * icall.c
4139         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
4140
4141         * reflection.c (mono_method_get_object): Create a
4142         "System.Reflection.MonoGenericMethod" for inflated methods; don't
4143         call mono_get_inflated_method().
4144
4145         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
4146
4147 2004-12-27  Martin Baulig  <martin@ximian.com>
4148
4149         * class-internals.h (MonoMethod): Added `is_inflated' flag.
4150         (MonoMethodInflated): Added `inflated' field.
4151
4152         * class.c (mono_class_inflate_generic_method): Don't really
4153         inflate the method here; just set the `is_inflated' flag in the
4154         MonoMethod.
4155         (mono_class_get_inflated_method): Actually inflate the method here
4156         if it's not already inflated; we use the MonoMethodInflated's new
4157         `inflated' field as a cache.
4158
4159 2004-12-26  Martin Baulig  <martin@ximian.com>
4160
4161         * class.c
4162         (inflate_generic_class): Moved some code out of inflate_generic_type().
4163         (mono_class_inflate_generic_method): If we're already inflated,
4164         inflate the context and use the declaring method; ie. make sure
4165         the declaring method of an inflated method is always the generic
4166         method definition.
4167         (mono_class_create_from_typedef): Create
4168         `class->generic_container->context->gclass'.
4169
4170 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
4171
4172         * metadata-internals.h, marshal.c, reflection.c: More
4173         MonoGHashTable->GHashTable.
4174
4175         * domain-internals.h, class.c: Change MonoGHashTable's into
4176         GHashTables for some cases where no gc stuff is used
4177
4178         All users: update apis
4179
4180 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
4181
4182         * metadata.c (builtin_types): Make this `const'. Makes this get
4183         put into the shareable section.
4184         (mono_metadata_init): Casts to make gcc happy.
4185
4186 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
4187
4188         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
4189
4190 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
4191
4192         * icall.c: Added an internal call to retrieve the position and length
4193         of assembly-level declarative security attributes (RequestMinimum, 
4194         RequestOptional and RequestRefuse). This is used by the Assembly class
4195         to re-create the corresponding permission sets.
4196
4197 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
4198
4199         * marshal.c: fix the stelemref wrapper to be type correct
4200         (and faster).
4201
4202 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
4203
4204         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
4205         to do key & 0x7fffffff. Hashtable already does this. It just
4206         results in longer code.
4207
4208 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
4209
4210         * appdomain.c: Bump corlib version.
4211         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
4212         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
4213         * reflection.c|h: Add functions to get declarative security infos
4214         (blob position and length) for assemblies, classes and methods.
4215
4216 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
4217
4218         * reflection.c: sort the constant table (bug #70693).
4219
4220 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
4221
4222         * object-internals.h, threads.c, domain.c: add accessors for
4223         the MonoThread and MonoDomain tls keys.
4224
4225 2004-12-18  Martin Baulig  <martin@ximian.com>
4226
4227         * class.c (inflate_generic_type): If we're inflating a generic
4228         instance, set `ngclass->context->container = context->container';
4229         ie. the container we inflated into.
4230
4231         * metadata.c (mono_metadata_parse_generic_param): Reflect above
4232         inflate_generic_type() changes.
4233
4234 2004-12-17  Martin Baulig  <martin@ximian.com>
4235
4236         * class-internals.h
4237         (MonoGenericClass): Replaced `MonoType *generic_type' with
4238         `MonoClass *generic_class'.  Removed `dynamic_info'; if
4239         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
4240         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
4241
4242 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
4243
4244         * exception.c (mono_exception_from_token): New helper function.
4245
4246 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
4247
4248         * assembly.c (mono_assembly_load_with_partial_name): Call 
4249         mono_assembly_loaded before invoking the preload hooks. Fixes
4250         #70564.
4251
4252         * object-internals.h (MonoThread): Change culture_info and 
4253         ui_culture_info into an array.
4254
4255         * threads.c: Cache culture info objects from more than one appdomain.
4256
4257         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
4258         current UI culture.
4259
4260 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
4261
4262         * threads.h threads.c appdomain.c: Clear the culture_info field of
4263         all threads during unloading if they point to an object in the dying
4264         appdomain.
4265
4266 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
4267
4268         * culture-info.h (TextInfoEntry): New struct
4269         * object-internals.h: sync with managed
4270         * locales.c: fill the `text_info_data' field
4271         * culture-info-tables.h: update
4272
4273 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
4274
4275         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
4276         collector.
4277
4278 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
4279
4280         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
4281         (ves_icall_ModuleBuilder_getMethodToken): Ditto
4282
4283 2004-12-12  Martin Baulig  <martin@ximian.com>
4284
4285         * mono-debug-debugger.c (write_type): If we're an enum and the
4286         builtin types have already been initialized, call mono_class_init().
4287
4288 2004-12-11  Martin Baulig  <martin@ximian.com>
4289
4290         * metadata.c (mono_metadata_load_generic_params): Added
4291         `MonoGenericContainer *parent_container' argument; automatically
4292         compute `container->is_method'; pass the correct owner to
4293         get_constraints().      
4294
4295         * reflection.c (compare_genericparam): Sort the GenericParam table
4296         according to increasing owners. 
4297
4298 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
4299
4300         * profiler.c: allow disabling the default profiler.
4301
4302 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
4303
4304         * decimal.c, icall.c: allow disabling System.Decimal support.
4305
4306 2004-12-09  Marek Safar <marek.safar@seznam.cz>
4307
4308         * reflection.c: Add support for null attribute arguments.
4309
4310 2004-12-09  Martin Baulig  <martin@ximian.com>
4311
4312         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
4313         names to get rid of compiler warnings.
4314
4315 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
4316
4317         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
4318         mono_marshal_load_type_info (). Fixes #69625.
4319         (mono_marshal_get_ptr_to_struct): Likewise.
4320
4321 2004-12-08  Martin Baulig  <martin@ximian.com>
4322
4323         * mono-debug.h: Bumped version number to 47.
4324
4325         * mono-debug-debugger.c
4326         (mono_debugger_event_handler, mono_debugger_event): Take two
4327         guint64 arguments insteed of a gpointer and a guint32.  
4328
4329 2004-12-08  Martin Baulig  <martin@ximian.com>
4330
4331         * debug-mono-symfile.h
4332         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
4333         `address' to `native_offset'.
4334
4335 2004-12-08  Martin Baulig  <martin@ximian.com>
4336
4337         * class.c (mono_class_create_from_typespec): Only inflate if we
4338         either have `context->gclass' or `context->gmethod'.
4339
4340 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
4341
4342         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
4343
4344         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
4345
4346         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
4347
4348         * reflection.c (mono_assembly_get_object): Remove the workaround put
4349         in for the release.
4350         
4351         * appdomain.c: Use the corlib_internal field from MonoAssembly.
4352
4353         * appdomain.c: Bump corlib version.
4354
4355         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
4356         be visible in other appdomains.
4357
4358 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
4359
4360         * threads.c: Interlocked inc and dec for longs were messed up,
4361         use a KISS based impl for this. Fixes 70234
4362
4363 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
4364
4365         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
4366
4367 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
4368
4369         * icall.c: fix to follow policy not to allow struct
4370         arguments in icalls.
4371
4372 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4373
4374         * process.c: make the patch that handles spaces in file paths work
4375         on mono/windows too.
4376
4377 2004-12-06  Martin Baulig  <martin@ximian.com>
4378
4379         * class.c (mono_class_create_generic): Call
4380         mono_class_setup_supertypes() if we're dynamic.
4381         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
4382
4383 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
4384
4385         * object-internals.h: Add new fields to MonoThread.
4386
4387         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4388
4389         * icall.c threads-types.h threads.c: Add new icalls.
4390
4391         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
4392
4393         * object-internals.h (MonoReflectionAssembly): Sync object layout with
4394         managed side.
4395
4396         * appdomain.c: Bump corlib version.
4397
4398         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
4399         internal assemblies. Fixes #69181.
4400
4401 2004-12-05  Martin Baulig  <martin@ximian.com>
4402
4403         * class.c (mono_class_inflate_generic_signature): Make this a
4404         no-op if `context' is NULL or we don't have any type parameters;
4405         also copy `sentinelpos'.        
4406
4407 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
4408
4409         * image.c: Add unbox_wrapper_cache.
4410
4411         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
4412
4413         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
4414         function generator.
4415         
4416         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
4417         Fixes #70173.
4418
4419         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
4420         
4421 2004-12-04  Martin Baulig  <martin@ximian.com>
4422
4423         * loader.c (mono_method_get_signature_full): New public function;
4424         like mono_method_get_signature(), but with an additional
4425         `MonoGenericContext *' argument.
4426
4427         * class.c (mono_class_inflate_generic_signature): Formerly known
4428         as inflate_generic_signature(); make this public.
4429
4430 2004-12-04  Martin Baulig  <martin@ximian.com>
4431
4432         * metadata.c
4433         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
4434         instead of a `MonoGenericContainer *'.  
4435         (mono_metadata_parse_array_full): Likewise.
4436         (mono_metadata_parse_signature_full): Likewise.
4437         (mono_metadata_parse_method_signature_full): Likewise.
4438         (mono_metadata_parse_generic_inst): Likewise.
4439         (mono_metadata_parse_generic_param): Likewise.
4440         (mono_metadata_parse_mh_full): Likewise.
4441         (mono_type_create_from_typespec_full): Likewise.
4442
4443 2004-12-03  Martin Baulig  <martin@ximian.com>
4444
4445         * class-internals.h (MonoGenericContainer): Replaced the
4446         `MonoGenericContext * pointer with a `MonoGenericContext'
4447         structure and made it the first element.
4448
4449 2004-12-03  Martin Baulig  <martin@ximian.com>
4450
4451         * class.c
4452         (inflate_generic_type): Set the `context->container' when creating
4453         a new MonoGenericContext.
4454         (mono_class_inflate_generic_method): Likewise.
4455         (mono_class_create_from_typespec): Just use `context->container'
4456         to get the container.
4457
4458         * loader.c (method_from_methodspec): Set `context->parent' from
4459         `context->container' - and if that's a method container, use its
4460         parent.  Also set the `context->container' when creating a new
4461         MonoGenericContext.
4462         (mono_get_method_from_token): Use just `context->container' to get
4463         the container.
4464
4465         * metadata.c (do_mono_metadata_parse_generic_class): Also set
4466         `gclass->context->container'.
4467
4468         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
4469         the `context->container' when creating a new MonoGenericContext.
4470
4471 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
4472
4473         * reflection.c (compare_genericparam): Sort params with identical
4474         owner by their number. Fixes gen-111 on sparc.
4475
4476 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
4477
4478         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
4479         around the domain changes.
4480
4481         * appdomain.c (mono_domain_unload): Handle the case when the thread
4482         calling Unload is itself being aborted during unloading. Fixes #70022.
4483
4484         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
4485
4486         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
4487         checkpoint_func as an icall so it gets a wrapper.
4488         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
4489         in the cross-appdomain wrappers too.
4490
4491         * threads.c (mono_thread_has_appdomain_ref): Make this public.
4492
4493         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
4494
4495         * reflection.c: Fix some memory leaks.
4496         
4497 2004-12-02  Martin Baulig  <martin@ximian.com>
4498
4499         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
4500
4501         * metadata.c (generic_class_cache): New static hashtable.
4502         (mono_metadata_lookup_generic_class): New public method.
4503
4504 2004-12-02  Martin Baulig  <martin@ximian.com>
4505
4506         * class.c (mono_class_create_from_typedef): Call
4507         mono_class_setup_parent() and mono_class_create_mono_type() before
4508         parsing the interfaces.
4509
4510 2004-12-02  Martin Baulig  <martin@ximian.com>
4511
4512         * metadata.c (generic_inst_cache): New static hashtable.
4513         (mono_metadata_lookup_generic_inst): New public function.
4514         (mono_metadata_inflate_generic_inst): New public function.
4515         (mono_metadata_parse_generic_inst): New public function.
4516         (do_mono_metadata_parse_generic_class): Use the new
4517         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
4518         since this'll also use the cache.
4519
4520         * reflection.c (mono_reflection_bind_generic_method_parameters):
4521         Use mono_metadata_lookup_generic_inst() to use the new cache.
4522
4523         * class.c (inflate_mono_type): Use
4524         mono_metadata_inflate_generic_inst() to inflate a generic
4525         instance; this'll also use the new cache.
4526
4527         * loader.c (method_from_methodspec): Use
4528         mono_metadata_parse_generic_inst() and
4529         mono_metadata_inflate_generic_inst() rather than parsing it
4530         manually, so we can use the new cache.
4531
4532 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
4533
4534         * threads.c (wait_for_tids): Do not incorrectly free threads when 
4535         the wait times out.
4536
4537 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
4538
4539         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
4540         iter->args based on whether parameters are passed in registers (i.e.
4541         MONO_ARCH_REGPARMS is defined)
4542
4543 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
4544
4545         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
4546         the exception message. Fixes #70070.
4547         (method_from_methodspec): Fix warnings.
4548
4549 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4550
4551         * process.c: (complete_path) return the path quoted
4552
4553 2004-12-01  Martin Baulig  <martin@ximian.com>
4554
4555         * class-internals.h (MonoGenericInst): New structure.
4556         (MonoGenericClass): Replaced `type_argc', `type_argv' and
4557         `is_open' with `MonoGenericInst *inst'.
4558         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
4559         `is_open' with `MonoGenericInst *inst'.
4560
4561 2004-11-30  Martin Baulig  <martin@ximian.com>
4562
4563         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
4564
4565         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
4566         to `generic_class_cache'.
4567
4568         * metadata.c
4569         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
4570         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
4571         (mono_generic_inst_is_valuetype): Renamed to
4572         mono_generic_class_is_valuetype().
4573
4574         * class-internals.h
4575         (MonoGenericInst): Renamed to MonoGenericClass.
4576         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
4577         (MonoClass): Renamed `generic_inst' to `generic_class'.
4578         (MonoGenericContext): Renamed `ginst' to `gclass'.
4579
4580         * object-internals.h
4581         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
4582
4583         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
4584         mono_reflection_generic_class_initialize().
4585
4586         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
4587         now known as "System.Reflection.MonoGenericClass".
4588         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
4589
4590 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
4591
4592         * class-internals.h: Added a flag field to MonoClass to cache the
4593         declarative security attributes actions associated with the class.
4594         * domain-internals.h: Added booleans to MonoJitInfo to cache the
4595         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
4596         applicable to the JITted method.
4597         * reflection.c|h: Added functions to extract (as flags) which security
4598         actions are available (declaratively) for a method, class or assembly.
4599         * metadata.c|h: Added functions to search the declarative security
4600         table in the metadata.
4601         
4602 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
4603
4604         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
4605         EXPORTEDTYPES are already in the class name cache, so there is no
4606         need to add extra code here to look at them. Just removes a bit of
4607         cruft.
4608
4609         (ves_icall_System_Environment_get_TickCount): No need for #if
4610         WINDOWS. We already have the code in io-layer.
4611
4612 2004-11-28  Martin Baulig  <martin@ximian.com>
4613
4614         * loader.c
4615         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
4616         Fixes gen-112.cs.
4617
4618 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
4619
4620         * assembly.c (do_mono_assembly_open): Instead of having a
4621         conditional WITH_BUNDLE, incorporate support for bundles here, by
4622         having a global `bundles' variable holding a pointer to the actual
4623         bundles. 
4624
4625         (mono_register_bundled_assemblies): New API call used by the
4626         bundle code. 
4627
4628         See mkbundle.1 for details.
4629         
4630 2004-11-27  Martin Baulig  <martin@ximian.com>
4631
4632         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
4633         the vtable for generic methods.
4634
4635 2004-11-26  Martin Baulig  <martin@ximian.com>
4636
4637         * metadata.c
4638         (mono_metadata_generic_method_hash): New public function.
4639         (mono_metadata_generic_method_equal): Likewise.
4640
4641         * class-internals.h
4642         (MonoGenericContainer): Added `GHashTable *method_hash'.
4643
4644         * reflection.c (ReflectionMethodBuilder): Added
4645         `MonoGenericContainer *generic_container'.
4646         (reflection_methodbuilder_to_mono_method): Don't create a new
4647         MonoGenericContainer each time we're called.
4648         (mono_reflection_bind_generic_method_parameters): Use
4649         `container->method_hash' to cache the results so we don't create a
4650         different method if we're called several times with the same
4651         arguments.
4652
4653         * loader.c (method_from_methodspec): Use the new
4654         `container->method_hash' here, too.
4655
4656 2004-11-26  Martin Baulig  <martin@ximian.com>
4657
4658         * class.c (inflate_generic_signature): Correctly compute
4659         `res->has_type_parameters'.
4660         (mono_class_vtable): Use the `has_type_parameters' flag to
4661         determine whether we're a generic method.
4662
4663         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
4664
4665 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
4666
4667         * object.c (mono_runtime_run_main): Fix a small memory leak.
4668
4669 2004-11-25  Martin Baulig  <martin@ximian.com>
4670
4671         * class.c (set_generic_param_owner): Fixed the loop.
4672
4673 2004-11-25  Martin Baulig  <martin@ximian.com>
4674
4675         * object.c (mono_class_vtable): Don't create any JIT wrappers for
4676         generic methods.
4677
4678 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
4679
4680         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
4681         names. Fixes #69787.
4682
4683 2004-11-24  Martin Baulig  <martin@ximian.com>
4684
4685         * class.c (mono_class_create_generic_2): If we don't have a
4686         `ginst->parent', inflate `gklass->parent' to get our parent.
4687
4688 2004-11-24  Martin Baulig  <martin@ximian.com>
4689
4690         * reflection.c (compare_genericparam): Correctly sort the
4691         GenericParam table; fixes #69779.
4692
4693 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
4694
4695         * reflection.c: When writing a PE file, don't create a huge
4696         buffer in memory. Just write the arrays we have to the file.
4697         This reduces memory usage.
4698
4699         * metadata-internals.h: MonoDynamicStream pefile is no longer used
4700         globally.
4701
4702 2004-11-17  Martin Baulig  <martin@ximian.com>
4703
4704         * class.c (mono_class_init): Don't setup `class->parent' for
4705         dynamic instances; moved this to mono_class_generic_2().
4706         (mono_class_create_generic): Also set `klass->inited' for dynamic
4707         generic instances.
4708         (mono_class_create_generic_2): Don't do anything for dynamic
4709         generic instances.  Set `klass->parent' here and also call
4710         mono_class_setup_parent() here. 
4711
4712         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
4713         `MonoType *parent' argument; set `ginst->parent' before calling
4714         mono_class_create_generic_2(), so we set the correct parent.
4715
4716 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
4717
4718         * reflection.c: allow getting attributes from ModuleBuilder
4719         (used by ikvm).
4720
4721 2004-11-17  Martin Baulig  <martin@ximian.com>
4722
4723         * class.c (mono_class_create_from_typedef): If a type parameter is
4724         inherited from an outer class, set its owner to that class.
4725
4726 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
4727
4728         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
4729           for (int*) written size. This fixes bug #69592.
4730
4731 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
4732
4733         * icall.c: Added IsAuthenticodePresnet internal call.
4734         * image.c|h: New function that check a MonoImage for an Authenticode
4735         signature in the certificate PE data directory.
4736         * security.c|h: New internal call to ask the runtime if an 
4737         Authenticode signature seems referenced in the PE header.
4738
4739 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
4740
4741         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
4742
4743         * reflection.c (mono_image_create_pefile): Free the assembly streams
4744         after writing out the assembly file.
4745
4746         * object.c (mono_runtime_run_main): Fix small memory leak.
4747
4748         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
4749         property access modifiers. Fixes #69389.
4750
4751 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
4752
4753         * domain.c, object.c, object-internals.h, domain-internals.h,
4754         object.h, marshal.c: keep dynamic code info per domain.
4755
4756 2004-11-15  Martin Baulig  <martin@ximian.com>
4757
4758         * class.c (mono_type_get_name_recurse): Put type arguments in
4759         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
4760         see bug #68387.
4761
4762 2004-11-15  Martin Baulig  <martin@ximian.com>
4763
4764         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
4765         (mono_class_setup_vtable): When computing `the_cname' for a
4766         generic instance, don't include the namespace since we'd otherwise
4767         add it twice.
4768
4769 2004-11-15  Martin Baulig  <martin@ximian.com>
4770
4771         * class.c (mono_class_create_generic): Changed return type to void.
4772         (mono_class_create_generic_2): New public function; setup
4773         `class->method', `class->field' and `class->interfaces' here
4774         instead of in mono_class_init().
4775
4776         * class.h (mono_class_create_generic): Moved to class-internals.h.
4777
4778 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
4779
4780         * reflection.c (mono_image_create_pefile): take a file HANDLE.
4781         rather than writing to memory, write to this file. Right now,
4782         we are just writting into a buffer, and copying that. However
4783         we can avoid the buffer later.
4784
4785         (mono_dynamic_stream_reset): new function
4786
4787         * icall.c, object-internals.h: update for the above.
4788
4789 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
4790
4791         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
4792         have been using gc'd memory. First it is slower, unlikely
4793         the comment in the source code said, secondly, it increases
4794         our footprint to do it in the gc.
4795
4796         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
4797         the method so that it does not have to copy to managed code.
4798
4799 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
4800
4801         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
4802
4803 2004-11-12  Martin Baulig  <martin@localhost>
4804
4805         * reflection.c (mono_image_create_token): Allow generic method
4806         definitions here, since they may appear in an `.override'; see
4807         gen-98/gen-99 for an example.
4808
4809 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
4810
4811         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
4812         #69365.
4813
4814         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
4815         descriptive.
4816
4817 2004-11-11  Martin Baulig  <martin@ximian.com>
4818
4819         * class.c (mono_class_setup_vtable): In an explicit interface
4820         implementation, the method name now includes the arity.
4821
4822 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
4823
4824         * object.c (mono_array_full_copy): Fix warning.
4825
4826 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
4827
4828         * appdomain.c: Removed look_for_method_by_name(). Use the new method
4829         mono_class_get_method_from_name() instead.
4830         
4831         * class-internals.h: Added two new types of wrappers. 
4832         Added MonoRemotingTarget enum. Added new trampoline function type, which
4833         takes an additional MonoRemotingTarget value as parameter, so it is
4834         possible to request a trampoline for a specific target.
4835         
4836         * class.c: Added new mono_class_get_method_from_name() method.
4837         
4838         * class.h: In MonoRemoteClass, we can have now to vtables, one for
4839         general remoting sinks and one specific for cross domain calls.
4840         
4841         * debug-helpers.c: Added new wrapper names.
4842         
4843         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
4844         of a remote class.
4845         
4846         * image.c: Porperly delete value objects form the remoting invoke hashtable.
4847         
4848         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
4849         with several other methods (mono_marshal_get_xappdomain_dispatch,
4850         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
4851         and others) can generate a fast remoting wrapper for cross domain calls.
4852         More information can be found in docs/remoting.
4853         Other changes: Removed mono_find_method_by_name, and used
4854         mono_class_get_method_from_name instead.
4855         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
4856         is stored in the remoting invoke hashtable.
4857         
4858         * marshal.h: published the new method for getting the xdomain wrapper,
4859         and also added a method for getting the adequate wrapper for a given
4860         method and target.
4861         
4862         * object-internals.h, object.c: Added a couple of methods for capying and
4863         cloning arrays.
4864         Modified mono_install_remoting_trampoline, which takes the new remoting
4865         trampoline that has a remoting target as parameter.
4866         mono_class_proxy_vtable now also takes a remoting target as parameter, and
4867         will return the most suitable vtable for the target.
4868         Added mono_remote_class_vtable, which returns the vtable of a remote class
4869         (which can be the normal remoting vtable or the xdomain vtable).
4870         
4871         * threads.c: the xdomain invoke and dispatch wrappers must also be
4872         protected against interruptions.
4873
4874 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4875
4876         * icall.c: use memmove in BlockCopyInternal when the source and
4877         destination arrays are the same.
4878
4879 2004-11-09  Martin Baulig  <martin@ximian.com>
4880
4881         * class-internals.h (MonoGenericContainer): Removed `method' and
4882         `signature', replaced them with `is_method' and `is_signature'
4883         flags.  Added `context'.
4884
4885         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
4886         instead of a `MonoGenericContainer *'.
4887
4888         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
4889         for dynamic type parameters.
4890         (mono_metadata_load_generic_params): Setup `container->context'.
4891
4892         * reflection.c (mono_reflection_setup_generic_class): Setup
4893         `tb->generic_container->context'.
4894         (do_mono_reflection_bind_generic_parameters): Use
4895         mono_class_inflate_generic_type() to correctly inflate types,
4896         rather than using our own hack just for MONO_TYPE_VAR.
4897
4898 2004-11-09  Martin Baulig  <martin@ximian.com>
4899
4900         * class.c (mono_class_inflate_generic_method): Small fix; don't
4901         crash here.
4902
4903         * icall.c
4904         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
4905         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
4906         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
4907         (ves_icall_Type_BindGenericParameters): Likewise.
4908         (ves_icall_Type_get_IsGenericInstance): Likewise.
4909         (ves_icall_Type_GetGenericParameterPosition): Likewise.
4910         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
4911         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
4912         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
4913
4914 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
4915
4916         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
4917         assembly versions and public key tokens. Fixes #69113.
4918
4919 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
4920
4921         * metadata.c: fix bug introduced with the type cache changes
4922         on 2004-11-06.
4923
4924 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
4925
4926         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
4927         the MonoClass pointer instead of the token in exception clauses.
4928         * reflection.c: updates for the above and make the code not depend
4929         on the structure of MonoExceptionClause.
4930
4931 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
4932
4933         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
4934         Add support for dynamic assemblies. Fixes #69114.
4935
4936         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
4937
4938 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
4939
4940         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
4941         since most only those methods use it. the code member of
4942         MonoMethodPInvoke was dead, so that can be removed too. Also,
4943         remove inline_count (again, not used), and move slot so that it
4944         can share bits with some other flags. This saves 8 bytes in the
4945         structure and gives us about 50 kb back for mcs helloworld.cs
4946
4947         * *.[ch]: Do naming changes for the above.
4948
4949         * loader.c (mono_method_get_header): Lazily init the header
4950         on first access.
4951         (mono_get_method_from_token): don't init the header here
4952         (mono_free_method): the header may never be allocated
4953
4954         Overall, this saves 150 kb of unmanaged allocations
4955         for mcs helloworld.cs. That accounts for 10% of the unmanaged
4956         memory at runtime.
4957         
4958         * loader.c, loader.h (mono_method_get_header): new accessor.
4959
4960         * *.[ch]: use the above method. Prepares us to lazily load
4961         the header.
4962
4963         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
4964         three warnings, which are actual bugs (see 69206).
4965
4966         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
4967         unused. Saves a cool 4 bytes / method.
4968
4969 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
4970
4971         * metadata.c (builtin_types): Add types for System.Object here.
4972         (mono_metadata_parse_type_full): Cache MonoType*'s that are
4973         for a class or valuetype from klass->this_arg or klass->byval_arg.
4974
4975         On mcs for a hello world, this gets us down from 21836 MonoType's
4976         to 14560.
4977
4978         (mono_metadata_free_type): Account for the above change.
4979
4980 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
4981
4982         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
4983         exception instead of asserting if name is null.
4984         (ves_icall_System_AppDomain_GetData): Ditto.
4985
4986 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
4987
4988         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
4989         EnumBuilder.
4990
4991         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
4992         Return NULL when the domain does not have entry_assembly set.
4993
4994         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
4995         Add a 'resource_modules' argument.
4996         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
4997
4998         * reflection.c (mono_reflection_create_runtime_class): Move setting
4999         of wastypebuilder here, so mono_get_type_object () returns a MonoType
5000         for enums too.
5001
5002         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
5003         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
5004         Throw an ArgumentNullException if 'ptr' is null.
5005
5006         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
5007         assemblies here. Fixes #69020.
5008
5009 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
5010
5011         * reflection.c (build_compressed_metadata): Fix the previous patch for
5012         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
5013         the stack.
5014
5015 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
5016
5017         * assembly.c (mono_assembly_names_equal): Allow a match if one of
5018         the cultures is false. Fixes #69090.
5019
5020         * reflection.c (build_compressed_metadata): Fix invalid memory read 
5021         detected by valgrind.
5022         
5023         * reflection.c (mono_reflection_get_type): Avoid triggering a 
5024         TypeResolve multiple times for the same type. Fixes #65577.
5025
5026 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
5027
5028         * marshal.c: Avoid using ldftn to call managed functions. It is
5029         much slower than just a call.
5030
5031         * reflection.c (mono_module_get_object): free the basename we
5032         allocate here from glib.
5033         
5034         * reflection.c (ensure_runtime_vtable): make sure to free
5035         overrides.  Also, we were allocating an array of MonoMethod not an
5036         array of MonoMethod*.
5037
5038         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
5039
5040         * image.c (mono_image_close): free image->guid here.
5041
5042 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
5043
5044         * reflection.c: Fix some spec conformance issues with the PE file
5045         structures so mcs compiled apps run on the Net 2.0 beta.
5046
5047 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
5048
5049         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
5050         Implement this. Fixes #67264.
5051
5052         * debug-helpers.h debug-helpers.c marshal.c: Move 
5053         mono_find_method_by_name to debug-helpers.c.
5054
5055 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
5056
5057         * object.c (mono_release_type_locks): type_initialization_hash is
5058         a GHashTable.
5059
5060         * reflection.c object.c object-internals.h: Fix warnings.
5061
5062         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
5063         without accessors. Fixes #61561.
5064
5065         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
5066         application base from the root domain if not set. Fixes #65641.
5067         (mono_runtime_init): Fix warning.
5068
5069 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5070
5071         * appdomain.c: call mono_thread_pool_init.
5072         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
5073         of worker threads based on the number of CPUs and the environment
5074         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
5075         for non-windows (windows) systems.
5076
5077 2004-10-27  Chris Toshok  <toshok@ximian.com>
5078
5079         * mono-debug-debugger.c (write_class): don't call mono_class_init
5080         here, as even with the check for (!klass->init_pending), we get
5081         into a situation where we're hitting cycles in class
5082         initialization.  Fixes #68816.
5083
5084 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
5085
5086         * image.c: Avoid overwriting values in the loaded_images_hash when an
5087         assembly is loaded multiple times. Fixes #61152.
5088
5089         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
5090         so multiple satellite assemblies for the same name can be loaded.
5091         Fixes #68259.
5092
5093         * mono_domain_assembly_preload: Actually return the loaded assembly, 
5094         not NULL.
5095
5096         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
5097         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
5098
5099         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
5100         pending finalizers are not invoked after the appdomain has been 
5101         unloaded. Fixes #67862.
5102
5103 2004-10-22  Martin Baulig  <martin@ximian.com>
5104
5105         * mono-debug-debugger.c
5106         (mono_debugger_runtime_invoke): Don't box valuetypes.
5107
5108 2004-10-22  Chris Toshok  <toshok@ximian.com>
5109
5110         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
5111         don't hide private methods.
5112
5113 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
5114
5115         * icall.c: Allows the runtime to "share" (when known) the public key
5116         token of an assembly. This avoid the need to recalculate the token 
5117         (from the public key) in managed code.
5118
5119 2004-10-21  Chris Toshok  <toshok@ximian.com>
5120
5121         * debug-helpers.c (append_class_name): argh, revert last patch.
5122         
5123 2004-10-21  Chris Toshok  <toshok@ximian.com>
5124
5125         * debug-helpers.c (append_class_name): use '+' as the delimiter,
5126         not '/', so that it matches what the debugger uses to look up
5127         methods.
5128
5129 2004-10-21  Martin Baulig  <martin@ximian.com>
5130
5131         * mono-debug-debugger.c (mono_debugger_throw_exception): New
5132         public method; this is called each time an exception is thrown and
5133         allows the debugger to use exception catch points.
5134
5135 2004-10-21  Martin Baulig  <martin@ximian.com>
5136
5137         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
5138         the stack pointer and the exception object in some struct and pass
5139         that to the debugger.
5140
5141 2004-10-21  Chris Toshok  <toshok@ximian.com>
5142
5143         * mono-debug-debugger.c (do_write_class): add instance/static
5144         event support.  We don't expose "raise" or "other" yet.
5145         (event_is_static): new method.
5146
5147 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
5148
5149         * mono-debug-debugger.c
5150         (mono_debugger_handle_exception): Remove
5151         bogus return value for fussy compilers.
5152
5153 2004-10-20  Martin Baulig  <martin@ximian.com>
5154
5155         * mono-debug-debugger.c
5156         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
5157         (mono_debugger_handled_exception): Likewise.
5158
5159 2004-10-20  Martin Baulig  <martin@ximian.com>
5160
5161         * mono-debug-debugger.h (MonoDebuggerEvent): Added
5162         MONO_DEBUGGER_EVENT_EXCEPTION.
5163
5164         * mono-debug-debugger.c (mono_debugger_handle_exception): New
5165         public function to send the debugger a notification for an
5166         exception and inform it about a catch/finally clause.
5167
5168 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
5169
5170         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
5171         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
5172         fix 2.95 build. 
5173
5174         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
5175
5176 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
5177
5178         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
5179         marshalled as [In,Out]. Fixes #58325.
5180
5181 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
5182
5183         * reflection.c (mono_method_body_get_object): Implement some fields.
5184
5185 2004-10-12  Martin Baulig  <martin@ximian.com>
5186
5187         * reflection.c (mono_reflection_bind_generic_parameters): Small
5188         fix, correctly retrieve our parent from a generic instance.
5189
5190 2004-10-12  Martin Baulig  <martin@ximian.com>
5191
5192         * metadata.c (mono_metadata_generic_param_equal): We always have
5193         an owner.
5194
5195         * class.c
5196         (mono_class_from_generic_parameter): We need to have an owner.
5197         (my_mono_class_from_generic_parameter): Likewise.
5198
5199         * reflection.c (mono_reflection_setup_generic_class): Renamed to
5200         mono_reflection_create_generic_class() and added a new
5201         mono_reflection_setup_generic_class().  
5202         (mono_reflection_initialize_generic_param): If we're a nested
5203         generic type and inherited from the containing class, set our
5204         owner to the outer class.
5205
5206 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
5207
5208         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
5209
5210         * reflection.c (mono_method_body_get_object): New function to create
5211         a MethodBody object.
5212
5213         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
5214
5215 2004-10-11  Martin Baulig  <martin@ximian.com>
5216
5217         * metadata.c (_mono_metadata_type_equal): Renamed to
5218         do_mono_metadata_type_equal() and made static.
5219
5220 2004-10-11  Martin Baulig  <martin@ximian.com>
5221
5222         * appdomain.c: Bump corlib version number to 28.
5223
5224 2004-10-10  Martin Baulig  <martin@ximian.com>
5225
5226         * class-internals.h
5227         (MonoGenericInst): Added `MonoGenericContainer *container'.
5228         (MonoGenericMethod): Likewise.
5229         (MonoGenericContext): Likewise.
5230         (MonoGenericParam): Added `MonoGenericContainer *owner'.
5231
5232         * metadata.c
5233         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
5234         (do_mono_metadata_parse_generic_inst): Likewise.
5235         (mono_metadata_parse_type_full): New public method.  This is the actual
5236         mono_metadata_parse_type() implementation - with an additional
5237         `MonoGenericContainer *' argument.
5238         (mono_metadata_parse_array_full): Likewise.
5239         (mono_metadata_parse_signature_full): Likewise.
5240         (mono_metadata_parse_method_signature_full): Likewise.
5241         (mono_metadata_parse_mh_full): Likewise.
5242         (mono_type_create_from_typespec): Likewise.
5243         (mono_metadata_interfaces_from_typedef_full): New public method;
5244         this is similar to the other _full() methods, but we take a
5245         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
5246         (mono_metadata_parse_generic_param): Take an additional
5247         `MonoGenericContainer *' argument and lookup the MonoGenericParam
5248         from that container.
5249         (mono_metadata_generic_param_equal): New static method to compare
5250         two type parameters.
5251         (_mono_metadata_type_equal): New static method; takes an
5252         additional `gboolean signature_only' argument - if true, we don't
5253         compare the owners of generic parameters.
5254         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
5255         with a TRUE argument - do a signature-only comparision.
5256
5257         * loader.c: Use the new _full() methods and pass the
5258         MonoGenericContainer to them.
5259
5260         * object-internals.h (MonoReflectionTypeBuilder): Added
5261         `MonoGenericContainer *generic_container' field.
5262         (MonoReflectionMethodBuilder): Likewise.
5263
5264 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
5265
5266         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
5267         case initial images of dynamic assemblies.
5268
5269         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
5270
5271         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
5272
5273         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
5274         length of event->other array.
5275         (typebuilder_setup_events): Ditto.
5276
5277         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
5278         'assembly_by_name' and add an 'assemblies' list.
5279
5280         * assembly.h assembly.c: Add a new search hook for determining whenever
5281         an assembly is already loaded. Use this instead of searching in the
5282         loaded_assemblies list.
5283
5284         * domain.c appdomain.c: Implement the new search hook so loaded 
5285         assemblies are now scoped by appdomain. Fixes #67727.
5286
5287 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
5288
5289         * threads.c (mono_thread_attach): Initialize synch_lock field so
5290         mono_thread_detach works again.
5291
5292         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
5293         'lib' too. Fixes #63130.
5294
5295 2004-10-06  Jackson Harper  <jackson@ximian.com>
5296
5297         * culture-info-tables.h: regenerated.
5298
5299 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
5300
5301         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
5302         implemented by other interfaces in the result. Fixes #65764.
5303         
5304         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
5305         Handle unloadable modules without crashing.
5306
5307         * image.c (load_modules): Revert the previous patch since modules must
5308         have a fixed index inside the array.
5309         
5310         * image.c (load_modules): Don't include native modules in the modules
5311         array.
5312
5313 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
5314
5315         * reflection.h: Add param_defaults field.
5316
5317         * reflection.c: Add support for parameter defaults in dynamic methods.
5318         Fixes #64595.
5319
5320         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
5321         an empty string when a type has no namespace. Fixes #64230.
5322
5323 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
5324
5325         * tabledefs.h: Added "internal" security actions to support non-CAS
5326         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
5327         Note: they do not seems to be used anymore in 2.0 (new metadata format)
5328
5329 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
5330
5331         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
5332         constructor of abstract class. Fixes #61689.
5333
5334 2004-10-04  Martin Baulig  <martin@ximian.com>
5335
5336         * class-internals.h (MonoGenericContainer): New type.
5337         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
5338         `MonoGenericContainer *generic_container'.
5339         (MonoClass): Replaced `gen_params' and `num_gen_params' with
5340         `MonoGenericContainer *generic_container'.
5341
5342         * metadata.c (mono_metadata_load_generic_params): Return a
5343         `MonoGenericContainer *' instead of a `MonoGenericParam *';
5344         removed the `num' argument.
5345
5346 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
5347
5348         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
5349         for dynamic images.
5350
5351         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
5352         machine fields.
5353
5354         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
5355
5356         * reflection.c: Save pe_kind and machine values into the generated
5357         image file.
5358
5359         * appdomain.c: Bump corlib version number.
5360
5361         * object-internals.h: Reorganize layout of LocalBuilder.
5362
5363         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
5364         New helper function.
5365
5366         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
5367         created MonoType for dynamic types. Fixes #66180.
5368
5369 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
5370
5371         * threadpool.c: the ares hashtable needs a critical section around it.
5372         this prevents some nasty segfaults
5373
5374 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
5375
5376         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
5377         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
5378         bug 67324).
5379         
5380 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
5381
5382         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
5383         
5384 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
5385
5386         * image.c: Always canonicalize image file names, to avoid loading
5387         the same assembly twice when referenced using a relative path.
5388
5389 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
5390
5391         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
5392
5393         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
5394
5395         * marshal.c: Fix warnings.
5396
5397 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
5398
5399         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
5400         attempting to marshal the delegate_trampoline as the method_addr.
5401         This patch has a static hashtable of marshalled delegates so that 
5402         we can map delegate_trampoline addresses back to delegates.  This
5403         allows a delegate passed to managed code to be passed back into native
5404         code.  Fixes #67039
5405
5406 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
5407
5408         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
5409
5410         * reflection.c (method_encode_code): Align method headers properly.
5411         Fixes #66025.
5412
5413 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
5414
5415         * marshal.c: In the runtime invoke wrapper, reset the abort
5416         exception if it is cached. This avoids the automatic rethrowal of 
5417         the exception after the catch of the wrapper. Also check for pending
5418         interruptions before calling the managed method. This is done using
5419         the new method emit_thread_force_interrupt_checkpoint, since the
5420         normal checkpoint method is ignored when running the invoke wrapper.
5421         * object.c: If the abort exception is rethrown, set the abort_exc
5422         field of the thread, so it will be rethrown aftere every catch.
5423         * threadpool.c: Only run an interruption checkpoint if what has been
5424         requested is a stop of the thread (aborts will be ignored).
5425         * threads.c: By default, a thread will now never be interrumped while
5426         running the runtime invoke wrapper (this ensures that runtime_invoke
5427         will always return to the caller if an exception pointer is provided).
5428         There is a new special method mono_thread_force_interruption_checkpoint()
5429         to force an interruption checkpoint even if running a protected
5430         wrapper, which is used by the same runtime invoke wrapper to do a check
5431         at a safe point.
5432
5433 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
5434
5435         * object.c, object-internals.h: Implemented mono_release_type_locks,
5436         which releases the cctor locks held by a thread.
5437         * threads.c, threads.h: In thread_cleanup, release cctor locks held
5438         by a thread. Added mono_thread_exit() method to be used to safely stop
5439         a thread.
5440
5441 2004-09-28  Raja R Harinath  <rharinath@novell.com>
5442
5443         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
5444         Move null check before dereference.  Avoid indexing beyond the end
5445         of the 'modules' array.
5446
5447 2004-09-28  Raja R Harinath  <rharinath@novell.com>
5448
5449         * metadata-internals.h (MonoImage): Add module_count field.
5450         * image.c (load_modules): Set image->module_count.
5451         (mono_image_load_file_for_image): Use image->module_count.
5452         * reflection.c (mono_image_load_module): Append to image->modules array 
5453         of dynamic assembly.
5454         (mono_module_get_object): Fix loop to actually increment index.
5455         Use image->module_count.
5456         * assembly.c (mono_assembly_load_references): Use image->module_count.
5457         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
5458         Likewise.
5459
5460 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
5461
5462         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
5463         Avoid assert on generic types.
5464
5465 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
5466
5467         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
5468
5469         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
5470
5471         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
5472         function to convert a MarshalSpec structure to its managed counterpart.
5473
5474         * reflection.c: Fix warnings.
5475         
5476         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
5477         field.
5478
5479         * icall.c (mono_create_icall_signature): Fix build.
5480
5481 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
5482
5483         * icall.c: Add MakePointType icall.
5484
5485         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
5486         warnings.
5487
5488 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5489
5490         * threadpool.c: reuse allocated slots in the queue.
5491
5492 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
5493
5494         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
5495
5496         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
5497
5498         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
5499         previous change.
5500
5501         * tabledefs.h: Add constants for pinvoke attributes BestFit and
5502         ThrowOnUnmappableChar.
5503
5504         * icall.c (ves_icall_Type_GetPacking): New icall.
5505
5506 2004-09-24  Martin Baulig  <martin@ximian.com>
5507
5508         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
5509
5510 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5511
5512         * appdomain.c:
5513         (mono_domain_set): allow setting a domain that is being unloaded.
5514         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
5515         being unloaded.
5516
5517 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
5518
5519         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
5520         the GetCustomAttributes icall.
5521
5522 2004-09-23  Martin Baulig  <martin@ximian.com>
5523
5524         * object-internals.h (MonoReflectionGenericParam): Replaced
5525         'has_ctor_constraint', `has_reference_type' and `has_value_type'
5526         with `guint32 attrs'.
5527
5528 2004-09-23  Martin Baulig  <martin@ximian.com>
5529
5530         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
5531
5532 2004-09-23  Martin Baulig  <martin@ximian.com>
5533
5534         * object-internals.h (GenericParameterAttributes): New enum.
5535
5536 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
5537
5538         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
5539         
5540         * class.c (init_events): Fill out event->other field.
5541
5542         * class.c: Fix warnings.
5543
5544         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
5545
5546 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
5547
5548         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
5549         walk which doesn't supply the IL offset.
5550
5551 2004-09-22  Martin Baulig  <martin@ximian.com>
5552
5553         * reflection.c (mono_reflection_setup_internal_class): If we're
5554         System.ValueType, System.Object or System.Enum, set
5555         `klass->instance_size' and create the vtable.
5556         (mono_reflection_create_internal_class): If we're an enum type,
5557         get the base class from our current corlib.
5558
5559 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
5560
5561         * reflection.h (MonoResolveTokenError): New type.
5562
5563         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
5564         icall.
5565
5566         * icall.c: Add an 'error' argument to the ResolveToken icalls.
5567
5568 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
5569
5570         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
5571         Support also calling constructors, but only for already allocated objects.
5572
5573 2004-09-17  Geoff Norton <gnorton@customerdna.com>
5574
5575         * reflection.c (type_get_qualified_name): If the klass is null
5576         return the typename to avoid a NullRefEx.
5577         (encode_cattr_value): Get the qualified name of the boxed type,
5578         not the underlying enumtype.  Fixes #62984.
5579
5580 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
5581
5582         * marshal.c: Fix problems with previous checkin.
5583
5584 2004-09-21    <vargaz@freemail.hu>
5585
5586         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
5587         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
5588
5589         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
5590
5591 2004-09-21  Geoff Norton <gnorton@customerdna.com>
5592
5593         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
5594         should only return a type for pointers, arrays, and passbyref types.
5595         Fixes bug #63841.
5596
5597 2004-09-21  Martin Baulig  <martin@ximian.com>
5598
5599         * domain.c (mono_debugger_check_runtime_version): New public
5600         function.
5601
5602         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
5603
5604 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
5605
5606         * reflection.c: Added missing sort to the declarative security 
5607         attributes table. MS implementation stops seeing the attributes if the
5608         token number regress in the table (as shown by ildasm and permview).
5609
5610 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
5611
5612         * object-internals.h (MonoReflectionModule): Add 'token' field.
5613         
5614         * reflection.c (mono_reflection_get_token): Add support for Module
5615         and Assembly.
5616         (mono_module_get_object): Set 'token' field.
5617         (mono_module_file_get_object): Set 'token' field.
5618
5619         * icall.c: Add new Assembly and Module icalls.
5620
5621         * appdomain.c: Bump corlib version.
5622
5623 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
5624
5625         * loader.h loader.c class.h class.c: Add helper functions for obtaining
5626         tokens of metadata objects.
5627
5628         * reflection.h reflection.c (mono_reflection_get_token): New function
5629         to obtain the token of a metadata object.
5630
5631         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
5632
5633 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
5634
5635         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
5636         
5637         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
5638
5639 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
5640
5641         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
5642         * object-internals.h: Added 3 MonoArray* members to MonoReflection
5643         AssemblyBuilder to access the permissions set in the class lib.
5644         * reflection.c: Added security attributes encoding step in 
5645         mono_image_build_metadata.
5646         * tabledefs.h: Added new security actions defined in 2.0:
5647         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
5648
5649 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
5650
5651         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
5652         macro parameter.
5653
5654 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
5655  
5656         * locales.c: nullify the ICU_collator member of CompareInfo when it is
5657           finalized. There where random SIGSEVs at program termination, when
5658           an object being finalized was trying to do a string comparison and
5659           the current culture was already finalized.
5660  
5661 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5662
5663         * threads.c: call thread_cleanup before finishing the thread if we get
5664         there.
5665
5666 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
5667
5668         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
5669         assemblies from the parent. Fixes #65665.
5670
5671 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
5672
5673         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
5674         modifiers.
5675
5676 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
5677
5678         * reflection.h: add prototype for mono_get_dbnull_object
5679         * reflection.c: add prototypes for get_default_param_value_blobs 
5680         and mono_get_object_from_blob for fussier compilers
5681
5682 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
5683  
5684         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
5685         false deadlock checks in class initialization.
5686  
5687 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
5688
5689         * image.c (mono_image_addref): Fix comment.
5690
5691         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
5692         possible.
5693
5694 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
5695
5696         * reflection.c (mono_param_get_objects): Modified to return
5697         ParameterInfo.DefaultValue object.
5698
5699         (get_default_param_value_blobs):
5700         (mono_get_object_from_blob):
5701         (mono_get_dbnull_object): New helper routines. 
5702
5703         * object.c (mono_get_constant_value_from_blob): New helper routine
5704         carved out from get_default_field_value ()
5705
5706         * object-internals.h (mono_get_constant_value_from_blob): Added
5707         function declaration.
5708
5709 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
5710
5711         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
5712         referenced assemblies. Fixes #62135.
5713
5714         * exception.h exception.c (mono_get_exception_file_not_found2): New
5715         helper function.
5716
5717 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
5718
5719         * class.h class.c: Add mono_type_get_underlying_type ().
5720
5721 2004-09-09  Geoff Norton <gnorton@customerndna.com>
5722
5723         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
5724         Fix GetTypes() to support dynamically created assemblies.
5725
5726 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
5727
5728         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
5729         
5730         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
5731         previous patch.
5732
5733         * reflection.h reflection.c loader.c: Allow dynamic construction of
5734         pinvoke methods. Fixes #65571.
5735         
5736         * reflection.c (mono_reflection_get_type): Revert previous change since
5737         it causes regressions.
5738
5739 2004-09-08  Martin Baulig  <martin@ximian.com>
5740
5741         * class.c (class_compute_field_layout): Don't call
5742         mono_class_layout_fields() for open generic instances.
5743
5744 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
5745         * threads.c appdomain.c: fix typo in GC macro
5746
5747 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5748
5749         * threads.c: don't call mono_thread_detach() in start_wrapper(),
5750         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
5751
5752 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
5753
5754         * image.c (mono_image_close): Applied patch from 
5755         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
5756         assembly is loaded multiple times from data.
5757         
5758         * image.c (mono_image_open): Fix warning.
5759
5760 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
5761
5762         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
5763         once. Fixes #58334.
5764         
5765         * reflection.c (mono_reflection_create_runtime_class): Initialize
5766         klass->nested_classes. Fixes #61224.
5767
5768 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
5769
5770         * threads.c: sched_yield() on exit, to allow threads to quit.
5771
5772 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
5773
5774         * object.c (mono_unhandled_exception): Remove leftover debug code.
5775
5776 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
5777
5778         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
5779
5780 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
5781
5782         * marshal.c (emit_marshal_array): Really null terminate string arrays.
5783         
5784         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
5785
5786 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
5787
5788         * marshal.c (emit_marshal_array): Null terminate string arrays.
5789         
5790         * marshal.c (raise_auto_layout_exception): Fix warning.
5791
5792         * reflection.c (mono_param_get_objects): Initialize the default value
5793         with DBNull.Value, not null. Fixes #62123.
5794
5795 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
5796
5797         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
5798         throw an exception with a cute explanation.
5799
5800 2004-09-06  Dick Porter  <dick@ximian.com>
5801
5802         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
5803         Close the new process's thread handle, as we don't use it.  The
5804         handle stays around forever otherwise.
5805
5806 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
5807
5808         * object.c (arith_overflow): Fix warning.
5809
5810         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
5811         calling conventions in method refs. Fixes #65352.
5812
5813         * reflection.c: Fix warnings.
5814
5815 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
5816
5817         * icall.c: Add a new icall for Array.Clear
5818
5819 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
5820
5821         * object.c: When allocating an array, we have to throw
5822         an overflow exception if any of the lengths are < 0.
5823
5824 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
5825
5826         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
5827         properly. Also move implementation of string array marshalling to 
5828         managed code. Fixes #42316.
5829
5830 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5831
5832         * assembly.c: provide more information when loading an assembly fails.
5833
5834 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5835
5836         * filewatcher.c: don't expect the development fam package to be
5837         installed.
5838
5839 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
5840
5841         * marshal.c: Make a copy of the signature cookie since it will be
5842         freed by the caller.
5843         
5844         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
5845
5846         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
5847
5848         * metadata.c (mono_metadata_free_marshal_spec): New function to free
5849         marshal specs.
5850
5851         * marshal.c: More refactoring.
5852         
5853         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
5854         smaller functions.
5855
5856 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
5857
5858         * object.c: In mono_message_invoke, fill the output parameter array after
5859           calling the managed method (it was done before the call). This fixes
5860           bug #59299.
5861
5862 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
5863
5864         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
5865         as well.
5866
5867 2004-09-02  Martin Baulig  <martin@ximian.com>
5868
5869         * class.c (mono_class_instance_size): Don't allow generic type
5870         definitions or open generic instances.
5871         (mono_class_array_element_size): If we're a value type, call
5872         mono_class_instance_size() on the original class.
5873
5874         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
5875         handle generic instances.
5876
5877         * mono-debug-debugger.c (write_type): Handle generic instances
5878         like classes.
5879
5880 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
5881
5882         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
5883         the allocation request fails. Fixes #65089.
5884
5885         * object.c (mono_runtime_free_method): Do not call mono_free_method.
5886         
5887         * object.c (mono_runtime_free_method): New function to free a dynamic
5888         method.
5889
5890         * marshal.c (mono_delegate_free_ftnptr): New function to free the
5891         delegate trampoline.
5892
5893         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
5894         with hasthis as dynamic,
5895
5896         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
5897
5898         * domain.c (mono_jit_info_table_remove): New function to remove an
5899         entry from the jit info table.
5900
5901         * class-internals.h (MonoMethod): Add 'dynamic' field.
5902
5903         * loader.c: Fix warnings.
5904
5905 2004-09-01  Martin Baulig  <martin@ximian.com>
5906
5907         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
5908         instead of mono_debugger_lock() because the latter one is a no-op
5909         unless running in the debugger.
5910
5911 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
5912
5913         * class.c (class_compute_field_layout): Classes with auto-layout or
5914         reference fields are not blittable.
5915         
5916 2004-09-01  Dick Porter  <dick@ximian.com>
5917
5918         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
5919         mono_image_get_filename() to get the assembly location.
5920
5921         * icall.c:
5922         * metadata.h: Fix compile warnings
5923
5924 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
5925
5926         * class.c (class_compute_field_layout): System.Object is blittable.
5927
5928         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
5929         as in/out. Fixes #59909.
5930
5931 2004-09-01  Martin Baulig  <martin@ximian.com>
5932
5933         * metadata.h (MONO_TYPE_ISREFERENCE): Call
5934         mono_metadata_generic_inst_is_valuetype() if we're a generic
5935         instance to check whether our underlying type is a reference type.
5936
5937 2004-09-01  Martin Baulig  <martin@ximian.com>
5938
5939         * metadata.c (mono_type_size): If we're a generic instance, call
5940         mono_class_value_size() for value types.
5941
5942 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
5943
5944         * marshal.c: Implement more custom marshalling functionality. Fixes
5945         #64915.
5946
5947 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5948
5949         * mono-debug.c, debug-mono-symfile.c: add some locking love.
5950
5951 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
5952
5953         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
5954
5955         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
5956
5957         * icall.c: Fix some warnings.
5958
5959         * threads.c (abort_appdomain_thread): Fix unref errors.
5960         (mono_thread_current): Fix THREAD_DEBUG define.
5961
5962 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
5963
5964         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
5965
5966         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
5967
5968 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
5969
5970         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
5971         string arrays.
5972
5973 2004-08-28  Martin Baulig  <martin@ximian.com>
5974
5975         * metadata.c
5976         (mono_metadata_generic_inst_is_valuetype): New public function.
5977
5978         * metadata.h (MONO_TYPE_ISSTRUCT): Call
5979         mono_metadata_generic_inst_is_valuetype() if we're a generic
5980         instance to check whether our underlying type is a valuetype.
5981
5982 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
5983
5984         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
5985         #63768.
5986
5987 2004-08-25  Martin Baulig  <martin@ximian.com>
5988
5989         * loader.c (mono_get_method_from_token): Abstract methods can also
5990         be generic and thus have type parameters.
5991
5992         * metadata-internals.h
5993         (MonoDynamicImage): Added `GPtrArray *gen_params'.
5994
5995         * reflection.c (mono_image_get_generic_param_info): Don't create a
5996         metadata row, just add an entry to the `gen_params' array.
5997         (build_compressed_metadata): Sort the `gen_params' array and then
5998         actually create the metadata.
5999
6000 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6001
6002         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
6003
6004 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
6005
6006         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
6007
6008 2004-08-24  Martin Baulig  <martin@ximian.com>
6009
6010         * class.cs (mono_class_is_subclass_of): Like an interface, a
6011         generic instance also derives from System.Object.
6012
6013 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
6014
6015         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
6016         custom modifiers to be in any order. Fixes #61990.
6017
6018 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
6019
6020         * object.c: Register mono_object_new_fast icall.
6021         
6022         * object.c (mono_class_get_allocation_ftn): Return to calling
6023         mono_object_new_fast, since it seems faster to compute the object 
6024         size in unmanaged code than passing it as a parameter.
6025
6026         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
6027
6028         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
6029         this function with Boehm as the oom handler, so we don't have to check
6030         the result of GC_malloc.
6031
6032         * object.c: Remove checks for oom.
6033
6034         * object.h object.c (mono_class_get_allocation_ftn): New function to
6035         return the icall which can be used to allocate an instance of a given
6036         class. 
6037
6038         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
6039
6040         * class-internals.h: Add 'enabled' field.
6041
6042 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
6043
6044         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
6045
6046 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
6047         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
6048         value 0x0010.
6049
6050 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
6051
6052         * appdomain.c: use the Tls function for appdomain too,
6053         at Zoltan's request. Actually return in mono_context_get
6054
6055         * appdomain.c, profiler.c, threads.c: use __thread
6056
6057 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
6058
6059         * appdomain.c threads.c: Call GC_CreateThread on windows.
6060
6061         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
6062         multiple libraries since this don't work on windows.
6063
6064 2004-08-18  Martin Baulig  <martin@ximian.com>
6065
6066         * class-internals.h
6067         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
6068         MonoMethodHeader.
6069
6070         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
6071         MonoMethodNormal since we also need it for abstract and interface
6072         methods.
6073
6074         * reflection.c
6075         (build_compressed_metadata): Sort the GenericParam table.
6076         (mono_image_create_token): Added `gboolean create_methodspec'
6077         argument; this is false when generating a MethodImpl token.
6078         (reflection_methodbuilder_to_mono_method): Abstract and interface
6079         methods may also have generic parameters.
6080
6081 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
6082
6083         * appdomain.c: thread local alloc
6084
6085 2004-08-17  Martin Baulig  <martin@ximian.com>
6086
6087         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
6088
6089         * icall.c
6090         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
6091         argument.
6092
6093         * class.c (mono_type_get_full_name): New public function.
6094         (mono_type_get_name): Don't include the type arguments.
6095
6096 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
6097
6098         * Makefile.am: Build static versions of libmetadata and libmonoruntime
6099         for inclusion into the mono executable.
6100
6101 2004-08-16  Martin Baulig  <martin@ximian.com>
6102
6103         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
6104         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
6105
6106 2004-08-14  Martin Baulig  <martin@ximian.com>
6107
6108         * class.c (dup_type): Also copy the `byref' field.
6109
6110 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
6111
6112         * reflection.c (create_dynamic_mono_image): Revert the last change 
6113         since it breaks bootstrap.
6114
6115 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
6116
6117         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
6118
6119         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
6120         not free them with g_free.
6121
6122 2004-08-11  Martin Baulig  <martin@ximian.com>
6123
6124         * reflection.c (mono_reflection_setup_internal_class): Also call
6125         mono_class_setup_mono_type() if we already have a `tb->type.type'.
6126
6127 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
6128
6129         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
6130         called during default (first) AppDomain creation. Keep track of
6131         Evidence when loading assemblies.
6132
6133 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
6134
6135         * opcodes.c, opcodes.h: reduce runtime relocations.
6136
6137 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
6138
6139         * culture-info.h, locales.c: fixes and chages to sue the new
6140         optimized format of the locale data.
6141         * culture-info-tables.h: regenerated.
6142
6143 2004-08-06  Geoff Norton <gnorton@customerdna.com>
6144         
6145         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
6146
6147 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
6148
6149         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
6150         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
6151         * domain-internals.h: icall declaration.
6152         * icall.c: icall registration.
6153         * object-internals.h: New fields in MonoAssembly for CAS.
6154
6155 2004-08-05  Duncan Mak  <duncan@ximian.com>
6156
6157         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
6158         CEE_LDELEM_ANY.
6159
6160 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
6161
6162         * reflection.c: fix to deal with object[] arrays in custom ctors
6163         (bug #62550).
6164
6165 2004-08-05  Martin Baulig  <martin@ximian.com>
6166
6167         * class.c (mono_class_array_element_size): Added support for
6168         generic instances and correctly handle "recursive" types.
6169
6170 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
6171
6172         * assembly.c: Fix warnings.
6173
6174 2004-08-04  Martin Baulig  <martin@ximian.com>
6175
6176         * class.c
6177         (mono_type_get_name_recurse): Added `gboolean include_arity'
6178         argument specifying whether or not we should include the generic
6179         arity in the type name.
6180         (_mono_type_get_name): New static function.
6181         (mono_class_setup_vtable): If we're a generic instance, don't
6182         include the generic arity in the names of explicit method
6183         implementations.        
6184
6185 2004-08-03  Martin Baulig  <martin@ximian.com>
6186
6187         * class.c (mono_type_get_name_recurse): Enclose the generic type
6188         arguments in `<', '>'.
6189
6190 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6191
6192         * gc.c: make GC warning messages use the trace API, they are just
6193         noise to most of the users.
6194
6195 2004-08-03  Martin Baulig  <martin@ximian.com>
6196
6197         * debug-mono-symfile.c (read_string): Correctly read the string.
6198
6199 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
6200
6201         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
6202         
6203         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
6204         icalls.
6205         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
6206
6207 2004-07-30  Martin Baulig  <martin@ximian.com>
6208
6209         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
6210         Reflect latest symbol writer changes.   
6211
6212 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6213
6214         * object.c: always create an object if null is passed
6215         to Invoke() where a valuetype is expected.
6216
6217 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
6218
6219         * marshal.c (mono_marshal_init): make managed
6220         signatures match native ones better for 64bits.
6221
6222 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6223
6224         * appdomain.c: hack to build correctly the private bin path on windows.
6225         Fixes bug #61991.
6226
6227 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
6228
6229         * assembly.c: Load mscorlib from the correct framework directory
6230           (mono/<version>/mscorlib.dll).
6231         * appdomain.h: Added prototypes for new functions.
6232         * internals.h: Added some prototypes.
6233         * domain.c: When initializing the runtime, get from the executable and
6234           the configuration files the runtime version that the app supports.
6235           Added support methods for reading app.exe.config. Added list of versions
6236           supported by the JIT. Added two new methods: mono_init_from_assembly,
6237           which initializes the runtime and determines the required version from
6238           the provided exe file, and mono_init_version, which initializes
6239           the runtime using the provided version.
6240         * icall.c: Get machine.config from version-specific directory.
6241         * reflection.c: When generating an image, embed the version number
6242           of the current runtime.
6243
6244 2004-07-28  Dick Porter  <dick@ximian.com>
6245
6246         * socket-io.c
6247         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
6248         returned sockaddr size before creating the remote address object.
6249         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
6250         61608.
6251
6252 2004-07-28  Dick Porter  <dick@ximian.com>
6253
6254         * locales.c (string_invariant_compare_char): Fix invariant char
6255         compares between upper and lower cases.  Fixes bug 61458.
6256
6257 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
6258         
6259         * marshal.c: actually cache stelem.ref wrappers.
6260         
6261 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
6262
6263         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
6264         sections and remove the mono_cli_rva_map () function.
6265
6266 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
6267
6268         * debug-mono-symfile.c: fix one more endianess issue, from a patch
6269         by Geoff Norton (<gnorton@customerdna.com>).
6270
6271 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
6272
6273         * class.c: fix class loads for pointer types (typeof(int) !=
6274         typeof(int*)).
6275
6276 2004-07-27  Martin Baulig  <martin@ximian.com>
6277
6278         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
6279         reading the debugging information from an external ".mdb" file.
6280
6281 2004-07-24  Martin Baulig  <martin@ximian.com>
6282
6283         * reflection.c (mono_image_get_type_info): Only write a class
6284         layout entry if we actually have a size or a packing size.
6285
6286 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
6287
6288         * reflection.c (type_get_fully_qualified_name): 
6289         insert cast to get type checking of ?: with non-gcc compilers
6290
6291 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
6292
6293         * rand.c: use g_getenv for both lookups of
6294         MONO_EGD_SOCKET
6295
6296 2004-07-17  Martin Baulig  <martin@ximian.com>
6297
6298         * reflection.c (mono_reflection_bind_generic_method_parameters):
6299         Set `gmethod->reflection_info'.
6300
6301 2004-07-17  Martin Baulig  <martin@ximian.com>
6302
6303         * class.c (mono_class_create_from_typedef): Insert the newly
6304         created class into the hash table before computing the interfaces
6305         since we could be called recursively.
6306
6307 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
6308
6309         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
6310         function to implement stelem.ref in managed code
6311         * class-internals.h, debug-helpers.c: a new wrapper type
6312         for the above.
6313
6314 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
6315
6316         * gc.c: allow GC handles to work even when no GC is compiled in.
6317         Fix part of bug #61134 (GetAddrOfPinnedObject).
6318
6319 2004-07-13  Peter Williams  <peter@newton.cx>
6320  
6321         * process.c (complete_path): Make sure we don't attempt to execute
6322         directories.
6323  
6324 2004-07-12  Geoff Norton <gnorton@customerdna.com>
6325
6326         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
6327           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
6328           and will add/subtract the hour if needed
6329
6330 2004-07-12  Martin Baulig  <martin@ximian.com>
6331
6332         * reflection.c (mono_field_get_object): If we have
6333         `field->generic_info', take the attributes from
6334         `field->generic_info->generic_type'.    
6335
6336 2004-07-12  Martin Baulig  <martin@ximian.com>
6337
6338         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
6339         This function must be called before initializing the runtime.
6340         (mono_debug_init_1): New function; call this after initializing
6341         the runtime, but before loading the assembly.  It tells the
6342         debugger to load corlib and the builtin types.
6343
6344         * mono-debug-debugger.c: Did some larger changes in the debugging
6345         code; support recursive class declarations, make sure we actually
6346         add all classes.
6347
6348 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6349
6350         * debug-helpers.c: undo my previous patch and fixed the real issue in
6351         ../mini/exceptions-x86.c
6352
6353 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6354
6355         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
6356         when no HOME env. variable was set and a NullRef was thrown in a .cctor
6357         called from other .cctors.
6358
6359 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
6360
6361         * loader.c: Removed the mono_loader_wine_init hack now that we are
6362         doing a managed version of Windows.Forms.
6363
6364 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
6365
6366         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
6367         threadpool.c, threads.c: remove static data from rootset.
6368
6369 2004-07-09  Dick Porter  <dick@ximian.com>
6370
6371         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
6372         Don't do any more processing if the matched length was 0.  It was
6373         increasing the size of the string before.  Fixes bug 61167.
6374
6375 2004-07-09  Dick Porter  <dick@ximian.com>
6376
6377         * socket-io.h:
6378         * socket-io.c
6379         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
6380         Add support for SO_PEERCRED if its available.
6381
6382 2004-07-09  Peter Bartok <pbartok@novell.com>
6383         * loader.c: winelib.exe.so error message is now only displayed if
6384         MONO_DEBUG is set. To help us avoid questions when people are trying
6385         out the new Managed.Windows.Forms.
6386
6387 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
6388
6389         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
6390         for isinst and castclass wrappers.
6391
6392         * class-internals.h icall.c: Move registration and lookup of JIT icalls
6393         to libmetadata from the JIT, so they could be used by the marshalling
6394         code and the interpreter.
6395
6396         * marshal.c: Register marshalling related JIT icalls here instead of
6397         in mini.c. Use CEE_MONO_ICALL instead of the family of 
6398         CEE_MONO_PROC<x> opcodes to call marshalling functions.
6399
6400         * metadata.h: Remove unneeded marshalling conversions.
6401
6402         * opcodes.c: Update for new opcodes.
6403         
6404 2004-07-08  Martin Baulig  <martin@ximian.com>
6405
6406         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
6407         (mono_debug_get_domain_data): Make this function static.
6408
6409 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6410
6411         * gc.c, object.h: add nice GC handle API for embedders.
6412
6413 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
6414
6415         * reflection.c: more changes for the new api
6416
6417         * object.c: When we reflect on a field w/ a constant value, it
6418         will not have a memory location, so we must access metadata. Also,
6419         allow easier reading of strings so that we can read them from
6420         the constant data.
6421
6422         * class.c (mono_class_layout_fields): no need for literal fields here.
6423
6424         * class-internals.h: api changes for const fields
6425
6426         * icall.c (ves_icall_get_enum_info): use new apis for const fields
6427
6428 2004-07-06  Martin Baulig  <martin@ximian.com>
6429
6430         * mono-debug.h: Increment version number to 44.
6431
6432         * mono-debug.c (mono_debug_add_wrapper): The second argument is
6433         now a gpointer, rewrote this whole method.
6434
6435         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
6436         function.  Add information about the wrapper in a new "misc table".
6437
6438         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
6439         for the new misc table.
6440
6441 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
6442
6443         * metadata-internals.h image.c: Add a cache for helper signatures.
6444
6445         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
6446
6447 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
6448
6449         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
6450         delegates from a delegate. Fixes #61033.
6451         
6452         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
6453         marshalling of stringbuilder arrays. Fixes #59900.
6454
6455 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
6456
6457         * icall.c: Add EnumBuilder:setup_enum_type icall.
6458
6459 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
6460
6461         * icall.c: Added a new icall for the property version of
6462         OffsetOfStringData.
6463
6464 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
6465
6466         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
6467         it has a constant size across platforms.
6468
6469         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
6470         stack trace.
6471
6472 2004-06-29  Martin Baulig  <martin@ximian.com>
6473
6474         * mono-debug.c (mono_debug_add_method): Protect the whole function
6475         in mono_debugger_lock(), not just parts of it.
6476
6477 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6478
6479         * reflection.c: make sure padding bytes in heaps are zeroed.
6480
6481 2004-06-24  David Waite  <mass@akuma.org>
6482
6483         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
6484         image.c, loader.c, locales.c, marshal.c, metadata.c,
6485         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
6486         string-icalls.c, threads.c: change to C90-style comments from C99 /
6487         C++ -style
6488
6489 2004-06-24  Dick Porter  <dick@ximian.com>
6490
6491         * threads.c
6492         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
6493         return createdNew.  Fixes bug 60412.
6494
6495         * threads-types.h: 
6496         * icall.c: Add createdNew parameter to CreateMutex icall
6497
6498 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
6499
6500         * reflection.c, object-internals.h: save default value in params.
6501
6502 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6503
6504         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
6505         no need to build a new path combining that with the application base.
6506         Fixes bug #60442.
6507
6508 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
6509
6510         * reflection.c: fixed minor standard compliance issues.
6511
6512 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
6513
6514         * reflection.c: fixed issue with encoding some custom attributes
6515         (arrays in properties and fields, bug #60411).
6516
6517 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6518
6519         * reflection.c: fix start address when copying the public key token.
6520
6521 2004-06-23  Martin Baulig  <martin@ximian.com>
6522
6523         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
6524         the `exc' object in a static object to put it into the GC's root set.
6525
6526 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
6527
6528         * reflection.c: make mono_reflection_setup_internal_class ()
6529         callable a second time to setup a new parent class.
6530
6531 2004-06-23  Dick Porter  <dick@ximian.com>
6532
6533         * threads.c: Check for WAIT_IO_COMPLETION return values.
6534
6535 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
6536
6537         * appdomain.c: Removed the g_free on the public key token. Now copy 
6538         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
6539         * assembly.c: Added public key token string value when loading 
6540         assemblies. Fix bug #60439.
6541         * icall.c: Added missing informations (like public key) in 
6542         GetReferencedAssemblies. Fix #60519.
6543         * image.h: Changed definition for public key token from const char*
6544         public_tok_value to guchar public_key_token [17];
6545         * reflection.c: Updated for changes to public key token.
6546
6547 2004-06-22  Lluis Sanchez Gual
6548
6549         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
6550         for the field in base classes.
6551
6552 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
6553
6554         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
6555         mark headers as not supported, they are installed only for use by the
6556         debugger.
6557
6558 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
6559
6560         * *.c, *.h: avoid namespace pollution in public headers.
6561
6562 2004-06-21  Martin Baulig  <martin@ximian.com>
6563
6564         * exception.c (mono_get_exception_security): It's in
6565         "System.Security", not in "System".
6566
6567         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
6568         the exception classes.
6569
6570 2004-06-21  Martin Baulig  <martin@ximian.com>
6571
6572         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
6573         Protect the exception object from being finalized.
6574
6575 2004-06-21  Martin Baulig  <martin@ximian.com>
6576
6577         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
6578         public function.
6579
6580 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
6581
6582         * reflection.c: Load the assembly in mono_reflection_type_from_name,
6583         if it was not loaded before. Fix parts of #60439.
6584
6585 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
6586
6587         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
6588         code that was broken since Ben's change: wrappers are now
6589         dependent on the method signature only again.
6590
6591 2004-06-21  Martin Baulig  <martin@ximian.com>
6592
6593         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
6594         added interface support.
6595
6596 2004-06-21  Martin Baulig  <martin@ximian.com>
6597
6598         * class.c (mono_vtable_get_static_field_data): New public method.
6599
6600 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
6601
6602         * filewatcher.c : Windows build fix to be compliant with API changes.
6603
6604 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
6605
6606         * class.h, class.c: more accessors.
6607         * metadata.h, metadata.c: prepare for hiding MonoType and
6608         MonoMethodSignature: people should use the accessors from now on
6609         outside of the tree.
6610
6611 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
6612
6613         * *.c, *.h: more API cleanups.
6614
6615 2004-06-18  Jackson Harper  <jackson@ximian.com>
6616
6617         * assembly.c: Trace loading assemblies.
6618         * loader.c: Trace loading native libraries.
6619         * mono-config.c: Trace loading config files.
6620         
6621 2004-06-18  Dick Porter  <dick@ximian.com>
6622
6623         * locales.c: Tell ICU the lengths of strings, it can cope with
6624         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
6625
6626 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
6627
6628         * image.c: swapped name/filename;
6629
6630 2004-06-18  Martin Baulig  <martin@ximian.com>
6631
6632         * mono-debug-debugger.c (write_class): Write the parent class at
6633         the end of the header.
6634
6635 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
6636
6637         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
6638
6639 2004-06-17  Raja R Harinath  <rharinath@novell.com>
6640
6641         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
6642         (bundle_obj): New conditional define.
6643         (BUILT_SOURCES): Remove.
6644         ($(bundle_srcs)): Make parallel-make safe.
6645         (libmonoruntime_la_LIBADD): Make unconditional.
6646         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
6647         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
6648
6649 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
6650
6651         * culture-info-tables.h: It was inconsistent with the latest
6652           supp info files.
6653
6654 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
6655
6656         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
6657         be loaded.
6658
6659         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
6660         with gcc 2.95.
6661
6662 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
6663
6664         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
6665         cleaned up public header threads.h.
6666
6667 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
6668
6669         * Makefile.am, *.c, *.h: more API cleanups.
6670
6671 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
6672
6673         * Makefile.am: removed monosn from compilation.
6674         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
6675         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
6676         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
6677         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
6678         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
6679         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
6680
6681 2004-06-15  Jackson Harper  <jackson@ximian.com>
6682
6683         * assembly.c: Make locales lower case when searching the GAC for
6684         assemblies. gacutil will always make locales lowercase when
6685         installing so this effectively makes them case insensitive.
6686         
6687 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
6688
6689         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
6690         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
6691           parameter which allows to choose whether the wait can be interrupted or 
6692           not. Also added the method mono_monitor_enter(), which locks the monitor
6693           using an infinite wait and without allowing interruption.
6694           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
6695           interrupted.
6696         * object.h: Added new fields in MonoThread. suspend_event holds the event
6697           used to susped/resume the thread. synch_lock is the lock object to use for
6698           modifying the thread state.
6699         * threads.c: Use the new synch_lock object for locking, instead of "this",
6700           which can generate deadlocks.
6701           Moved thread state change in Thread.Sleep and Thread.Join from managed
6702           to unmanaged code. This avoids a deadlock when the thread was suspended
6703           just after acquiring the thread lock.
6704           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
6705           Implemented Thread.Suspend using an event instead of ThreadSuspend,
6706           which is not fully implemented in the io-layer.
6707         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
6708
6709 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
6710
6711         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
6712         threads-types.h: more API cleanups.
6713
6714 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
6715
6716         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
6717         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
6718         threadpool.c, threads.c: first pass at the exported API cleanup.
6719
6720 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
6721
6722         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
6723
6724 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6725
6726         * icall.c: added internalGetHome.
6727
6728 2004-06-14  Dick Porter  <dick@ximian.com>
6729
6730         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
6731         possible to return successfully when '.' or '..' were the only
6732         entries in a directory, but were skipped.  The MonoIOStat was not
6733         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
6734         Fixes bug 59574.
6735
6736 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
6737
6738         * reflection.c: make binaries run on .Net 1.1 by default.
6739
6740 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
6741
6742         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
6743
6744 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
6745
6746         * marshal.c: keep track of struct size with explicit layout
6747         (bug #59979).
6748
6749 2004-06-12  Martin Baulig  <martin@ximian.com>
6750
6751         * mono-debug-debugger.c: Comment out a debugging g_message().
6752
6753 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
6754
6755         * reflection.c, reflection.h: do not free custom attrs that are cached.
6756         * icall.c: use braces to make code clearer.
6757
6758 2004-06-11  Martin Baulig  <martin@ximian.com>
6759
6760         * class.h (MonoInflatedField): New type.
6761         (MonoClassField): Replaced `MonoType *generic_type' with
6762         `MonoInflatedField *generic_info'.
6763
6764         * icall.c
6765         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
6766
6767 2004-06-11  Martin Baulig  <martin@ximian.com>
6768
6769         * reflection.c (mono_image_create_method_token): Correctly encode
6770         varargs methods.
6771
6772 2004-06-11  Martin Baulig  <martin@ximian.com>
6773
6774         * metadata.c (mono_metadata_parse_method_signature): When parsing
6775         a MethodDef which has VarArgs, also set sentinelpos if we don't
6776         have any parameters.
6777
6778 2004-06-11  Martin Baulig  <martin@ximian.com>
6779
6780         * verify.c (mono_method_verify): In CEE_CALL, use
6781         mono_method_get_signature() to get the method's signature, unless
6782         we're a PInvoke method.
6783
6784 2004-06-10  Jackson Harper  <jackson@ximian.com>
6785
6786         * assembly.c: Use <path>/lib/mono/gac for the extra paths
6787         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
6788         logical name as the supplied path is just a prefix to the gac not
6789         the direct path to it.
6790         
6791 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
6792
6793         * reflection.c: make the token for a created method match
6794         the token of the MethodBuilder it was created from
6795         (IKVM requires this behaviour now).
6796
6797 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
6798
6799         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
6800         reflection.c, socket-io.c: leak fixes.
6801
6802 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
6803
6804         * icall.c: handle sentinel pos in vararg methods in position different
6805         from 0.
6806
6807 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6808
6809         * culture-info-tables.h: freshly generated.
6810
6811 2004-06-09  Martin Baulig  <martin@ximian.com>
6812
6813         * loader.c (mono_get_method_constrained): Call `mono_class_init
6814         (constrained_class)'.   
6815
6816 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
6817
6818         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
6819         any methods. Fixes #59629.
6820
6821 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
6822
6823         * culture-info-tables.h: reflecting locale-builder updates.
6824
6825 2004-06-08  Dick Porter  <dick@ximian.com>
6826
6827         * object.h:
6828         * locales.c: Fixed compile warnings, including a real bug in
6829         CompareInfo_internal_compare.
6830         
6831 2004-06-08  Dick Porter  <dick@ximian.com>
6832
6833         * locales.c
6834         (ves_icall_System_Globalization_CompareInfo_internal_index):
6835         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
6836         Double-check the resuls of usearches, because ICU currently
6837         ignores most of the collator settings here.  Fixes bug 59720.
6838         
6839 2004-06-08  Dick Porter  <dick@ximian.com>
6840
6841         * locales.c
6842         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
6843         Fix memory leak and segfault-causing typo.  No idea how this one
6844         lasted so long without being noticed.
6845
6846 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
6847
6848         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
6849         any methods. Fixes #59629.
6850
6851 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6852
6853         * assembly.c:
6854         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
6855         own the critical section before). Removed dead code (that's done
6856         in the preload hook).
6857
6858         (mono_assembly_load_with_partial_name): call the preload hook.
6859
6860 2004-06-08  Martin Baulig  <martin@ximian.com>
6861
6862         * metadata.c (mono_metadata_signature_alloc): Default
6863         `sentinelpos' to -1.
6864
6865         * reflection.c (mono_image_get_array_token): Likewise.
6866
6867 2004-06-08  Martin Baulig  <martin@ximian.com>
6868
6869         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
6870
6871         * metadata.c (mono_metadata_parse_method_signature): When parsing
6872         a MethodDef which has VarArgs, set sentinelpos.
6873
6874         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
6875         `gint16' since we're using -1 for non-varargs methods.
6876
6877         * reflection.c
6878         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
6879         (method_encode_signature): Added varargs support.
6880         (method_builder_encode_signature): Likewise.
6881         (mono_image_get_varargs_method_token): New static method.
6882         (mono_image_create_method_token): New public method; this is
6883         called via an icall instead of mono_image_create_token() when
6884         calling a varargs method.       
6885
6886 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
6887
6888         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
6889
6890 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
6891
6892         * culture-info-tables.h : Reflecting the latest locale-builder that
6893           fixed empty array representation ({} to {0}).
6894
6895 2004-06-07  Jackson Harper  <jackson@ximian.com>
6896
6897         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
6898         looking up extra gac paths. This allows MONO_GAC_PATH to act
6899         exactly like a prefix.
6900         
6901 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
6902
6903         * reflection.c (mono_reflection_type_from_name): Make a copy of the
6904         type name before modifying it. Fixes #59405.
6905
6906 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
6907
6908         * culture-info.h: added fields for "all datetime patterns".
6909         * locales.c: (  ves_icall_System_Globalization_CultureInfo
6910           _construct_datetime_format ()): fill xxx_patterns fields.
6911         * object.h: added fields for "all datetime patterns" to
6912           MonoDateTimeFormatInfo.
6913         * culture-info-tables.h: reflecting locale-builder updates.
6914
6915 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
6916
6917         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
6918         the event has no add and remove methods. Fixes #59629.
6919
6920 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
6921
6922         * object.c: Fixed possible integer overflow when allocating large
6923         strings.
6924
6925 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
6926
6927         * culture-info-tables.h: reflecting locale-builder updates.
6928
6929 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
6930
6931         * culture-info-tables.h: reflecting locale-builder updates.
6932
6933 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
6934
6935         * culture-info-tables.h: reflecting locale-builder updates.
6936
6937 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
6938
6939         * threads.c: Made Thread.Sleep abortable.
6940
6941 2004-06-02  Martin Baulig  <martin@ximian.com>
6942
6943         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
6944
6945         * debug-mono-symfile.h: Bumped symbol file version number to 37.
6946
6947 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
6948
6949         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
6950
6951 2004-05-30  Jackson Harper  <jackson@ximian.com>
6952
6953         * reflection.c: Do not hardcode assembly versions or public key
6954         tokens anymore. All of this except the corlib section was dead
6955         code anyways.
6956         
6957 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
6958
6959         * object.c (mono_runtime_invoke_array): Automatically create boxed
6960         objects for byref valuetypes if needed. Fixes #59300.
6961         
6962         * object.c (mono_method_return_message_restore): Handle 
6963         MONO_TYPE_OBJECT as well.
6964
6965 2004-05-28  Jackson Harper  <jackson@ximian.com>
6966
6967         * reflection.c: The modified type encoding was causing build
6968         problems. Reverted for now.
6969         
6970 2004-05-28  Jackson Harper  <jackson@ximian.com>
6971
6972         * reflection.c/h: Take an assembly ref so that we dont create
6973         fully qualified names when encoding types in the same assembly as
6974         the custom attribute being emitted.
6975         * appdomain.c: Increment version number.
6976         
6977 2004-05-26  Duncan Mak  <duncan@ximian.com>
6978
6979         * icall.c
6980         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6981         Set the full version number (major, minor, build, revision).
6982
6983 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
6984
6985         * marshal.c (emit_struct_conv): increment src/dst after blit
6986         (mono_marshal_get_managed_wrapper,
6987         mono_marshal_get_native_wrapper): make sure we have marshalling
6988         info before marshalling params (info computation affects
6989         blittable)
6990
6991         * class.c (class_compute_field_layout): correctly deal with
6992         blittable
6993         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
6994         value types (as per what windows dows by default)
6995         (mono_class_setup_mono_type): System.ValueType is blittable
6996         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
6997         blittable
6998
6999         * marshal.c (mono_marshal_load_type_info): flag types  as
7000         non-blittable if the native layout doesn't match the managed
7001         layout
7002
7003 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7004
7005         * appdomain.c: don't add stuff in the private search path that is
7006         above the application base. If application base is not set, there's
7007         no private search path.
7008
7009 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
7010
7011         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
7012         byref struct arguments in native->managed marshalling.
7013
7014 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
7015
7016         * marshal.c (mono_marshal_get_runtime_invoke): correctly
7017         cache methods using signature (special case for methods
7018         that are value type or string class)
7019         
7020         * image.c (mono_image_close): clean up allocated GSList's
7021         in runtime_invoke_cache.
7022
7023 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7024
7025         * mono-config.c: set the correct path for mono_cfg_dir on windows when
7026         there's no MONO_CFG_DIR environment variable defined.
7027
7028 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7029
7030         * threads.c: windows version must be >= 0x0500 to include OpenThread.
7031
7032 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
7033
7034         * threadpool.c: Really wait for 500ms after the async call, even if the wait
7035           is interrumped.
7036         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
7037           before waiting for it, and call CloseHandle after the wait to unref it.
7038           This will make sure that handles are not disposed too early.
7039
7040 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7041
7042         * appdomain.c:
7043         * appdomain.h:
7044         * icall.c: removed
7045         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
7046         needed now.
7047
7048         * object.c: se the application_base only for the domain that runs
7049         Main. Fixes bug #59216,
7050
7051 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7052
7053         * appdomain.c:
7054         * object.c: only the domain in which Main is run have
7055         SetupInformation.ConfigurationFile set, so moved a few lines from
7056         appdomain.c to object.c.
7057
7058 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7059
7060         * appdomain.c: we tried to load [name].(dll|exe), but according
7061         to bug #57710, we must also try [culture]/[name].(dll|exe) and
7062         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
7063         There's a test case attached to bug #58922.
7064
7065 2004-05-27  Dick Porter  <dick@ximian.com>
7066
7067         * icall.c:
7068         * file-io.c: Implemented icalls for locking and unlocking regions
7069         in a file.
7070         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
7071         FALSE on error (fixes both compiler warning and real bug.)
7072
7073 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
7074
7075         * culture-info-tables.h: reflecting locale-builder updates.
7076
7077           (Added missing ChangeLog entry for 05/26)
7078
7079 2004-05-27  Jackson Harper  <jackson@ximian.com>
7080
7081         * locales.c: Fix some cut and paste errors.
7082         
7083 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7084
7085         * mono-config.c: set the correct path for config. directory on windows.
7086
7087 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
7088
7089         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
7090           on win32.
7091
7092 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7093
7094         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
7095         from pinvoke functions.
7096         
7097         * marshal.c (mono_ftnptr_to_delegate): Implement this.
7098
7099 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
7100
7101         * culture-info-tables.h: reflecting locale-builder updates.
7102
7103 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7104
7105         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
7106         #59086.
7107
7108 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
7109
7110         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
7111         * icall.c: Modified icalls for RNG.
7112         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
7113         Windows (CryptoAPI).
7114
7115 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
7116
7117         * locales.c: Fix build.
7118
7119 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
7120
7121         * culture-info-tables.h: reflecting locale-builder updates.
7122
7123 2004-05-25  Jackson Harper  <jackson@ximian.com>
7124
7125         * locales.c: When creating the current culture use the $LANGs
7126         specific culture. So DateTimeFormat and NumberFormat entries are created.
7127         
7128 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
7129
7130         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
7131         a char array as parameter.
7132
7133 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
7134
7135         * image.c: In mono_image_open(), always use an absolute path name to
7136           look for already loaded images.
7137
7138 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
7139
7140         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
7141         missing in the windows build (like older cygwin include files).
7142
7143 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
7144
7145         * icall.c: Fixed check for possible integer overflow in Buffer_
7146         BlockCopy icall. Replaced comments style // by /* */.
7147
7148 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
7149
7150         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
7151         
7152         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
7153         check after MONO_VTADDR. Fixes pinvoke2.exe.
7154
7155         * marshal.h marshal.c metadata.h: Add beginnings of support for
7156         ftnptr -> delegate marshalling.
7157
7158 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
7159
7160         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
7161         * threads.c: Fix warnings.
7162
7163 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
7164
7165         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
7166         * icall.c: Registered icalls for Suspend and Resume.
7167         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
7168           Thread.Abort.
7169         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
7170         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
7171         * process.c: Use WaitForSingleObjectEx.
7172         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
7173           checkpoints.
7174         * threads.c, threads.h: Make use of new Ex wait methods. Improved
7175           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
7176           for Suspend and Resume. Added new mono_thread_stop, used for stoping
7177           background threads. Added basic support for Abort in Windows.
7178           Start new threads using a managed delegate invoke wrapper. This wrapper
7179           has an interruption checkpoint that is needed since an interruption
7180           can be requested before the thread leaves the unmanaged code that starts 
7181           the thread.
7182         * marshal.c: Added interruption checkpoint after every native call, and
7183           also before managed calls for wrappers called from unmanaged code to
7184           go into managed code.
7185         * object.h: Added new field in MonoThread to keep track of interruption
7186           requests.
7187
7188 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
7189
7190         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
7191         calls.
7192
7193 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7194
7195         * appdomain.c:
7196         * assembly.c:
7197         * gc.c:
7198         * locales.c:
7199         * mono-config.c:
7200         * rand.c: getenv -> g_getenv (windows!)
7201
7202         * process.c: complete_path is also used on non-windows platforms.
7203
7204 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7205
7206         * icall.c: new signature for Process_Start.
7207
7208         * process.[ch]: new signature for Process_Start. If we're on windows
7209         and UseShellExecute is false, we have to search for the program by
7210         ourselves if we don't get a full path.
7211
7212 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
7213
7214         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
7215         marshalling and call CleanUpNativeData if needed. Fixes #58646.
7216
7217 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7218
7219         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
7220         Fixes bug #58373.
7221
7222 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7223
7224         * process.c: use double quotes to quote program name and arguments on
7225         windows. Fixes bug #58575.
7226
7227 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7228
7229         * file-io.c: don't return "." and ".." when using windows Find*File.
7230
7231 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
7232
7233         * marshal.c: Don't pass wrappers to message init because method 
7234         addressed used to lookup metadata. part of remoting[2|3] fix.
7235
7236 2004-05-15  Jackson Harper  <jackson@ximian.com>
7237
7238         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
7239         path is essentially the same as MONO_PATH except that it points to
7240         GACs instead of lib directories.
7241         * loader.h: The user gac is gone so we dont need function to
7242         enable/disable it.
7243         * mono-config.c: user gac option is now gone.
7244         
7245 2004-05-15  Jackson Harper  <jackson@ximian.com>
7246
7247         * culture-info.h: Make defines more consistent, add calendar data
7248         to the culture info table.
7249         * culture-info-tables.h: Add basic calendar data. Basically
7250         everyone gets default gregorian until all the data is
7251         updated.
7252         * locales.c: Use the new consistent defines. Set calendar data for
7253         culture info objects.
7254         * object.h: add a field for calendar data to CultureInfo
7255         
7256 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
7257
7258         * image.c: image->runtime_invoke_cache is keyed on signatures now.
7259         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
7260         a signature.
7261         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
7262         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
7263         an extra param that is the pointer of the method to invoke. The IL for
7264         the invoke method is no longer specific to the method, but to the
7265         signature of the method. Thus, we can share the same code for multiple
7266         methods. This reduces the number of methods that have to be compiled.
7267
7268 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
7269
7270         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
7271
7272         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7273
7274         * icall.c: Optimize Buffer.BlockCopy.
7275
7276 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7277
7278         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
7279         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
7280         quote). Changed them to "MMMM yyyy".
7281
7282 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
7283
7284         * rand.c
7285         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
7286
7287 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
7288
7289         * reflection.h: Updated after changes to managed structures.
7290
7291         * appdomain.c: Bump corlib version.
7292
7293 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7294
7295         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
7296         windows.
7297
7298 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7299
7300         * Makefile.am: link to ../os/libmonoos.la on windows.
7301
7302         * assembly.c:
7303                 -If MONO_DEBUG, warn about non-existing directories in
7304                 MONO_PATH.
7305                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
7306                 compile time variable.
7307                 -Removed init_default_path and call mono_set_rootdir from
7308                 libmonoos.a instead (windows only).
7309
7310         * assembly.h: declare mono_assembly_getrootdir().
7311
7312         * domain.c:
7313         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
7314
7315         * loader.c: s/getenv/g_getenv/
7316
7317 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
7318
7319         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
7320
7321         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
7322
7323         * metadata.h: Add new marshalling conversions.
7324
7325         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
7326         function.
7327
7328         * reflection.c (mono_reflection_get_type): Lookup the type in all
7329         modules of a multi-module assembly. Fixes #58291.
7330
7331 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
7332
7333         * threads.c: Before aborting a background, set the StopRequested
7334         state.  This avoids throwing the Abort exception.
7335         In mono_thread_manage, don't continue with the shutdown until all
7336         aborted threads have actually stopped.
7337
7338 2004-05-10  Jackson Harper  <jackson@ximian.com>
7339
7340         * locales.c: Remove the modifier from culture names.
7341         
7342 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7343
7344         * Makefile.am: monosn is not installed any more. It has been deprecated
7345         in favor of sn.
7346
7347 2004-05-07  Jackson Harper  <jackson@ximian.com>
7348
7349         * locales.c
7350         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
7351         Fix array construction, add bailout if the length is 0.
7352
7353 2004-05-07  Dick Porter  <dick@ximian.com>
7354
7355         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
7356         machine doesn't have a DNS entry.  Patch by Urs Muff
7357         (umuff@quark.com), fixes bug 57928.
7358
7359 2004-05-06  Jackson Harper  <jackson@ximian.com>
7360
7361         * reflection.c: Handle null PublicTokens properly. alloc mem for
7362         assembly names culture so we dont crash when freeing it.
7363         
7364 2004-05-06  Jackson Harper  <jackson@ximian.com>
7365
7366         * assembly.c: Check the usergac when loading with partial names.
7367         
7368 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
7369
7370         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
7371         does nothing for now (not required for Linux/Windows) but the class
7372         library can call it (and a newer or modified runtime could need it).
7373         * icall.c: Registred icall.
7374
7375 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7376
7377         * loader.c: prints a message on module loading error we set MONO_DEBUG
7378         environment variable.
7379
7380 2004-05-05  Jackson Harper  <jackson@ximian.com>
7381
7382         * appdomain.c: Handle PublicKeyToken=null properly.
7383         
7384 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
7385
7386         * environment.c|h: Added icall ves_icall_System_Environment_
7387         GetOSVersionString to get the current OS version as a string.
7388         * icall.c: Registred icall.
7389
7390 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
7391
7392         * object.c: in mono_object_get_virtual_method(), take into account that
7393         non-virtual methods don't have a slot in the vtable. Check needed when
7394         the object is a proxy.
7395
7396 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
7397
7398         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
7399         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
7400
7401         * object.c (mono_class_compute_gc_descriptor): Fix warning.
7402
7403         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
7404         passed when a valuetype is expected.
7405
7406         * object.c (mono_unhandled_exception): Only set the exit code if the
7407         exception happens in the main thread. Fixes thread5.exe.
7408
7409         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
7410         invalid names. Fixes #58047.
7411
7412 2004-05-03  Jackson Harper  <jackson@ximian.com>
7413
7414         * assembly.c: This line was committed accidently and is unneeded.
7415         
7416 2004-05-03  Jackson Harper  <jackson@ximian.com>
7417
7418         * icall.c: Add new icall for Assembly::LoadWithPartialName
7419         * assembly.c/.h: new function that probes the GAC to load partial
7420         assembly names by Paolo Molaro.
7421         
7422 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7423
7424         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
7425         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
7426         (type_get_fully_qualified_name): Added PublicKeyToken when building a
7427         full type name.
7428
7429 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7430
7431         * appdomain.c: fixed check for 'neutral' culture and removed warning.
7432         * reflection.c: fix bug when parsing a full type name and Version is not
7433         the last thing in the string.
7434
7435 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
7436
7437         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
7438         crashes when it is freed.
7439
7440 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7441
7442         * assembly.c: print the compat warning to stderr.
7443
7444 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
7445
7446         * assembly.c (mono_assembly_load_references): Add a compatibility
7447         hack to run old applications that might be still referencing the
7448         3300-based assemblies, only do this for System.xxx.
7449
7450 2004-05-01  Jackson Harper  <jackson@ximian.com>
7451
7452         * appdomain.c: If the culture is neutral we set it to "".
7453         
7454 2004-04-29  Jackson Harper  <jackson@ximian.com>
7455
7456         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
7457
7458 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
7459  
7460         * string-icalls.c: added low overhead function for copying chars
7461         * icall.c: added needed icall for the above function
7462  
7463 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7464
7465         * icall.c: fix return value of get_global_assembly_cache.  Implemented
7466         Environment.GetLogicalDrives.
7467
7468 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
7469
7470         * rand.c: try and talk to egd or prngd
7471         for random bytes if opening devices fail.
7472
7473 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
7474
7475         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
7476         alignment for the type using the native alignment of its members 
7477         instead of using klass->min_align.
7478
7479         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
7480
7481 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7482
7483         * file-io.c:
7484         * socket-io.c: added check for sys/aio.h.
7485
7486 2004-04-28  Dick Porter  <dick@ximian.com>
7487
7488         * threads.c: Don't abort a thread thats already aborting, when
7489         terminating everything.
7490
7491 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7492
7493         * icall.c: added 2 new async calls for Socket.
7494
7495         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
7496         IO on *nix systems.
7497
7498         * threadpool.c: removed unused variable.
7499
7500 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
7501
7502         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
7503
7504 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7505
7506         * locales.c: put back string_invariant_tolower () and
7507         string_invariant_toupper ().
7508
7509 2004-04-26 David Waite <mass@akuma.org>
7510
7511         * file-io.h:
7512         * socket-io.h:
7513         * threads.h:
7514         * unicode.h: remove comma from end of enumeration declarations
7515
7516 2004-04-26 David Waite <mass@akuma.org>
7517
7518         * debug-mono-symfile.h:
7519         * decimal.c:
7520         * mono_debug.h:
7521         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
7522
7523
7524 2004-04-26  Jackson Harper  <jackson@ximian.com>
7525
7526         * appdomain.c: Increment version number.
7527         
7528 2004-04-26  Jackson Harper  <jackson@ximian.com>
7529
7530         * appdomain.c: Set assembly references public token value when
7531         PublicKeyToken is specified, not the hash_value. Free public token
7532         values when free assembly name data. Previously the public key
7533         token was hex decoded, however we are using hex encoded public key
7534         tokens, so this is not neccasary.
7535         * assembly.c: Lookup assemblies in the gac if their public token
7536         value is set. Add function to allow enabling user gac
7537         lookups. Specify whether or not the assembly was loaded from the
7538         GAC. Compare full assembly names when checking the cache for
7539         assemblies (Temporarily disabled see comment in code). Remove
7540         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
7541         specifies trace-loader they get extra info to stdout on the
7542         loading of assemblies.
7543         * image.h: Add a field for an assembly references public token
7544         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
7545         whether an assembly has been loaded from the GAC.
7546         * image.c: Remove a corlib -> mscorlib name mapping.
7547         * loader.h: Add function to enable/disable the user gac.
7548         * mono-config.c: Check if the usergac is enabled in the config
7549         file.
7550         * icall.c: New icall to determine whether or not an assembly has
7551         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
7552         * tabldefs.h: Add constant for assemblyref flag that specifies a
7553         full public key is used instead of a public token.
7554         * reflection.c: Remove mscorlib -> corlib mappings. Set
7555         PublicTokenValue instead of hash value. This value is a hex
7556         string so it does not need to be expanded.
7557
7558 2004-04-26  Martin Baulig  <martin@ximian.com>
7559
7560         * mono-debug-debugger.c (mono_debugger_initialize): Set
7561         `mono_debugger_initialized' before calling mono_debug_lock().
7562
7563 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
7564
7565         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
7566           InternalToUpper/InternalToLower.
7567         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
7568           removed invariant culture shortcut.  This is now done in managed code.
7569         * locales.c: (string_invariant_toupper/tolower) removed.
7570
7571 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7572
7573         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
7574         Added Poll internal call.
7575
7576         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
7577         call for Poll. Select was too heavy for polling a single socket.
7578
7579         * threadpool.[ch]: added mono_threadpool_cleanup.
7580         * threads.c: use it. Don't use Thread_Abort on windows.
7581
7582 2004-04-23  Martin Baulig  <martin@ximian.com>
7583
7584         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
7585
7586 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
7587
7588         * icall.c: Registred new icalls for key pair protection and added an
7589         icall for Environment.GetFolderPath on Windows.
7590         * security.c|h: Added new icalls for key pair protection.
7591
7592 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7593
7594         * socket-io.c: don't display the non-supported family warning for known
7595         families. Now this is not displayed on windows when checking support
7596         for IPv4/IPv6.
7597
7598 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7599
7600         * class.c: don't display the layout warning for static fields.
7601
7602 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
7603
7604         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
7605         * locales.c, locales.h: Added new icalls for culture-specific
7606         Char.ToLower and Char.ToUpper.
7607
7608 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7609
7610         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
7611         by David Waite.
7612
7613 2004-04-20  Martin Baulig  <martin@ximian.com>
7614
7615         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
7616         of the type name before passing it to mono_reflection_type_from_name().
7617
7618 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
7619
7620         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
7621         encodings here. Fixes #56965.
7622
7623 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
7624
7625         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
7626         fix test on strstr result not that I can see anything that
7627         relies on the result.
7628
7629 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
7630
7631         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
7632         Fixes #57081.
7633
7634         * marshal.c (mono_marshal_get_string_encoding): New helper function.
7635
7636         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
7637         function to determine which marshalling to use for strings. Fixes
7638         #56965.
7639
7640         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
7641
7642         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
7643
7644 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
7645
7646         * icall.c: #include mono-config.h
7647
7648 2004-04-15  Jackson Harper  <jackson@ximian.com>
7649
7650         * culture-info-tables.h: Fix date formats for en-US culture.
7651         
7652 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
7653
7654         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
7655         ThreadPool.SetMinThreads.
7656         * threadpool.c: Implemented ThreadPool.GetMinThreads and
7657         ThreadPool.SetMinThreads.
7658
7659 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
7660
7661         * mono-config.c: also load the .config file in the directory
7662         where the assembly was found.
7663
7664 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
7665
7666         * assembly.c: load per-assembly config files.
7667         * icall.c: decrapified code to get the config dir and moved to
7668         mono-config.c.
7669         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
7670         per-assembly config files. When doing a dll map lookup give precedence
7671         to the per-assembly data.
7672
7673 2004-04-14  Martin Baulig  <martin@ximian.com>
7674
7675         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
7676         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
7677         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
7678
7679         * mono-debugger-debugger.c: While the debugger is locked, remember
7680         whether the symbol tables have changes and send one single
7681         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
7682
7683 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
7684
7685         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
7686
7687         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
7688         function.
7689
7690         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
7691         account when marshalling string arrays. Fixes #56965.
7692
7693 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
7694
7695         * icall.c: Add new icalls mapping for security.
7696         * security.c|h: Add internal calls for WindowsIdentity,
7697         WindowsImpersonationContext and WindowsPrincipal.
7698
7699 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
7700
7701         * class.c: Added comment to ensure the System.MonoDummy class
7702         is removed when no longer necessary
7703
7704 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
7705
7706         * appdomain.c: Pass arguments to the bootstraping exceptions to
7707         minimize JITed methods at boot
7708
7709         * metadata.c (mono_exception_from_name_two_strings): Allow for the
7710         second string to be null.
7711
7712         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
7713         Change the protocol to minimize the JIT methods at startup.  Now
7714         it Returns the internal codepage, if the value of "int_code_page"
7715         is 1 at entry, and we can not compute a suitable code page
7716         number, returns the code page as a string.
7717
7718 2004-04-13  Jackson Harper  <jackson@ximian.com>
7719
7720         * culture-info-tables.h: Fix number of decimal digits for all
7721         english locales.
7722
7723 2004-04-13  Jackson Harper  <jackson@ximian.com>
7724
7725         * icall.c: Clairfy out of sync error message. It is not always
7726         your corlib that is out of sync.
7727
7728 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
7729
7730         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
7731         properties when only the set accessor is overriden. Fixes #55874.
7732
7733 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
7734
7735         * assembly.c (mono_assembly_load_references): Make this thread safe.
7736         Fixes #56327.
7737
7738 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
7739
7740         * monosn.c: Add missing initialization calls.
7741
7742 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
7743
7744         * locales.c:
7745         ves_icall_System_Globalization_CultureInfo_construct_number_format
7746         Fix g_assert so it compiles on fussier compilers re int/ptr
7747         mismatch
7748
7749 2004-04-08  Dick Porter  <dick@ximian.com>
7750
7751         * socket-io.h:
7752         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
7753         53992.  Also rearrange the code so that the internal calls return
7754         an error value and exceptions are thrown from managed code.
7755
7756         * icall.c: Add type info to the socket icalls.
7757
7758 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7759
7760         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
7761         owes me a beer.
7762
7763 2004-04-07  Martin Baulig  <martin@ximian.com>
7764
7765         * class.c (mono_class_from_generic_parameter): Don't default
7766         `klass->parent' to `mono_defaults.object_type'.
7767
7768 2004-04-07  Martin Baulig  <martin@ximian.com>
7769
7770         * reflection.c (mono_reflection_initialize_generic_parameter): Set
7771         `param->pklass->reflection_info'.       
7772
7773 2004-04-07  Jackson Harper  <jackson@ximian.com>
7774
7775         * culture-info-tables.h: Fix date separator symbol.
7776         
7777 2004-04-07  Martin Baulig  <martin@ximian.com>
7778
7779         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
7780         from System.Type to System.MonoType.
7781
7782 2004-04-07  Martin Baulig  <martin@ximian.com>
7783
7784         * reflection.h
7785         (MonoReflectionGenericParam): Added `has_reference_type' and
7786         `has_value_type' fields.
7787
7788         * reflection.c (mono_image_get_generic_param_info): Encode the
7789         correct flags if we have the `class' or `struct' constraint.
7790
7791 2004-04-07  Martin Baulig  <martin@ximian.com>
7792
7793         * reflection.h
7794         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
7795
7796 2004-04-07  Jackson Harper  <jackson@ximian.com>
7797
7798         * appdomain.c: Revert extra patches, just wanted to bump the
7799         version number.
7800         
7801 2004-04-07  Jackson Harper  <jackson@ximian.com>
7802
7803         * Makefile.am: Add culture-info private headers.
7804         * icall.c: Add new icalls for contructing locales.
7805         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
7806         * locales.h: Declare new culture info construction methods.
7807         * object.h: Add new fields used to avoid the CultureMap to
7808         MonoCultureInfo.
7809         * culture-info.h: Definition of structs used in the culture info
7810         tables.
7811         * culture-info-tables.h: Autogenerated tables that contain culture
7812         info data. This file was generated with the locale-builder tool.
7813         * appdomain.c: Incement corlib version number.
7814         
7815 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
7816
7817         * appdomain.c: (mono_runtime_init) move mono_thread_init
7818         to before mono_object_new calls so critical sections
7819         are initialized before use.
7820
7821 2004-04-07  Martin Baulig  <martin@ximian.com>
7822
7823         * icall.c
7824         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
7825         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
7826         (ves_icall_MonoGenericParam_initialize): Removed.
7827         (monogenericparam_icalls): Removed.
7828         (generictypeparambuilder_icalls): Added new table for
7829         System.Reflection.Emit.GenericTypeParameterBuilder.
7830
7831         * reflection.c
7832         (mono_reflection_define_generic_parameter): Removed.
7833         (mono_reflection_initialize_generic_parameter): This is now called
7834         from GenericTypeParameterBuilder's .ctor.
7835
7836 2004-04-06  Martin Baulig  <martin@ximian.com>
7837
7838         * class.c (mono_class_init): Don't inflate nested classes in a
7839         generic instance.
7840         (mono_type_get_name_recurse): Include the generic arguments for
7841         generic instances and generic type declarations.
7842         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
7843         (_mono_class_get_instantiation_name): Removed.
7844         (mono_class_create_generic): Always use `gklass->name' as our name.
7845
7846         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
7847
7848         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
7849         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
7850         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
7851         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
7852         closed generic methods here.
7853
7854         * reflection.c
7855         (mono_reflection_generic_inst_get_nested_types): Removed.
7856         (inflate_mono_method): Copy the generic parameters from the
7857         MonoMethodHeader into out MonoGenericMethod.
7858
7859 2004-04-06  Martin Baulig  <martin@ximian.com>
7860
7861         * row-indexes.h
7862         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
7863
7864         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
7865
7866         * reflection.c (build_compressed_metadata): If we have any entries
7867         in the GenericParam, MethodSpec or GenericParamConstraint tables,
7868         set the header version to 1.1.
7869
7870 2004-04-06  Martin Baulig  <martin@ximian.com>
7871
7872         * class.c (mono_class_init): If we're a generic instance,
7873         initialize our nested classes, too.
7874         (_mono_class_get_instantiation_name): Deal with the new `!%d'
7875         suffix. 
7876
7877 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7878
7879         * process.c: quote the argument passed to the shell on windows.
7880
7881 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
7882
7883         * threads.c (mono_alloc_special_static_data): Allow this to be
7884         called during startup.
7885
7886 2004-04-02  Martin Baulig  <martin@ximian.com>
7887
7888         * icall.c
7889         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
7890
7891 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
7892
7893         * icall.c: Fix build.
7894
7895 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
7896
7897         * Makefile.am: Added security.c|h.
7898         * icall.c: Added icall for get_UserName;
7899         * security.c: New file for security related icalls. Added function
7900         get_UserName for System.Environment (fix #56144).
7901         * security.h: New. Header file for security.c
7902
7903 2004-04-02  Dick Porter  <dick@ximian.com>
7904
7905         * icall.c: Deleted the icalls that were obsoleted some time ago
7906         by the ICU string code, and which were mixed into the icall
7907         rearranging.  Fixes bug 55969.
7908
7909         * string-icalls.h: 
7910         * string-icalls.c: Deleted the code that those icalls reference.
7911
7912 2004-04-01  Martin Baulig  <martin@ximian.com>
7913
7914         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
7915
7916         * class.c (mono_class_from_generic_parameter): Don't set 
7917         TYPE_ATTRIBUTE_INTERFACE.
7918         (my_mono_class_from_generic_parameter): Likewise.
7919
7920 2004-04-01  Martin Baulig  <martin@ximian.com>
7921
7922         * loader.c (find_method): Added an optional `MonoClass *ic'
7923         argument to search in a specific interface.
7924         (mono_get_method_constrained): New public function.
7925
7926 2004-04-01  Martin Baulig  <martin@ximian.com>
7927
7928         * reflection.c (mono_image_get_generic_field_token): Use the
7929         `handleref' cache here.
7930
7931 2004-04-01  Martin Baulig  <martin@ximian.com>
7932
7933         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
7934
7935         * reflection.c (create_generic_typespec): Use the `typespec' hash
7936         here, not the `typeref' one.    
7937
7938 2004-04-01  Martin Baulig  <martin@ximian.com>
7939
7940         * class.c (mono_class_inflate_generic_type): Moved the
7941         functionality into a new static inflate_generic_type() which
7942         returns NULL if it didn't do anything.  Only increment the
7943         `mono_stats.inflated_type_count' if we actually inflated
7944         something.
7945         (mono_class_get_full): Check the classes type to see whether we
7946         need to inflate it; also inflate MONO_TYPE_(M)VAR.
7947
7948 2004-04-01  Jackson Harper  <jackson@ximian.com>
7949
7950         * reflection.c: Set culture for assembly references.
7951         
7952 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
7953
7954         * reflection.[ch], icall.[ch], Fix support for pinning variables.
7955
7956 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7957
7958         * assembly.c:
7959         (do_mono_assembly_open): the critical section also covers
7960         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
7961
7962 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7963
7964         * threads.c:
7965         (mono_manage_threads): abort the background threads when finishing.
7966         Fixes bug #47232.
7967
7968 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7969
7970         * gc.c: only close the done_event handle if there was no timeout.
7971         C-ified comments.
7972
7973 2004-03-30  Martin Baulig  <martin@ximian.com>
7974
7975         * icall.c (icall_entries): It's called "System.Activator", not
7976         "System.Activation".    
7977
7978 2004-03-30  Martin Baulig  <martin@ximian.com>
7979
7980         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
7981         (mono_class_create_from_typespec): Likewise.
7982
7983 2004-03-30  Martin Baulig  <martin@ximian.com>
7984
7985         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
7986         `has_ctor_constraint' and `initialized'.
7987
7988 2004-03-30  Martin Baulig  <martin@ximian.com>
7989
7990         * reflection.c (encode_new_constraint): New static function to add
7991         the constructor constraint attribute to a type parameter.
7992         (encode_constraints): Call encode_new_constraint() if necessary.
7993
7994         * reflection.h
7995         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
7996
7997         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
7998         
7999 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
8000
8001         * reflection.c, icall.c: add support for pinning variables. 
8002
8003 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
8004
8005         * marshal.c (mono_marshal_get_managed_wrapper):
8006         init bool local with zero rather than null.
8007
8008 2004-03-29  Martin Baulig  <martin@ximian.com>
8009
8010         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
8011         the "official" behavior here.
8012         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
8013
8014 2004-03-29  Martin Baulig  <martin@ximian.com>
8015
8016         * icall.c: Reflect latest API changes.
8017
8018 2004-03-29  Martin Baulig  <martin@ximian.com>
8019
8020         * loader.c (mono_get_method_from_token): Also call
8021         mono_metadata_load_generic_params () for abstract and interface
8022         methods; replace the type arguments in the method signature with
8023         the ones which are loaded from the metadata.
8024
8025 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
8026
8027         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
8028         of the lock is not the current thread. MS.NET don't do it, in spite of
8029         what the documentation says. See bug #56157.
8030
8031 2004-03-28  Martin Baulig  <martin@ximian.com>
8032
8033         * class.c (mono_class_init): Don't call init_properties() and
8034         init_events() for generic instances; set `prop->parent' when
8035         inflating properties.
8036
8037         * reflection.c (mono_generic_inst_get_object): Call
8038         `mono_class_init (ginst->klass)'.
8039         (mono_type_get_object): Only create a MonoGenericInst if your
8040         generic type is a TypeBuilder.
8041         (do_mono_reflection_bind_generic_parameters): Only set
8042         `ginst->is_dynamic' if our generic type is a TypeBuilder.
8043
8044 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
8045
8046         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
8047         Fixes #56091.
8048
8049 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8050
8051         * icall.c: added Kill_internal icall.
8052         * process.[ch]: added Kill_internal icall.
8053
8054 2004-03-25  Martin Baulig  <martin@ximian.com>
8055
8056         * class.h (MonoStats): Added `generic_instance_count',
8057         `inflated_method_count', `inflated_type_count' and
8058         `generics_metadata_size'.       
8059
8060 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8061
8062         * reflection.c: no warnings now.
8063
8064 2004-03-25  Martin Baulig  <martin@ximian.com>
8065
8066         * class.c (mono_class_get_full): New public function; does a
8067         mono_class_get(), but also takes a `MonoGenericContext *'.
8068
8069         * loader.c (mono_field_from_memberref): Renamed to
8070         `field_from_memberref', made static and added `MonoGenericContext *'
8071         argument.
8072         (mono_field_from_token): Added `MonoGenericInst *' argument.
8073         (method_from_memberef): Likewise.
8074         (mono_get_method_from_token): Likewise.
8075         (mono_get_method_full): New public function; does a
8076         mono_get_method(), but also takes a `MonoGenericContext *'.
8077
8078         * verify.c (mono_method_verify): Get the method's generic context
8079         and pass it to mono_field_from_token(), mono_get_method_full() and
8080         mono_class_get_full().
8081
8082 2004-03-25  Martin Baulig  <martin@ximian.com>
8083
8084         * class.c (mono_class_inflate_generic_type): Take a
8085         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
8086         `MonoGenericMethod *'.
8087
8088 2004-03-25  Martin Baulig  <martin@ximian.com>
8089
8090         * loader.h (MonoMethodInflated): Store the MonoGenericContext
8091         instead of the MonoGenericMethod here.
8092
8093 2004-03-25  Martin Baulig  <martin@ximian.com>
8094
8095         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
8096         each time we create a new MonoGenericInst, we also create a new
8097         context which points back to us.
8098
8099         * class.c (inflate_method): Use `ginst->context' instead of
8100         creating a new context.
8101
8102         * loader.c (method_from_memberref): Use
8103         `klass->generic_inst->context' instead of creating a new context.
8104
8105 2004-03-25  Martin Baulig  <martin@ximian.com>
8106
8107         * class.h (MonoGenericContext): New struct.
8108         (MonoGenericMethod): Removed `generic_inst'.
8109
8110         * class.c (mono_class_inflate_generic_method): Take a
8111         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
8112
8113 2004-03-25  Martin Baulig  <martin@ximian.com>
8114
8115         * loader.h (MonoMethodInflated): New typedef.
8116
8117         * metadata.h (MonoMethodSignature): Removed `gen_method', make
8118         `generic_param_count' consume just 30 bits, added `is_inflated'
8119         and `has_type_parameters' flags (one bit each).
8120
8121         * class.c (mono_class_inflate_generic_method): Create a
8122         MonoMethodInflated instead of a MonoMethodNormal and set
8123         `is_inflated' in the method signature.
8124
8125         * class.h (MonoGenericMethod): Removed `generic_method'.
8126
8127 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
8128
8129         * image.c: Make sure the name of a MonoImage is always an absolute path.
8130           This fixes bug #54415.
8131
8132 2004-03-24  Martin Baulig  <martin@ximian.com>
8133
8134         * class.c (mono_class_setup_vtable): If we're a generic instance,
8135         use our generic type's vtable size.
8136
8137 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
8138
8139         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
8140         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
8141         problems.
8142
8143 2004-03-23  Martin Baulig  <martin@ximian.com>
8144
8145         * class.h (MonoDynamicGenericInst): Added `int count_events' and
8146         `MonoEvent *events'.
8147
8148         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
8149         (typebuilder_icalls): Added "get_event_info"; calls
8150         mono_reflection_event_builder_get_event_info(). 
8151
8152         * reflection.c (mono_reflection_generic_inst_initialize): Added
8153         `MonoArray *events'.
8154         (mono_reflection_event_builder_get_event_info): New function.
8155
8156 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
8157
8158         * object.h: add mono_type_initialization_init
8159
8160         * object.c (mono_runtime_class_init): 
8161         implement class constructor synchronization rules
8162         to cope with threading issues.  
8163         add mono_type_initialization_init
8164
8165         * appdomain.c (mono_runtime_init): call 
8166         mono_type_initialization_init
8167
8168         * class.h: removing initializing field from MonoVTable
8169
8170 2004-03-23  Martin Baulig  <martin@ximian.com>
8171
8172         * class.c (my_mono_class_from_generic_parameter): Use
8173         `param->name' if it's not NULL. 
8174
8175 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
8176
8177         * class.c: do not insert non-virtual methods in the vtable.
8178         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
8179         that means the method is non-virtual. This never would have
8180         happened before.
8181
8182 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
8183
8184         * profiler.c: Added lock for accessing coverage_hash.
8185
8186 2004-03-22  Martin Baulig  <martin@ximian.com>
8187
8188         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
8189         `method->method->signature->generic_param_count != 0' to make it
8190         work for interface methods.
8191
8192 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8193
8194         * process.c: quote the string passed to the shell using g_shell_quote.
8195
8196 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8197
8198         * threads.c:
8199         (mono_threads_manage): don't remove the finalizer thread and self
8200         from the threads hash table so that mono_thread_manage can be called
8201         more than once.
8202
8203 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8204
8205         * process.c: quote the arguments when UseShellExecute is true. Fixes
8206         bug #55790.
8207
8208 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8209
8210         * threads.c: set mono_thread_detach as a cleanup routine for every
8211         thread. This way it's always executed upon thread termination, either
8212         aborted or finished normally. No more xsp hangs!
8213
8214 2004-03-17  Martin Baulig  <martin@ximian.com>
8215
8216         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
8217         `int count_nested' and a `MonoType **nested'.
8218
8219         * reflection.c (mono_reflection_bind_generic_parameters): Moved
8220         most of the functionality into a new static
8221         do_mono_reflection_bind_generic_parameters() and don't take a
8222         `MonoType *nested_in' argument any more.  Don't compute nested
8223         types here.
8224         (mono_reflection_generic_inst_get_nested_types): New public method
8225         to get nested types.
8226
8227         * class.c (mono_class_create_generic): Set `klass->nested_in' if
8228         we're a nested class.
8229
8230         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
8231         mono_reflection_generic_inst_get_nested_types() to compute the
8232         nested types.
8233
8234 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
8235
8236         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
8237         descriptive error message under windows.
8238         
8239 2004-03-17  Martin Baulig  <martin@ximian.com>
8240
8241         * class.c (dup_type): Added `const MonoType *original' argument;
8242         copy the attrs from the original type.
8243
8244 2004-03-17  Martin Baulig  <martin@ximian.com>
8245
8246         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
8247         `m->generic_inst_cache' here.
8248
8249 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
8250
8251         * exception.h exception.c: Add stack_overflow_exception.
8252
8253 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8254
8255         * threadpool.c:
8256         (overlapped_callback): call SetEvent *after* invoking the callback.
8257         No need to call CloseHandle.
8258
8259 2004-03-16  Martin Baulig  <martin@ximian.com>
8260
8261         * reflection.c (mono_image_get_fieldref_token): Take a
8262         `MonoReflectionField *' instead of a `MonoClassField *' and a
8263         `MonoClass *'; store the `MonoReflectionField *' in the hash.
8264
8265 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8266
8267         * appdomain.c: don't add the culture to the filename we're looking for
8268         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
8269
8270 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8271
8272         * locales.c: don't ignore symbols when doing case insensitive compares.
8273         Thanks Dick! Fixes bug #54046.
8274
8275         * threads.c: surround 'threads' usage with enter/leave in
8276         mono_thread_manage.
8277
8278 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
8279
8280         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
8281         implicitly marshalled as [Out]. Fixes #55450.
8282
8283         (mono_marshal_get_runtime_invoke): Zero out the result if there is
8284         an exception.
8285
8286 2004-03-16  Martin Baulig  <martin@ximian.com>
8287
8288         * class.c (mono_class_from_generic_parameter): Use the actual
8289         parameter name. 
8290
8291 2004-03-16  Martin Baulig  <martin@ximian.com>
8292
8293         * reflection.c (type_get_signature_size): New static function.
8294         Compues the size of the type in a method signature.
8295         (method_get_signature_size): New static function; calls
8296         type_get_signature_size() to compute the actual size of the
8297         method's signature.
8298         (method_encode_signature): Use method_get_signature_size() to get
8299         the signature's size rather than using `nparams * 10'.
8300
8301 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8302
8303         * file-io.h: define here WapiOverlapped on windows. I don't want the
8304         regular OVERLAPPED one.
8305
8306         * file-io.c:
8307         * threadpool.c: somehow, BindIoCompletionCallback is not found.
8308         Disabling AIO on windows.
8309
8310 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8311
8312         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
8313         bug #55385.
8314
8315 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8316
8317         * appdomain.c: upgraded corlib version.
8318
8319         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
8320         and BeginWrite. Allow opening files for asynchrnous operations.
8321
8322         * file-io.h: new struct that maps FileStreamAsyncResult.
8323         * icall.c: added new icalls.
8324         * process.[ch]: support setting child process environment variables
8325         and use the SHELL or COMSPEC when UseShellExecute is true.
8326
8327         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
8328         callback for async. IO is here and also BindHandle.
8329
8330         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
8331         from here.
8332
8333 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
8334
8335         * reflection.c (create_custom_attr): Allow len == 0.
8336
8337         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
8338         computation on big-endian machines.
8339
8340 2004-03-13  Martin Baulig  <martin@ximian.com>
8341
8342         * class.h (MonoGenericInst): Added `int count_ifaces'.
8343
8344         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
8345         `ginst->count_ifaces' instead `klass->interface_count' since we
8346         may get called before the vtable is created.
8347
8348         * loader.c (mono_method_get_param_names): If we're a generic
8349         instance, return and don't initialize the class.
8350
8351         * reflection.c (mono_reflection_setup_generic_class): Don't call
8352         ensure_runtime_vtable().
8353         (mono_reflection_bind_generic_parameters): Set
8354         `ginst->count_ifaces'.
8355
8356 2004-03-11  Jackson Harper <jackson@ximian.com>
8357
8358         * icall.c:
8359         * unicode.c:
8360         * unicode.h: Remove unused System.Char icalls.
8361         
8362 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
8363
8364         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
8365         code when we P/Invoke the first library in Windows.Forms, instead
8366         of when we first open the assembly.
8367
8368         * assembly.c: Drop the lookup from here.
8369
8370 2004-03-10  Martin Baulig  <martin@ximian.com>
8371
8372         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
8373         class for properties, fields and events.  Finally fixes #54945.
8374
8375 2004-03-10  Martin Baulig  <martin@ximian.com>
8376
8377         * metadata.c (mono_metadata_class_equal): New static function;
8378         checks whether two generic instances or two generic parameters are
8379         equal.
8380         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
8381         compare classes.        
8382
8383 2004-03-10  Martin Baulig  <martin@ximian.com>
8384
8385         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
8386
8387         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
8388         argument and write it into the `reflection_info' field.
8389
8390         * icall.c
8391         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
8392         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
8393
8394 2004-03-09  Jackson Harper  <jackson@ximian.com>
8395
8396         * char-conversions.h: use 8 bits for numeric data its all we need
8397         * icall.c: numeric data is only 8 bits now.
8398
8399 2004-03-09  Martin Baulig  <martin@ximian.com>
8400
8401         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
8402
8403         * class.c (init_properties, init_events): Initialize the new
8404         `parent' field.
8405
8406         * reflection.c (typebuilder_setup_properties): Likewise.
8407         (typebuilder_setup_events): Likewise.
8408
8409         * reflection.h (MonoEventInfo): Replaced `parent with
8410         `declaring_type' and `reflected_type'.
8411
8412         * icall.c (ves_icall_get_property_info): Distinguish between
8413         declaring and reflected type.
8414         (ves_icall_get_event_info): Likewise.
8415
8416 2004-03-09  Martin Baulig  <martin@ximian.com>
8417
8418         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
8419         (ves_icall_Type_GetField): Correctly set field->klass.
8420
8421 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
8422
8423         * loader.h: Fix warning.
8424
8425 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
8426
8427         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
8428         library routine if present.  Notice that it will still continue
8429         executing even if its missing, for those working on the Gtk#
8430         edition of Windows.Forms.
8431
8432         * assembly.c (do_mono_assembly_open): If loading the
8433         System.Windows.Forms call mono_loader_wini_init.
8434
8435 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
8436
8437         * class.h: Added MonoRemoteClass struct.
8438         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
8439         function for MonoStrings.
8440         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
8441         Added internal call for getting the proxy type.
8442         * marshal.c: Get the type of transparent proxies from its remote_class.
8443         Added methods that generate the IL for type checks and casts:
8444         mono_marshal_get_isinst, mono_marshal_get_castclass, 
8445         mono_marshal_get_proxy_cancast.
8446         * marshal.h: Declaration of the previous new methods.
8447         * object.c: Added new moethods for creating and updating MonoRemoteClass
8448         instances: mono_remote_class, mono_upgrade_remote_class, 
8449         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
8450         * verify.c: FIx transparent_proxy_fields layout.
8451         * appdomain.c: Bump corlib version.
8452
8453 2004-03-04  Jackson Harper  <jackson@ximian.com>
8454
8455         * icall.c: Add icall to access char conversion tables.
8456         * char-conversions.h: Character conversion tables.
8457         * Makefile.am: Add char-conversions.h private header file.
8458         
8459 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
8460
8461         * appdomain.c (unload_thread_main): Increase unloading timeout to
8462         10 sec as a temporary workaround for Nant problems.
8463
8464 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
8465
8466         * gc.c: Add checks for GC_enable and GC_disable.
8467
8468         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
8469         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
8470         (bug #54988).
8471         
8472 2004-02-27  Martin Baulig  <martin@ximian.com>
8473
8474         * reflection.c (mono_reflection_bind_generic_parameters): Take a
8475         `MonoReflectionType *' instead of a `MonoType *'.
8476
8477 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
8478
8479         * gc.c (run_finalize): Avoid finalizing the object representing the
8480         finalizer thread.
8481         (finalizer_thread): Fix warning.
8482
8483 2004-02-25  Martin Baulig  <martin@ximian.com>
8484
8485         * class.c (_mono_class_get_instantiation_name): Added `int offset'
8486         argument for nested types.
8487         (mono_class_create_generic): Added support for nested generictypes.
8488
8489         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
8490         `GList *nested'.
8491
8492         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
8493
8494         * reflection.c (method_encode_signature): Increase the minimum
8495         value of `size' from 10 to 11.
8496         (mono_reflection_bind_generic_parameters): Take `int type_argc'
8497         and `MonoType **types' arguments instead of the `MonoArray
8498         *types'; added `MonoType *nested_in'.  Recursively instantiate
8499         nested classes. 
8500
8501 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
8502
8503         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
8504         stack_overflow_ex members which are used by exception handling.
8505
8506         * appdomain.c (mono_runtime_init): Initialize the new members.
8507
8508         * gc.c (mono_gc_enable): New helper function.
8509         * gc.c (mono_gc_disable): New helper function.
8510
8511 2004-02-23  Martin Baulig  <martin@ximian.com>
8512
8513         * icall.c: I must have been really stupid - make it actually work
8514         this time ;-)
8515
8516 2004-02-23  Martin Baulig  <martin@ximian.com>
8517
8518         * loader.c (method_from_memberref): Only inflate the method if
8519         it's in another klass.
8520
8521 2004-02-23  Martin Baulig  <martin@ximian.com>
8522
8523         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
8524         (mono_class_init): If we're a generic instance and an interface,
8525         compute `class->interface_id'; also create `class->interfaces'
8526         here and inflate them.
8527
8528         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
8529         `ginst->is_open'.
8530         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
8531
8532         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
8533
8534 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
8535
8536         * reflection.c (method_encode_code): Improved the error message
8537         generated by the exception.
8538
8539 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8540
8541         * icall.c: Martin did not do what he said in the ChangeLog for
8542         2004-02-18, but put back the changes for properties and events.
8543         Commenting those changes out again and adding comment to bug #54518.
8544         
8545         * process.c: removed warning.
8546
8547 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
8548
8549         * marshal.c (emit_struct_conv): Print an error message instead of
8550         asserting when a type does not have the StructLayout attribute.
8551
8552 2004-02-20  Martin Baulig  <martin@ximian.com>
8553
8554         * reflection.c (mono_type_get_object): Also use the cache for
8555         generic instances.
8556         (mono_reflection_bind_generic_parameters): Always compute
8557         `ginst->ifaces'.        
8558
8559 2004-02-20  Martin Baulig  <martin@ximian.com>
8560
8561         * class.h (MonoGenericMethod): Removed `klass'.
8562
8563         * class.c (mono_class_inflate_generic_method): Added `MonoClass
8564         *klass' argument.
8565
8566 2004-02-20  Martin Baulig  <martin@ximian.com>
8567
8568         * reflection.c (method_encode_methodspec): Actually use the
8569         uninflated signature for the memberref.
8570
8571 2004-02-20  Martin Baulig  <martin@ximian.com>
8572
8573         * class.h (MonoGenericMethod): Removed `declaring'.
8574
8575         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
8576         is NULL, compute it here.
8577
8578 2004-02-20  Martin Baulig  <martin@ximian.com>
8579
8580         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
8581
8582         * metadata.c (mono_metadata_generic_inst_hash): New method.
8583         (mono_metadata_generic_inst_equal): New method.
8584
8585         * reflection.c (mono_reflection_bind_generic_parameters): Use the
8586         `klass->image->generic_inst_cache' cache to avoid creating
8587         duplicate MonoGenericInst's.
8588
8589         * class.c (mono_class_inflate_generic_type): Use the cache.
8590
8591 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
8592
8593         * object.c: fixed gc descriptor calculation for embedded valuetypes.
8594
8595 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8596
8597         * icall.c: added Socket.WSAIoctl icall.
8598
8599         * socket-io.[ch]: implemented
8600         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
8601
8602 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
8603
8604         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
8605
8606 2004-02-18  Urs C Muff  <umuff@quark.com>
8607
8608         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
8609         this work on PPC and other big-endian architectures.
8610
8611         * debug-mono-symfile.h: Prepended the names of all the `guint32'
8612         fields with an underscore to make sure they're only accessed by
8613         the read32() macro.
8614
8615 2004-02-18  Martin Baulig  <martin@ximian.com>
8616
8617         * icall.c: Put the klass->refclass changes back for methods and
8618         fields, but not for properties and events.  We're currently not
8619         distinguishing between DeclaringType and ReflectedType for
8620         properties and events, that's what caused the regressions.
8621
8622 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8623
8624         * object.c:
8625         (mono_async_result_new): the handle can be NULL.
8626
8627         * threadpool.c: Use an event instead of a semaphore, don't initialize
8628         it until needed. This saves quite a few semaphores from being created
8629         when using the threadpool.
8630
8631 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
8632
8633         * object.c (mono_string_is_interned_lookup): Fix interning of long
8634         strings. Fixes #54473.
8635
8636         * domain.c (ldstr_equal): Optimize if the two strings are equal.
8637
8638         * icall.c: Revert the klass->refclass changes since they introduce
8639         regressions (bug #54518).
8640
8641 2004-02-18  Martin Baulig  <martin@ximian.com>
8642
8643         * class.c (mono_class_init): If we're a generic instance and don't
8644         come from a TypeBuilder, inflate our members here.
8645         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
8646         (mono_class_create_generic): New public method.
8647         (mono_class_initialize_generic): Removed.
8648         (get_instantiation_name): Renamed to
8649         _mono_class_get_instantiation_name() and made it public.
8650
8651 2004-02-18  Martin Baulig  <martin@ximian.com>
8652
8653         * class.c (mono_class_inflate_generic_type): Clear the new
8654         instance's `nginst->klass' when inflating a generic instance.
8655         (mono_class_is_subclass_of): Added (basic) support for generic
8656         instances.
8657
8658 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
8659
8660         * appdomain.h, domain.c: use a MonoCodeManager instead of a
8661         MonoMempool to hold compiled native code.
8662
8663 2004-02-17  Martin Baulig  <martin@ximian.com>
8664
8665         * class.h (MonoDynamicGenericInst): Added `count_properties' and
8666         `properties'.
8667
8668         * reflection.c (mono_reflection_generic_inst_initialize): Added
8669         `MonoArray *properties' argument.
8670
8671         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
8672
8673 2004-02-17  Martin Baulig  <martin@ximian.com>
8674
8675         * icall.c (ves_icall_Type_GetFields): Renamed to
8676         ves_icall_Type_GetFields_internal() and added a
8677         `MonoReflectionType *rtype' argument; pass it to
8678         mono_field_get_object() to set the field's "reflected" type.
8679         (ves_icall_Type_GetConstructors): Likewise.
8680         (ves_icall_Type_GetEvents): Likewise.
8681         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
8682         argument; pass it to mono_method_get_object() to set the method's
8683         "reflected" type.       
8684
8685 2004-02-17  Martin Baulig  <martin@ximian.com>
8686
8687         * class.h (MonoDynamicGenericInst): New type.
8688         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
8689
8690         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
8691         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
8692         (ves_icall_MonoGenericInst_GetFields): New interncall.
8693
8694         * class.c (mono_class_from_generic): Don't call
8695         mono_class_initialize_generic() if this is a dynamic instance;
8696         ie. it's being created from a TypeBuilder.
8697         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
8698         `class->byval_arg.type'.
8699
8700         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
8701         to `inflate_method' and made static.
8702         (mono_reflection_inflate_field): Removed.
8703         (mono_reflection_generic_inst_initialize): New public method.
8704
8705         * reflection.h (MonoReflectionGenericInst): Removed `methods',
8706         `ctors' and `fields'; added `initialized'.
8707
8708 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
8709
8710         * debug-helpers.c (mono_method_full_name): Fix output for empty
8711         namespaces.
8712
8713 2004-02-12  Martin Baulig  <martin@ximian.com>
8714
8715         * class.h (MonoClassField): Added `MonoType *generic_type'.
8716
8717         * reflection.c (mono_image_get_fieldref_token): Added support for
8718         instantiated generic types.
8719         (field_encode_inflated_field): Removed.
8720         (mono_image_get_inflated_field_token): Removed.
8721         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
8722
8723         * reflection.h (MonoReflectionInflatedField): Removed.
8724
8725 2004-02-12  Martin Baulig  <martin@ximian.com>
8726
8727         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
8728         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
8729
8730         * reflection.c (mono_image_get_methodspec_token): Take a
8731         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
8732         (mono_image_create_token): Check whether we have a
8733         `method->signature->gen_method' and call
8734         mono_image_get_methodspec_token() if appropriate.
8735         (inflated_method_get_object): Removed.
8736         (mono_reflection_bind_generic_method_parameters): Return a
8737         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
8738         (mono_reflection_inflate_method_or_ctor): Likewise.
8739
8740         * reflection.h (MonoReflectionInflatedMethod): Removed.
8741
8742 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
8743
8744         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
8745         for custom valuetype marshalling.
8746
8747         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
8748
8749 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8750
8751         * icall.c: fixed WSAGetLastError_internal name.
8752
8753 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
8754
8755         * threads.c (mono_thread_attach): Allow this to be called multiple
8756         times for a thread.
8757         
8758         * threads.c (build_wait_tids): Do not wait for ourselves.
8759
8760         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
8761         appdomain list is empty.
8762
8763         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
8764         memory returned by mono_string_builder_to_utf16, since it points into
8765         managed memory. Thanks to Bernie Solomon for noticing this.
8766
8767         * icall.c: Add AppDomainSetup icalls.
8768
8769         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
8770
8771         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
8772         types.
8773
8774         * reflection.c (reflection_methodbuilder_to_mono_method): Save
8775         custom attributes to the method_aux struct. Also fix array indexes etc.
8776
8777         * loader.c (mono_method_get_param_names): Make dynamic case work again.
8778         
8779 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
8780
8781         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
8782         (both static and runtime) and reduce startup time.
8783
8784 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
8785
8786         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
8787         AsAny marshalling conversion instead of crashing.
8788
8789         * marshal.c: Fix warnings.
8790
8791 2004-02-09  Martin Baulig  <martin@ximian.com>
8792
8793         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
8794
8795         * reflection.h (MonoReflectionInflatedMethod): Removed the
8796         `declaring' field, it's now in the unmanaged MonoGenericMethod.
8797
8798         * reflection.c (method_encode_methodspec): Removed the `method'
8799         argument; we get it from `gmethod->declaring'.
8800         (inflated_method_get_object): Removed the `declaring' argument.
8801
8802 2004-02-09  Martin Baulig  <martin@ximian.com>
8803
8804         * class.h (MonoGenericMethod): New type.
8805         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
8806         `generic_method'.
8807
8808         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
8809         a `MonoGenericMethod *gen_method' one.
8810
8811         * class.c (mono_class_inflate_generic_type): Take an additional
8812         `MonoGenericMethod * argument.  This is only non-NULL if we're
8813         inflating types for a generic method.   
8814         (mono_class_inflate_generic_signature): Renamed to
8815         inflate_generic_signature() and made static; take a
8816         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
8817         (inflate_generic_header): Take a `MonoGenericMethod *' argument
8818         instead of a `MonoGenericInst *' one.
8819         (mono_class_inflate_generic_method): Likewise.
8820
8821         * reflection.c (encode_generic_method_sig): Take a
8822         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
8823         (method_encode_methodspec): Likewise.
8824         (inflated_method_get_object): Likewise. 
8825
8826         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
8827         field with a `MonoGenericMethod *gmethod' one.  
8828
8829 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
8830
8831         * class.h (mono_class_has_parent): add parens to expansion
8832         so you can ! this.
8833
8834 2004-02-08  Martin Baulig  <martin@ximian.com>
8835
8836         * image.h (MonoImage): Removed `generics_cache'.
8837
8838         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
8839         instead of a `MonoType *' argument; removed the `inflate_methods'
8840         argument.  Don't inflate methods here.
8841
8842         * loader.c (find_method): If it's a generic instance, call
8843         mono_class_init() on the `sclass->generic_inst->generic_type'.
8844
8845         * metadata.c (mono_type_size): Make this work on uninitialized
8846         generic instances; call it on the `ginst->generic_type's class.
8847
8848         * reflection.c (mono_reflection_bind_generic_parameters): Call
8849         mono_class_from_generic() to create the `ginst->klass'.
8850
8851 2004-02-08  Martin Baulig  <martin@ximian.com>
8852
8853         * class.h (MonoClass): Changed type of `generic_inst' from
8854         `MonoType *' to `MonoGenericInst *'.
8855
8856 2004-02-08  Martin Baulig  <martin@ximian.com>
8857
8858         * icall.c (ves_icall_Type_BindGenericParameters): Just call
8859         mono_type_get_object(), this is now creating a `MonoGenericInst'
8860         for MONO_TYPE_GENERICINST.
8861         (ves_icall_MonoGenericInst_GetParentType): Likewise.
8862         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
8863
8864         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
8865         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
8866         (inflated_method_get_object): Added `MonoClass *refclass' argument.
8867         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
8868         and reflected type.
8869
8870         * reflection.h (MonoReflectionInflatedMethod): Removed
8871         `declaring_type' and `reflected_type'.
8872
8873 2004-02-08  Martin Baulig  <martin@ximian.com>
8874
8875         * class.h (MonoGenericInst): Added `MonoType *parent' and
8876         `MonoType **ifaces'.
8877
8878         * reflection.h (MonoReflectionGenericInst): Removed `klass',
8879         `parent' and `interfaces'.
8880
8881         * reflection.c (mono_reflection_bind_generic_parameters): Take a
8882         `MonoType *' argument and return a `MonoType *'.
8883
8884         * icall.c
8885         (ves_icall_MonoGenericInst_GetParentType): New interncall.
8886         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
8887
8888 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
8889
8890         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
8891         valuetype marshalling.
8892
8893 2004-02-06  Martin Baulig  <martin@ximian.com>
8894
8895         * class.c
8896         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
8897         (my_mono_class_from_generic_parameter): Likewise.
8898
8899 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
8900
8901         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
8902         contents of the symbol files lazily.
8903
8904         * object.h (MonoThread): Add 'name' and 'name_len' fields.
8905
8906         * threads.h threads.c icall.c: New icalls for getting and setting the
8907         threads name.
8908
8909 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
8910
8911         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
8912         Raise an exception when the domain is not found.
8913
8914 2004-02-03  Martin Baulig  <martin@ximian.com>
8915
8916         * reflection.c (mono_image_get_methodspec_token): Use the
8917         uninflated signature; fixes gen-33.
8918
8919 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
8920
8921         * gc.c threads.c: Make the finalizer thread a normal managed thread so
8922         the finalizer code can use thread functionality.
8923
8924         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
8925         the finalizer thread.
8926
8927         * threads.c: Make some functions more robust.
8928
8929         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
8930
8931         * metadata.h: Add new marshalling conventions.
8932
8933         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
8934         stringbuilder marshalling. Fixes #53700.
8935
8936         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
8937
8938         * reflection.c (mono_image_get_type_info): Save declarative security
8939         info.
8940
8941         * reflection.c (mono_image_get_field_info): Handle uninitialized 
8942         unmanaged fields as well.
8943
8944         * appdomain.c: Bump corlib version.
8945
8946 2004-02-01  Martin Baulig  <martin@ximian.com>
8947
8948         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
8949         method type arguments.  
8950
8951 2004-01-30  Duncan Mak  <duncan@ximian.com>
8952
8953         * marshal.h: Add prototype for
8954         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
8955         and
8956         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
8957         fix the build.
8958
8959 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
8960
8961         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
8962         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
8963
8964 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
8965
8966         * marshal.c (mono_marshal_get_native_wrapper): Add support for
8967         custom marshalling of valuetypes.
8968
8969         * marshal.c: Fix some warnings.
8970
8971 2004-01-29  Martin Baulig  <martin@ximian.com>
8972
8973         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
8974         for generic method parameters.
8975
8976         * reflection.c (method_encode_methodspec): Write the uninflated
8977         signature into the methodspec table.
8978         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
8979         is always the uninflated method.
8980         (reflection_methodbuilder_to_mono_method): Copy the generic
8981         parameters from the MethodBuilder into `header->gen_params'.
8982
8983 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
8984
8985         * class.c (mono_class_from_generic_parameter): Fix warning.
8986
8987 2004-01-27  Martin Baulig  <martin@ximian.com>
8988
8989         * class.c (mono_class_from_generic_parameter): Don't create
8990         `klass->methods' here.  
8991
8992 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
8993
8994         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
8995         extension since it does not work with libraries named lib<FOO>.dll.so.
8996
8997 2004-01-25  Martin Baulig  <martin@ximian.com>
8998
8999         * class.c (mono_class_inflate_generic_type): Added support for
9000         MONO_TYPE_GENERICINST.
9001
9002         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
9003         inflate methods on open constructed types.      
9004
9005 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9006
9007         * object.c: fire ProcessExit event in the root AppDomain after running
9008         Main. Fixes bug #53299.
9009
9010 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
9011
9012         * socket-io.c: include the new socket-wrappers.h header.
9013         Use the wrappers instead of the unix socket functions to make the code
9014         more clear.
9015
9016 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
9017
9018         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
9019
9020         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9021         Fixes #22532.
9022
9023 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
9024
9025         * reflection.c (mono_image_create_pefile): Handle the case when the
9026         entry point is not a MethodBuilder.
9027
9028         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9029         field to ReflectionMethod since it is not allways a builder.
9030
9031         * reflection.c (type_get_fully_qualified_name): New helper function to
9032         return the fully qualified name of a type.
9033
9034         * reflection.c (encode_marshal_blob): Always emit the fully qualified
9035         type name for custom marshallers.
9036
9037         * reflection.c (mono_marshal_spec_from_builder): Ditto.
9038
9039         * class.c (mono_class_setup_vtable): If a parent class already 
9040         implements an interface, use the implementing methods from that class.
9041         Fixes #53148.
9042
9043 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9044
9045         * threadpool.c: just return instead of ExitThread to allow for thread
9046         clean up earlier.
9047
9048 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
9049
9050         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
9051         when closing resource modules.
9052
9053         * reflection.c (mono_image_create_pefile): Handle the case when the
9054         entry point is not a MethodBuilder.
9055
9056         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
9057         field to ReflectionMethod since it is not allways a builder.
9058
9059 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
9060
9061         * marshal.c (mono_marshal_get_managed_wrapper): 
9062         mono_marshal_alloc takes native int so CONV_I
9063         the arg for 64bits.
9064
9065 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
9066
9067         * reflection.c (fixup_cattrs): New function to fixup the methoddef
9068         tokens in the cattr table. Fixes #53108.
9069
9070 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9071
9072         * loader.c: don't trim ".dll" before looking up in the config file.
9073         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
9074
9075 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
9076
9077         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
9078         Return the module which contains the resource as well.
9079         (ves_icall_System_Reflection_Module_Close): New icall.
9080
9081         * appdomain.c: Bump corlib version number.
9082
9083         * image.c (mono_image_addref): New public function.
9084
9085         * assembly.c: Call mono_image_addref.
9086
9087         * reflection.c (mono_module_get_object): Increase reference count of 
9088         the image.
9089
9090         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
9091         Fixes #22532.
9092
9093         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
9094         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
9095         proper exceptions on DllImport problems.
9096
9097 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
9098
9099         * class.c, metadata.c: eliminate CSIZE macro.
9100
9101 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
9102
9103         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
9104         * object.h: Added async_callback field in MonoAsyncResult.
9105         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
9106         * verify.c: Added async_callback in MonoAsyncResult layout.
9107
9108 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
9109
9110         * reflection.c (mono_reflection_get_custom_attrs): Add support
9111         for Modules.
9112
9113 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
9114
9115         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
9116         marshalling.
9117         (mono_marshal_method_from_wrapper): Add null pointer check.
9118
9119 2004-01-16  Martin Baulig  <martin@ximian.com>
9120
9121         * debug-mono-symfile.h: Set version number to 36 and reflect
9122         latest symbol writer changes.
9123
9124 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
9125
9126         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
9127         multi-dimensional arrays.
9128         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
9129         (mono_class_from_mono_type): Use bounded_array_class_get.
9130         
9131         * class.c (mono_bounded_array_class_get): New function which takes
9132         a 'bounded' bool argument to distinguish vectors from one dimensional
9133         arrays.
9134
9135         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
9136         bounded_array_class_get if the array has bounds.
9137
9138         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
9139         Search modules loaded using AssemblyBuilder:AddModule as well.
9140
9141 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9142
9143         * appdomain.c: increased corlib version.
9144         * filewatcher.c: removed g_print.
9145         * icall.c:
9146         (get_property_info): only allocate what is actually requested.
9147         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
9148
9149 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9150
9151         * Makefile.am: added filewatcher.[ch]
9152         * filewatcher.[ch]: FileSystemWatcher runtime support.
9153         * icall.c: added new FSW icalls.
9154
9155 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
9156
9157         * string-icalls.c: fix stringbuilder regression as suggested by
9158         Iain McCoy <iain@mccoy.id.au>.
9159
9160 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
9161
9162         * process.c (process_read_stringtable_block): Recognize '007f' as
9163         a language neutral stringtable block.
9164
9165 2004-01-12  Patrik Torstensson
9166
9167         * object.h (MonoStringBuilder) : Changed layout to support our
9168         new stringbuilder class.
9169         * marshal.c: Change marshalling to support the new layout of 
9170         string builder.
9171         * appdomain.c: increased version number because new layout of
9172         string builder.
9173
9174 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
9175
9176         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
9177         assembly name as an string instead of an AssemblyName, since it is
9178         easier to extract info from it.
9179
9180         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
9181         the culture subdirectories too. Fixes #52231.
9182
9183 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9184
9185         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
9186         It takes 2 new parameters with an optional name for the method to look
9187         for and case ignoring info.
9188
9189         * threadpool.c: removed unused variable.
9190
9191 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9192
9193         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
9194         It takes 2 new parameters with an optional name for the property to look
9195         for and case ignoring info.
9196         Fixes bug #52753.
9197
9198 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
9199
9200         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
9201         Fix #52451.
9202
9203 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9204
9205         * appdomain.c:
9206         * assembly.c: escape the uri before passing it to g_filename_from_uri.
9207         Fixes bug #52630.
9208
9209 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
9210
9211         * reflection.c: Add support for more than one unmanaged resource.
9212
9213         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
9214         in field->def_value, as done in all other cases.
9215
9216         * reflection.c (mono_reflection_get_custom_attrs): Add support for
9217         TypeBuilders.
9218
9219         * reflection.c (mono_reflection_create_runtime_class): Remove 
9220         errorneous assignment to klass->element_class, since it is already
9221         done in mono_reflection_setup_internal_class.
9222
9223 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9224
9225         * gc.c: added missing LeaveCriticalSection.
9226         * icall.c: indented a couple of lines.
9227         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
9228         if we call EndInvoke inside a callback. Fixes bug #52601.
9229
9230 2004-01-07  Martin Baulig  <martin@ximian.com>
9231
9232         * mono-debug-debugger.h
9233         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
9234
9235 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
9236
9237         * appdomain.c: Use messages in NotImplementedException.
9238
9239         * exception.c (mono_get_exception_not_implemented): Now this takes
9240         a message argument.
9241
9242         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
9243         exception instead of g_asserting an aborting when something is not
9244         implemented.
9245
9246         Add some inline docs.
9247
9248 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
9249
9250         * reflection.h: Update after changes to object layout.
9251
9252         * reflection.c: Implement saving of unmanaged aka win32 resources.
9253
9254         * appdomain.c: Bump version number.
9255
9256         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
9257         Handle missing domains gracefully.
9258
9259 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
9260
9261         * file-io.c : On Windows, there are much more invalid_path_chars.
9262
9263 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
9264
9265         * class.h, object.c: prepare for GetType () speedup.
9266
9267 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
9268
9269         * profiler.c: workaround for --profile null reference exception on
9270           cygwin. Patch by Patrik Torstensson.
9271
9272 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
9273
9274         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
9275         make work for unaligned access.
9276
9277 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
9278
9279         * class.c: small cleanup (class->fields [i] -> field).
9280         * image.c: check address of metadata is valid.
9281
9282 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
9283
9284         * assembly.h assembly.c (mono_assembly_loaded): New public function to
9285         search the list of loaded assemblies.
9286
9287         * reflection.c (mono_reflection_type_from_name): Use 
9288         mono_assembly_loaded instead of mono_image_loaded.
9289
9290         * reflection.c: Fix warnings.
9291
9292 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
9293
9294         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
9295         is dynamic. This is needed since an assembly can contain both dynamic and
9296         non-dynamic images.
9297
9298         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
9299         assembly->dynamic.
9300
9301         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
9302
9303         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
9304         to store modules loaded using AddModule.
9305
9306         * reflection.c (mono_image_fill_file_table): Generalize this so it works
9307         on Modules.
9308
9309         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
9310
9311         * reflection.c (mono_image_fill_export_table_from_module): New function to
9312         fill out the EXPORTEDTYPES table from a module.
9313
9314         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
9315         into a separate function. Also handle loaded non-dynamic modules.
9316
9317         * reflection.c (mono_image_basic_init): Fix memory allocation.
9318
9319         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9320
9321         * assembly.c (mono_assembly_load_references): Make this public.
9322
9323 2003-12-19  Martin Baulig  <martin@ximian.com>
9324
9325         * class.c (mono_class_initialize_generic): Made this static, take
9326         a `MonoGenericInst *' instead of a `MonoClass *'.
9327         (mono_class_from_generic): Call mono_class_initialize_generic()
9328         unless we're already initialized or being called from
9329         do_mono_metadata_parse_generic_inst().
9330
9331         * class.h (MonoGenericInst): Added `initialized' and
9332         `init_pending' flags.
9333
9334         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
9335         `mono_class_init (gklass)' or mono_class_initialize_generic()
9336         here; set `generic_inst->init_pending' while parsing the
9337         `type_argv'.
9338
9339 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
9340
9341         * locales.c: include string.h for memxxx prototypes
9342
9343 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
9344
9345         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
9346         constructor when accessing literal fields.
9347
9348 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
9349
9350         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9351
9352         * reflection.c (assembly_add_resource_manifest): New function to fill
9353         the MANIFESTRESOURCE table.
9354
9355         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
9356
9357         * reflection.h: Update to changes in class layout.
9358
9359         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
9360         Reenable call to mono_runtime_is_shutting_down ().
9361
9362         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
9363         determine if the runtime is shutting down.
9364
9365 2003-12-16  Jackson Harper <jackson@ximian.com>
9366
9367         * icall.c: comment out call to mono_runtime_is_shutting_down to
9368         fix build.
9369         
9370 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
9371
9372         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
9373         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
9374
9375 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
9376
9377         * reflection.c: move definition of swap_with_size
9378         to before its first call
9379
9380 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
9381
9382         * appdomain.c (mono_runtime_is_shutting_down): New public function.
9383
9384         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
9385         icall.
9386
9387         * object.c: Fix warnings.
9388
9389         * icall.c (ves_icall_Type_Get...): Only consider inherited static
9390         members if FlattenHierarchy is set.
9391
9392         * reflection.c (mono_image_add_decl_security): New function to emit
9393         declarative security.
9394
9395         * reflection.h reflection.c: Add support for declarative security.
9396
9397         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9398         
9399 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
9400
9401         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
9402         
9403         * appdomain.c verify.c: Moved corlib version checking into its own
9404         function in appdomain.c since it needs to create vtables etc.
9405
9406 2003-12-13  Patrik Torstensson <p@rxc.se>
9407
9408         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
9409         instead of unwrapped server.
9410
9411 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
9412
9413         * verify.c (check_corlib): Fix field index.
9414
9415 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
9416
9417         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
9418         GetGacPath icall.
9419
9420 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
9421
9422         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
9423         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
9424         cope with sizeof(size_t) != sizeof(guint32).
9425
9426 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9427
9428         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
9429         in case of failure.
9430
9431 2003-12-10  Mark Crichton <crichton@gimp.org>
9432
9433         * icall.c: removed the GetNonZeroBytes.  We now handle this case
9434         in managed code.
9435
9436         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
9437
9438 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
9439
9440         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
9441         marked as deleted.
9442
9443 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
9444
9445         * verify.c (check_corlib): Handle the case when the version field is 
9446         initialized by a static constructor.
9447
9448 2003-12-08  Patrik Torstensson  <p@rxc.se>
9449
9450     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
9451
9452 2003-12-08  Martin Baulig  <martin@ximian.com>
9453
9454         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
9455         a MonoReflectionGenericParameter, also take the parameter index
9456         and name as arguments.
9457         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
9458         (ves_icall_MonoGenericParam_initialize): New interncall.
9459         (ves_icall_Type_make_byref_type): New interncall.
9460
9461         * reflection.h (MonoReflectionGenericParam): Derive from
9462         MonoReflectionType, not just from MonoObject.  Added `refobj' and
9463         `index' fields.
9464
9465         * reflection.c (mono_reflection_define_generic_parameter): Create
9466         and return a new MonoReflectionGenericParam; don't initialize the
9467         constraints here.
9468         (mono_reflection_initialize_generic_parameter): New public method;
9469         initializes the constraints and creates the `param->pklass'.
9470
9471 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
9472
9473         * reflection.h reflection.c: Use the new fields 'num_types', 
9474         'num_fields' and 'num_methods' to track the number of types etc.
9475
9476         * verify.c (check_corlib): Check corlib version number.
9477
9478 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
9479
9480         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
9481         function works on all methods.
9482
9483 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
9484
9485         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
9486         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
9487         the custom_type_info flag of the transparent proxy.
9488         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
9489         objects that supports IRemotingTypeInfo.
9490         * object.h: Added custom_type_info field in transparent proxy.
9491
9492 2003-12-06  Martin Baulig  <martin@ximian.com>
9493
9494         * class.c (mono_class_create_from_generic): Removed.
9495         (mono_class_from_generic): Check `ginst->klass' before doing
9496         anything else.  This is important to fully support "recursive"
9497         generic types.
9498
9499         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
9500         empty `generic_inst->klass' before doing anything else.
9501
9502 2003-12-06  Dick Porter  <dick@ximian.com>
9503
9504         * verify.c: 
9505         * object.h:
9506         * icall.c:
9507         * locales.c: Use C structs to access class fields.  Don't do a
9508         conversion between MonoString and UChar because both are
9509         platform-endian UTF-16.  Compare now takes startindex and count
9510         parameters.  Add a char overload for IndexOf.  Speed up the
9511         invariant string IndexOf.
9512
9513 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
9514
9515         * Makefile.am (monosn_LDADD): Fix parallel build.
9516
9517 2003-12-04  Martin Baulig  <martin@ximian.com>
9518
9519         * icall.c
9520         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
9521         (ves_icall_Type_make_array_type): New interncall.       
9522
9523 2003-12-04  Martin Baulig  <martin@ximian.com>
9524
9525         * locales.c: also change it in the !HAVE_ICU case.
9526
9527 2003-12-04  Dick Porter  <dick@ximian.com>
9528
9529         * icall.c:
9530         * locales.c: construct_compareinfo is now in CompareInfo, not
9531         CultureInfo.
9532
9533 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
9534
9535         * image.c (mono_image_load_file_for_image): Cache loaded images in the
9536         image->files array.
9537
9538         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
9539         table as well.
9540
9541         * assembly.c (mono_assembly_load_references): Only load references
9542         once.
9543
9544         * class.c (mono_class_from_name): Avoid linear search of the 
9545         EXPORTEDTYPE table.
9546
9547         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
9548
9549 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
9550
9551         * image.h (MonoImage): Add 'field_cache' field.
9552
9553         * loader.c (mono_field_from_token): Cache field lookups.
9554         
9555         * reflection.c (mono_module_get_object): Fix name property.
9556
9557         * icall.c (ves_icall_get_enum_info): Update after changes to 
9558         mono_metadata_get_constant_index ().
9559
9560         * icall.c: Get rid of get_type_info icall, use a separate icall for
9561         each type property to avoid needless memory allocations. Fixes #51514.
9562
9563         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
9564         to avoid needless binary searches.
9565
9566         * class.c (class_compute_field_layout): Move the initialization of
9567         field->def_value to mono_class_vtable ().
9568
9569         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
9570         non-corlib types.
9571
9572         * object.c (mono_object_allocate): Make it inline.
9573
9574         * object.c (mono_object_allocate_spec): Make it inline.
9575         
9576 2003-12-02  Dick Porter  <dick@ximian.com>
9577
9578         * locales.c (create_NumberFormat): NumberFormatInfo construction.
9579         Patch by Mohammad DAMT (mdamt@cdl2000.com).
9580
9581 2003-12-01  Dick Porter  <dick@ximian.com>
9582
9583         * threads.c: Fix signature and call in CreateMutex and
9584         CreateEvent.
9585
9586 2003-12-01  Dick Porter  <dick@ximian.com>
9587
9588         * icall.c: 
9589         * locales.c: Implement string compares and searching
9590
9591         * object.h: Add extra Thread field
9592
9593 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
9594
9595         * reflection.c (fixup_method): Add support for MonoCMethod.
9596
9597 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
9598
9599         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
9600
9601         * reflection.c (assembly_name_to_aname): Allow extra characters in
9602         assembly names. Fixes #51468.
9603
9604 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
9605
9606         * exception.c (mono_exception_from_name_domain): New helper function.
9607
9608         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
9609         exception object in the correct domain.
9610
9611         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
9612         formatting + make a copy a the input data.
9613
9614         * loader.c (mono_get_method_from_token): Methods which contain
9615         native code do not have entries in the ImplMap.
9616
9617         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
9618         Thanks to Gonzalo for spotting this.
9619         
9620         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
9621         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
9622
9623         * assembly.h (mono_assembly_load_from): Split the second part of 
9624         assembly loading into a new public function.
9625
9626         * exception.h (mono_get_exception_bad_image_format): New function.
9627
9628 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
9629
9630         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
9631         Enumerate all modules inside a dynamic assembly. Fixes #51293.
9632         
9633         * icall.c: Add new icall for creating dynamic methods.
9634
9635         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
9636
9637         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
9638
9639         * reflection.c (mono_reflection_create_dynamic_method): New icall to
9640         create a dynamic method.
9641
9642         * reflection.c (resolve_object): New helper function.
9643
9644         * reflection.c: Generalize ReflectionMethodBuilder and the functions
9645         which manipulate it so they can also work on dynamic methods.
9646
9647         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
9648         creating the MonoReflectionMethodAux structure if it is not needed.
9649         
9650         * reflection.h verify.c: Update after changes to object layout.
9651
9652         * reflection.c (method_builder_encode_signature): Fix compilation on
9653         gcc 2.95.x.
9654
9655 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
9656
9657         * appdomain.h: Added support for context static fields. Added static_data
9658           field to MonoAppContext and renamed thread_static_fields to a more
9659           generic special_static_fields in MonoAppDomain, since it can now contain
9660           context static fields.
9661         * domain.c: Updated hashtable name.
9662         * object.c: Replaced field_is_thread_static() for a more generic
9663           field_is_special_static() which also checks for context static attribute.
9664           In mono_class_vtable(), added support for static context fields.
9665         * threads.c: Changed methods that manage thread static fields to more
9666           generic methods so they can be reused both for thread and context static
9667           data.
9668         * threads.h: Declared some new methods.
9669
9670 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
9671
9672         * reflection.h: Update after changes to the managed types.
9673
9674         * reflection.c (encode_custom_modifiers): New helper function.
9675
9676         * reflection.c (method_encode_signature): Emit custom modifiers.
9677
9678         * reflection.c (field_encode_signature): Emit custom modifiers.
9679
9680 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
9681
9682         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
9683
9684         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
9685         implementation.
9686
9687         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
9688         icall.
9689
9690         * object.c (mono_field_get_value_object): New function.
9691
9692         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
9693         specific.
9694
9695 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
9696
9697         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
9698         return a preallocated out-of-memory exception instance.
9699
9700         * object.c (out_of_memory): Use the new function.
9701
9702         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
9703         flag is before the custom modifiers. Fixes #49802.
9704
9705 2003-11-16  Martin Baulig  <martin@ximian.com>
9706
9707         * class.c (mono_class_is_open_constructed_type): Implemented the
9708         MONO_TYPE_GENERICINST case.
9709
9710 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
9711
9712         * assembly.c (mono_assembly_fill_assembly_name): New function to
9713         fill out the MonoAssemblyName structure.
9714         (mono_assembly_open): Use the new function.
9715
9716         * icall.c (fill_reflection_assembly_name): New helper function.
9717
9718         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
9719         new function.
9720
9721         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
9722
9723 2003-11-15  Martin Baulig  <martin@ximian.com>
9724
9725         * class.c (mono_class_is_open_constructed_type): New public
9726         function; checks whether a type is an open constructed type,
9727         ie. whether it still contains type parameters.
9728         (mono_class_inflate_generic_type): If we're a type parameter and
9729         the inflated type is also a MONO_TYPE_(M)VAR, return the original
9730         type.
9731
9732         * class.h (MonoGenericInst): Added `guint32 is_open'.
9733
9734         * loader.c (method_from_methodspec): Check whether we're an open
9735         or closed constructed type and set `ginst->is_open'.
9736
9737         * reflection.c (mono_reflection_bind_generic_parameters): Check
9738         whether we're an open or closed constructed type and set
9739         `ginst->is_open'.
9740         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
9741         from open constructed types.
9742
9743 2003-11-15  Martin Baulig  <martin@ximian.com>
9744
9745         * reflection.c (mono_reflection_bind_generic_parameters): If we're
9746         a generic instance (instead of a generic type declaration) with
9747         unbound generic parameters, bind them to our actual types.
9748
9749 2003-11-14  Martin Baulig  <martin@ximian.com>
9750
9751         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
9752
9753         * reflection.c (mono_reflection_bind_generic_parameters): If we're
9754         an interface type, populate `res->interfaces' with instantiated
9755         versions of all the interfaces we inherit.
9756
9757 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
9758
9759         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
9760         when MONO_PATH is set but doesn't contain the install dir.
9761
9762 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9763
9764         * icall.c:
9765         (ves_icall_Type_GetInterfaces): don't return an interface twice when
9766         it's also implemented in base classes. Fixes bug #50927.
9767
9768 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
9769
9770         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
9771         if this method is called from a finalizer. Fixes #50913.
9772
9773 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
9774
9775         * threads.c: Implement VolatileRead/VolatileWrite
9776
9777         * icall.c: Add new icalls for VolatileRead/VolatileWrite
9778
9779 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
9780
9781         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
9782         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
9783         2.95.3.
9784
9785         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
9786         from Peter Ross (pro@missioncriticalit.com).
9787         
9788 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
9789
9790         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
9791
9792 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
9793
9794         * assembly.c (mono_assembly_load_references): Disable check because it
9795         triggers on older corlibs which lots of people have.
9796
9797 2003-11-12  Jackson Harper  <jackson@ximian.com>
9798
9799         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
9800         load corlib.dll if mscorlib.dll is not found.
9801         * assembly.h: Remove corlib name define.
9802         * class.c:
9803         * domain.c:
9804         * image.c: Change corlib name to mscorlib.
9805         
9806 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
9807
9808         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
9809
9810 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
9811
9812         * appdomain.h: Added loader_optimization here to sync with the C#
9813         code, and add disallow_binding_redirects field.
9814
9815 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
9816
9817         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
9818
9819         * reflection.c (mono_image_build_metadata): Fix crash on modules
9820         with no types.
9821
9822         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
9823
9824         * icall.c (ves_icall_get_method_info): Return callingConvention as
9825         well.
9826
9827         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
9828         namespaces from the EXPORTEDTYPE table as well.
9829
9830         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
9831         from all modules inside the assembly.
9832         
9833 2003-11-11  Martin Baulig  <martin@ximian.com>
9834
9835         * reflection.c (mono_reflection_bind_generic_parameters): Make
9836         this work for interfaces.
9837
9838 2003-11-11  Martin Baulig  <martin@ximian.com>
9839
9840         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
9841
9842 2003-11-11  Martin Baulig  <martin@ximian.com>
9843
9844         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
9845         "MonoInflatedMethod" and "MonoInflatedCtor".
9846
9847 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
9848
9849         * reflection.c (resolution_scope_from_image): Use the assembly table
9850         from the manifest module, since other modules don't have it.
9851
9852         * debug-helpers.c (mono_type_full_name): New helper function.
9853
9854         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
9855
9856         * image.c (mono_image_load_file_for_image): New public function which
9857         is a replacement for the load_file_for_image in class.c.
9858
9859         * assembly.c (mono_assembly_load_module): A wrapper for the function
9860         above which does assembly association and reference loading too.
9861
9862         * class.c (mono_class_from_name): Call mono_assembly_load_module.
9863
9864 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9865
9866         * appdomain.c: not all of the attributes for the full assembly name
9867         are required and the order doesn't matter. Fixes bug #50787.
9868
9869 2003-11-10  Dick Porter  <dick@ximian.com>
9870
9871         * locales.c: Use platform-endian UTF16
9872
9873 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
9874
9875         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
9876         
9877 2003-11-10  Martin Baulig  <martin@ximian.com>
9878
9879         * metadata.c
9880         (mono_metadata_load_generic_params): Make this actually work.
9881
9882         * reflection.c (mono_reflection_bind_generic_parameters): If our
9883         parent is a generic instance, pass all the `types' to it, no
9884         matter whether it has the same number of type parameters or not.
9885
9886 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
9887
9888         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
9889
9890         * assembly.c (mono_assembly_load_references): Move the image<->assembly
9891         assignment code to this function so it gets called recursively for all
9892         modules.
9893
9894         * image.c (load_modules): Remove the assembly assignment since it is
9895         now done by mono_assembly_load_references.
9896         
9897         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
9898         Add 'module' argument.
9899         (mono_module_get_types): New helper function.
9900         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
9901
9902 2003-11-08  Martin Baulig  <martin@ximian.com>
9903
9904         * class.c (mono_class_inflate_generic_method): Interface method
9905         don't have a header.
9906
9907         * reflection.c (mono_image_get_methodspec_token): Take an
9908         additional `MonoGenericInst *' argument instead of reading it from
9909         the header; this is necessary to support interfaces.
9910         (mono_image_create_token): Pass the `MonoGenericInst *' from the
9911         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
9912         (inflated_method_get_object): Take an additional `MonoGenericInst *'
9913         argument.
9914
9915         * reflection.h (MonoReflectionInflatedMethod): Added
9916         `MonoGenericInst *ginst'.
9917
9918 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
9919
9920         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
9921
9922 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
9923
9924         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
9925
9926 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
9927
9928         * reflection.c 
9929         (reflection_methodbuilder_from_method_builder):
9930         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
9931         initialize a ReflectionMethodBuilder structure.
9932         (mono_image_get_methodbuilder_token):
9933         (mono_image_get_ctorbuilder_token): New functions to emit memberref
9934         tokens which point to types in another module inside the same assembly.
9935
9936         * reflection.c: Use the new helper functions.
9937         
9938         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
9939
9940         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
9941         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
9942
9943         * reflection.c (resolution_scope_from_image): Emit a moduleref if
9944         neccesary.
9945
9946         * reflection.c (mono_image_build_metadata): Emit metadata only for the
9947         current module. Emit the manifest only for the main module.
9948
9949         * reflection.c (mono_image_create_token): Add assertion when a 
9950         memberref needs to be created.
9951
9952         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
9953
9954         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
9955         larger buffer for the custom attribute blob. Fixes #50637.
9956         
9957 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9958
9959         * threadpool.c: notify listener on async processing handles after
9960         invoking the async callback. Thanks to Zoltan.
9961
9962 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
9963
9964         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
9965         avoid code duplication.
9966
9967         * reflection.h (MonoDynamicImage): New type which is currently unused,
9968         but will be used through the ref.emit code in place of 
9969         MonoDynamicAssembly.
9970
9971         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9972         object layout.
9973
9974         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
9975         a MonoDynamicImage instead of just a MonoImage.
9976         
9977         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
9978         icalls to ModuleBuilder but keep their semantics, so they will work
9979         with moduleb->assemblyb. This will change later.
9980         
9981 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
9982
9983         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
9984         object layout.
9985
9986         * reflection.c (mono_image_build_metadata): Avoid creation of a default
9987         main module, since it is now done by the managed code.
9988
9989 2003-11-03  Martin Baulig  <martin@ximian.com>
9990
9991         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
9992         `ginst->klass' here.
9993         (method_encode_methodspec): Don't use the `ginst->generic_method's
9994         klass if it's a generic instance, use `ginst->klass' in this case.
9995
9996 2003-11-03  Martin Baulig  <martin@ximian.com>
9997
9998         * reflection.c (mono_image_get_generic_method_param_info):
9999         Removed, use mono_image_get_generic_param_info() instead.
10000         (mono_image_get_type_info): Write the GenericParam table before
10001         the Method table.  This is neccessary because in the GenericParam
10002         table, type parameters of the class (ie. '!0' etc.) must come
10003         before the ones from its generic methods (ie. '!!0' etc).
10004
10005 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
10006
10007         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
10008
10009 2003-11-02  Martin Baulig  <martin@ximian.com>
10010
10011         * reflection.c (create_generic_typespec): Take a
10012         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
10013         the generic parameters from it.
10014
10015 2003-11-02  Martin Baulig  <martin@ximian.com>
10016
10017         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
10018         instead of a `MonoClassField *' since we just need the type.
10019         (create_generic_typespec): New static function.  Creates a
10020         TypeSpec token for a generic type declaration.
10021         (mono_image_get_generic_field_token): New static function.
10022         (mono_image_create_token): If we're a FieldBuilder in a generic
10023         type declaration, call mono_image_get_generic_field_token() to get
10024         the token.
10025
10026 2003-11-02  Martin Baulig  <martin@ximian.com>
10027
10028         * reflection.h
10029         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
10030         `MonoReflectionGenericInst *declaring_type' and
10031         `MonoReflectionGenericInst *reflected_type' fields.
10032
10033         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
10034         `MonoReflectionGenericInst *declaring_type' and a
10035         `MonoReflectionGenericInst *reflected_type' argument instead of a
10036         single `MonoReflectionGenericInst *type' one.  Set
10037         `res->declaring_type' and `res->reflected_type' from them.
10038         (mono_reflection_inflate_field): Likewise.      
10039
10040 2003-11-02  Martin Baulig  <martin@ximian.com>
10041
10042         * class.c (mono_class_setup_vtable): Don't store generic methods
10043         in the vtable.  
10044
10045 2003-11-02  Martin Baulig  <martin@ximian.com>
10046
10047         * reflection.h (MonoReflectionGenericInst): Added
10048         `MonoReflectionType *declaring_type'.
10049
10050         * reflection.c (mono_reflection_bind_generic_parameters): Use
10051         `if (tb->parent)' instead of `klass->parent'.
10052
10053 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
10054
10055         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
10056         with an empty ASSEMBLY table.
10057
10058         * reflection.c (mono_image_build_metadata): Avoid using the same loop
10059         variable in the inner and outer loops.
10060
10061 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
10062
10063         * metadata.h (mono_metadata_make_token): Put parentheses around macro
10064         argument.
10065
10066         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
10067         
10068         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
10069         icalls. Instead, do everything in managed code. This is needed since
10070         it is hard to restore the original domain etc. in unmanaged code in the
10071         presence of undeniable exceptions.
10072
10073         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
10074         New icalls to push and pop appdomain refs.
10075
10076 2003-10-31  Martin Baulig  <martin@ximian.com>
10077
10078         * class.c (inflate_generic_type): Renamed to
10079         mono_class_inflate_generic_type() and made it public.
10080
10081         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
10082         New interncall.
10083
10084         * loader.c (mono_field_from_memberref): Also set the retklass for
10085         typespecs.
10086
10087         * fielder.c (mono_image_get_inflated_field_token): New static
10088         method; creates a metadata token for an inflated field.
10089         (mono_image_create_token, fixup_method): Added support for
10090         "MonoInflatedField".
10091         (fieldbuilder_to_mono_class_field): New static function.
10092         (mono_reflection_inflate_field): New public function.
10093
10094         * reflection.h
10095         (MonoReflectionGenericInst): Added `MonoArray *fields'.
10096         (MonoReflectionInflatedField): New typedef.     
10097
10098 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
10099
10100         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
10101         for Solaris and other platforms without s6_addr16
10102
10103 2003-10-30  Martin Baulig  <martin@ximian.com>
10104
10105         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
10106         argument instead of two.
10107         (mono_class_inflate_generic_signature): Likewise.
10108         (inflate_generic_header): Likewise.
10109         (mono_class_inflate_generic_method): Likewise.  In addition, if
10110         `ginst->klass' is set, it becomes the new `method->klass'.
10111
10112         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
10113         field.
10114
10115         * reflection.c (encode_generic_method_sig): Write a 0xa as the
10116         first byte. [FIXME]
10117         (method_encode_methodspec): If we have generic parameters, create
10118         a MethodSpec instead of a MethodRef.
10119         (fixup_method): Added support for "MonoInflatedMethod" and
10120         "MonoInflatedCtor".
10121         (mono_image_create_token): Added support for "MonoInflatedMethod"
10122         and "MonoInflatedCtor".
10123         (inflated_method_get_object): New static function; returns a
10124         managed "System.Reflection.MonoInflatedMethod" object.
10125         (mono_reflection_bind_generic_method_parameters): Return a
10126         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
10127         (mono_reflection_inflate_method_or_ctor): Likewise.
10128         (mono_image_get_generic_method_param_info): Initialize unused
10129         fields to zero.
10130         (mono_image_get_generic_param_info): Likewise.
10131
10132         * reflection.h (MonoReflectionInflatedMethod): New public
10133         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
10134         "S.R.MonoInflatedCtor" classes.
10135
10136         * loader.c (method_from_memberref): If we're a TypeSpec and it
10137         resolves to a generic instance, inflate the method.
10138
10139 2003-10-28  Dick Porter  <dick@ximian.com>
10140
10141         * object.c (mono_runtime_run_main): Convert command-line arguments
10142         into utf8, falling back to the user's locale encoding to do so.
10143
10144 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
10145
10146         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
10147         at this time.
10148
10149         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
10150
10151         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
10152         up icalls at method definition time. Partially fixes #33569.
10153
10154 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
10155
10156         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
10157         marshalling of arrays. Fixes #50116.
10158
10159         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
10160
10161         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
10162         points to a vtable in the dying appdomain.
10163
10164         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
10165         listeners into unmanaged code inside the lock.
10166
10167         * object.c (mono_class_vtable): Turn off typed allocation in non-root
10168         domains and add some comments.
10169
10170 2003-10-25  Martin Baulig  <martin@ximian.com>
10171
10172         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
10173
10174         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
10175
10176         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
10177         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
10178         currently parsing.  Create the generic class and store it in
10179         `generic_inst->klass' before parsing the type arguments.  This is
10180         required to support "recursive" definitions; see mcs/tests/gen-23.cs
10181         for an example.
10182         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
10183         to support recursive typespec entries.
10184
10185         * class.c (mono_class_setup_parent): If our parent is a generic
10186         instance, we may get called before it has its name set.
10187         (mono_class_from_generic): Splitted into
10188         mono_class_create_from_generic() and mono_class_initialize_generic().
10189
10190 2003-10-25  Martin Baulig  <martin@ximian.com>
10191
10192         * icall.c (ves_icall_Type_BindGenericParameters): Return a
10193         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
10194         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
10195         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
10196
10197         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
10198         (create_typespec): Likewise.
10199         (mono_reflection_bind_generic_parameters): Return a
10200         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
10201         (mono_reflection_inflate_method_or_ctor): New public function.
10202
10203         * reflection.h (MonoReflectionGenericInst): New typedef.        
10204
10205 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
10206
10207         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
10208         inside the domain lock. Fixes #49993.
10209         
10210         * object.c (mono_class_vtable): When typed allocation is used, 
10211         allocate vtables in the GC heap instead of in the mempool, since the
10212         vtables contain GC descriptors which are used by the collector even
10213         after the domain owning the mempool is unloaded.
10214
10215         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
10216
10217         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
10218         reflect what it does. Also invalidate mempools instead of freeing
10219         them if a define is set.
10220
10221         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
10222         of the appdomain.
10223         
10224         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
10225         hold the finalizable objects in this domain.
10226
10227         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
10228         appdomain.
10229
10230         * appdomain.c (mono_domain_set): New function to set the current
10231         appdomain, but only if it is not being unloaded.
10232
10233         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
10234         appdomain which is being unloaded.
10235         
10236         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
10237         unloading of the root appdomain.
10238
10239         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
10240         icall to execute a method in another appdomain. Intended as a 
10241         replacement for InternalSetDomain, which can confuse the code 
10242         generation in the JIT.
10243
10244         * appdomain.c (mono_domain_is_unloading): New function to determine
10245         whenever an appdomain is unloading.
10246
10247         * appdomain.c (mono_domain_unload): New function to correctly unload
10248         an appdomain.
10249
10250         * assembly.c (mono_assembly_load_references): Check that an assembly
10251         does not references itself.
10252
10253         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
10254         domain manually, it asks the finalizer thread to do it, then waits for
10255         the result. Also added a timeout.
10256
10257         * icall.c: Register the new icalls.
10258
10259         * threads.h threads.c: Export the mono_gc_stop_world and 
10260         mono_gc_start_world functions.
10261         
10262         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
10263         function to fill out the mempool with 0x2a.
10264
10265 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
10266
10267         * reflection.h (MonoReflectionMethodAux): New structure to store
10268         information which is rarely used, thus is not in the MonoMethod
10269         structure.
10270
10271         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
10272         store the aux info.
10273
10274         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
10275         and marshalling info into the aux structure.
10276
10277         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
10278         from the aux structure.
10279
10280         * loader.c (mono_method_get_param_names): Retrieve the param names from
10281         the aux structure.
10282         
10283 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * exception.h exception.c: Add AppDomainUnloadedException && fix 
10286         warning.
10287
10288 2003-10-21  Dick Porter  <dick@ximian.com>
10289
10290         * socket-io.c
10291         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
10292         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
10293
10294 2003-10-21  Martin Baulig  <martin@ximian.com>
10295
10296         * reflection.c (mono_reflection_bind_generic_parameters):
10297         `klass->parent' is NULL for interfaces.
10298
10299 2003-10-21  Martin Baulig  <martin@ximian.com>
10300
10301         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10302
10303 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
10304
10305         * exception.c (mono_exception_from_name_msg): New helper function for
10306         creating exceptions and initializing their message field.
10307
10308         * exception.c: Simplify functions using the new helper.
10309
10310         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
10311         New function.
10312
10313         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
10314         mono_raise_exception, since otherwise gcc doesn't generate the function
10315         epilog for raise_exception, confusing the stack unwinding in the JIT.
10316         Fixes #45043.
10317
10318         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
10319         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
10320         Fixes #49499.
10321
10322 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10323
10324         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
10325         utf8.
10326
10327 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
10328
10329         * icall.c: Removed GetUninitializedObject method because
10330           AllocateUninitializedClassInstance does the same.
10331
10332 2003-10-18  Martin Baulig  <martin@ximian.com>
10333
10334         * class.c (inflate_generic_signature): Renamed to
10335         mono_class_inflate_generic_signature() and made it public.
10336         (my_mono_class_from_generic_parameter): New static function; if we
10337         don't already have the generic parameter's MonoClass, create a
10338         very simple one which is just used internally in the runtime and
10339         not passed back to managed code.
10340
10341         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
10342
10343         * metadata.h (MonoMethodSignature): Moved the
10344         `MonoGenericParam *gen_params' to the MonoMethodHeader.
10345         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
10346
10347         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
10348         ves_icall_MonoMethod_GetGenericArguments(); this is now an
10349         interncall on the MonoMethod class, not on MethodInfo.
10350         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
10351         calling mono_reflection_bind_generic_method_parameters() directly.
10352
10353         * loader.c (mono_method_get_signature): If this is a MethodSpec;
10354         return the already computed `method->signature'.
10355         (method_from_methodspec): New static function to load a method
10356         from a MethodSpec entry.
10357         (mono_get_method_from_token): Call the new method_from_methodspec()
10358         for MethodSpec tokens.  
10359         (mono_get_method_from_token): If we're a generic method, load the
10360         type parameters.
10361
10362         * reflection.c (mono_image_get_memberref_token): Allow
10363         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
10364         table.
10365         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
10366         (mono_image_create_token): First check whether it's a generic
10367         method (so we'd need to create a MethodSpec), then do the other
10368         two alternatives.
10369         (mono_reflection_bind_generic_method_parameters): Return a
10370         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
10371         called directly from the interncall.
10372
10373 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
10374
10375         * reflection.c (load_public_key): Move loading of the public key
10376         into managed code.
10377
10378         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
10379
10380         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
10381         fields.
10382
10383         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
10384         culture, hash_alg and public_key. Fixes #49555.
10385
10386 2003-10-17  Martin Baulig  <martin@ximian.com>
10387
10388         * class.h (MonoGenericInst): Moved this declaration here and added
10389         `MonoMethod *generic_method'.
10390
10391         * icall.c
10392         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
10393         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
10394
10395         * metadata.c (mono_metadata_type_equal): Two types of
10396         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
10397         index; ie. don't compare the address of the `MonoGenericParam'
10398         structure.
10399         (mono_metadata_load_generic_params): Removed the `MonoMethod
10400         *method' argument.
10401
10402         * metadata.h (MonoGenericInst): Moved declaration to class.h.
10403         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
10404
10405         * reflection.c (method_encode_signature): Encode the number of
10406         generic parameters.
10407         (encode_generic_method_sig): New static function.
10408         (method_encode_methodspec): New static function; creates an entry
10409         in the MethodSpec table for a generic method.
10410         (mono_image_get_methodspec_token): New static function.
10411         (mono_image_create_token): Call mono_image_get_methodspec_token()
10412         for generic methods.
10413         (mono_reflection_bind_generic_method_parameters): New public
10414         function.  Instantiates a generic method.
10415
10416 2003-10-16  Martin Baulig  <martin@ximian.com>
10417
10418         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
10419         *gen_params' here from MonoMethodHeader.
10420
10421         * metadata.c (mono_metadata_parse_method_signature): If we have
10422         generic parameters, initialize `method->gen_params' and then set
10423         the correct `type->data.generic_param' in all the parameters.
10424
10425 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
10426
10427         * threads.c (mono_threads_get_default_stacksize): New function to 
10428         return the default stacksize.
10429
10430         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
10431         termination of the finalizer thread, since the previous method had
10432         race conditions. Fixes #49628.
10433
10434         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
10435         as for the other managed threads.
10436
10437 2003-10-16  Martin Baulig  <martin@ximian.com>
10438
10439         * class.c (inflate_generic_signature): Copy `generic_param_count'
10440         and `gen_params'.
10441
10442         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
10443         New interncall.
10444
10445         * metadata.c (mono_metadata_parse_method_signature): Actually set
10446         the `method->generic_param_count' here.
10447         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
10448
10449 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
10450
10451         * object.h: Add a new field to TypedRef to simplify the implementation
10452         of the REFANY opcodes in the JIT.
10453
10454         * icall.c: Make use of the new field.
10455
10456         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
10457         dynamically.
10458
10459 2003-10-15  Martin Baulig  <martin@ximian.com>
10460
10461         * class.c (mono_class_from_gen_param): Renamed to
10462         mono_class_from_generic_parameter() and moved most of the
10463         functionality from mono_reflection_define_generic_parameter()
10464         here; ie. we create a "real" class here.
10465         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
10466         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
10467         previously been called.
10468
10469         * class.h (MonoGenericParam): Moved the declaration of this struct
10470         here from metadata.h and added `MonoMethod *method'.
10471
10472         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
10473         interncall.
10474
10475         * loader.c (mono_get_method_from_token): If we have any generic
10476         parameters, call mono_metadata_load_generic_params() to read them
10477         from the MONO_TABLE_GENERICPAR.
10478
10479         * metadata.c (mono_metadata_load_generic_params): Added
10480         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
10481
10482         * metadata.h (MonoMethodSignature): Replaced
10483         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
10484         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
10485
10486         * reflection.c (mono_reflection_define_generic_parameter): Moved
10487         most of the functionality into the new
10488         mono_class_from_generic_parameter(); set the `method' field if
10489         we're a method parameter.       
10490
10491 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
10492
10493         * marshal.c (emit_struct_conv): if native size is 0
10494         emit no code.
10495
10496 2003-10-14  Martin Baulig  <martin@ximian.com>
10497
10498         * icall.c: The generics API has changed in the spec since it was
10499         added to System.Type; these modifications make it match the spec
10500         again.
10501         (ves_icall_Type_GetGenericParameters): Renamed to
10502         `ves_icall_Type_GetGenericArguments'.
10503         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
10504         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
10505         `ves_icall_MonoType_get_HasGenericArguments'.
10506         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
10507         `ves_icall_MonoType_get_IsGenericParameter'.
10508         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
10509         this is no interncall anymore.
10510         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
10511         `ves_icall_TypeBuilder_get_IsGenericParameter'.
10512
10513 2003-10-14  Martin Baulig  <martin@ximian.com>
10514
10515         * reflection.c (mono_reflection_bind_generic_parameters): Also
10516         inflate generic methods if we're reading the class from IL.
10517
10518 2003-10-13  Martin Baulig  <martin@ximian.com>
10519
10520         * reflection.c (mono_reflection_define_generic_parameter): This
10521         method isn't called directly from the icall anymore; take a
10522         `MonoReflectionAssemblyBuilder *' so we can use this for type and
10523         method generic parameters.
10524         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
10525         (method_builder_encode_signature): Encode generic parameters.
10526         (mono_image_get_method_info): Write generic params to the
10527         MONO_TABLE_GENERICPARAM table.
10528
10529         * reflection.h (MonoReflectionMethodBuilder): Added
10530         `MonoArray *generic_params'.
10531
10532         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
10533
10534         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
10535         wrapper for mono_reflection_define_generic_parameter().
10536         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
10537
10538 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
10539
10540         * marshal.h: Add missing function to fix build.
10541
10542         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
10543         the SetLastError pinvoke attribute.
10544
10545         * marshal.c (mono_marshal_set_last_error): New helper function called
10546         by the generated code.
10547         
10548         * marshal.c (mono_mb_emit_branch): New helper function.
10549
10550         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
10551
10552         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
10553         classes as parameters and return values of delegates. Fixes #29256. 
10554
10555 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
10556
10557         * locales.c: use gint32 in non HAVE_ICU case
10558
10559 2003-10-11  Martin Baulig  <martin@ximian.com>
10560
10561         * mono-debug.c (mono_debug_add_method): Added a workaround for
10562         bug #48591.
10563
10564 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
10565
10566         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
10567         delegates passed to native code must use the STDCALL calling 
10568         convention. Fixes #35987.
10569
10570 2003-10-10  Martin Baulig  <martin@ximian.com>
10571
10572         * class.c (inflate_generic_type): If we're inflating for a generic
10573         type instance (and not for a generic method), return
10574         MONO_TYPE_MVAR unchanged.
10575
10576 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10577
10578         * string-icalls.c: Join ignores null strings in the source array.
10579         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
10580         * threads.c: GetAvailableTheads is slightly more accurate.
10581
10582 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
10583
10584         * threads.h threads.c : add mono_threads_set_default_stacksize
10585         and pass default to CreateThread calls.
10586
10587 2003-10-09  Dick Porter  <dick@ximian.com>
10588
10589         * icall.c:
10590         * locales.h:
10591         * locales.c: Internal calls for constructing CultureInfo and
10592         related objects from libicu (if its available.)
10593
10594 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
10595
10596         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
10597
10598 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10599
10600         * threadpool.c: added an argument to async_invoke_thread that is the
10601         item to process, pass the MonoAsyncResult to the thread start function
10602         when creating a new thread. This way we don't need to acquire any lock
10603         when we're creating a new thread. Readded a semaphore for faster
10604         response times (instead of that Sleep i added).
10605
10606 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
10607
10608         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10609         get daylight change dates better on Windows, fix handling
10610         of platforms without tm_gmtoff.
10611
10612 2003-10-06  Martin Baulig  <martin@ximian.com>
10613
10614         * class.c (inflate_generic_method): Renamed to
10615         mono_class_inflate_generic_method() and made public.
10616         (mono_class_init): Don't inflate the generic methods here.
10617         (mono_class_from_generic): Added `gboolean inflate_methods'
10618         argument.  Inflate the methods here.
10619
10620         * loader.c (mono_method_get_param_names): Ignore instances of
10621         generic types for the moment.
10622
10623         * reflection.c (fixup_method): Added support for inflated methods.
10624         (mono_image_create_token): Use mono_image_get_methodref_token()
10625         for inflated methods.
10626         (mono_custom_attrs_from_param): Ignore instances of generic types
10627         for the moment.
10628         (mono_reflection_bind_generic_parameters): New public function.
10629         Moved all the functionality from
10630         ves_icall_Type_BindGenericParameters() here and added support for
10631         dynamic types.
10632         (mono_reflection_define_generic_parameter): Initialize
10633         `klass->methods' here.
10634
10635         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
10636         functionality into mono_reflection_define_generic_parameter().
10637         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
10638         TypeBuilder, return that TypeBuilder.
10639
10640 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10641
10642         * appdomain.c: removed mono_delegate_semaphore.
10643
10644         * threadpool.c:
10645         (mono_thread_pool_add): moved hash table creation inside and the thread 
10646         creation outside of the critical region.
10647         (mono_thread_pool_finish): removed obsolete code.
10648         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
10649         continue or exit the thread depending on the queue.
10650
10651 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
10652
10653         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
10654         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
10655         handle more bool marshalling options
10656
10657 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
10658
10659         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
10660         arrays of structs. Also add a more descriptive error message when
10661         a structure member is marshalled as LPArray.
10662
10663 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
10664
10665         * marshal.c (mono_marshal_get_native_wrapper): Add support for
10666         marshalling arrays of complex types. Fixes #29098. Also remove an
10667         usused and incomplete function.
10668
10669 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
10670
10671         * gc.c: report heap_size - free_bytes as total memory allocated
10672         (bug#49362).
10673
10674 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
10675
10676         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
10677         fix timezone handling problems on Windows.
10678         
10679         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
10680         asserts when the year is outside the range handled by ms the functions.
10681
10682         * class.c (setup_interface_offsets): If the class is an interface,
10683         fill out its interface_offsets slot.
10684
10685 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10686
10687         * threadpool.c: mark threadpool threads as background.
10688
10689 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
10690
10691         * decimal.c - define DECINLINE to nothing if not using GCC
10692
10693 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
10694
10695         * assembly.c: More refcount fixes.
10696
10697 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10698
10699         * string-icalls.c: if we're not trimming, return the same string.
10700         When not splitting, don't create a new string.
10701
10702 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10703
10704         * image.c:
10705         (mono_image_open): increment the ref_count inside the critical section.
10706
10707 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
10708
10709         * image.c (mono_image_open): Fix reference counting bug.
10710
10711 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
10712
10713         * marshal.c (mono_marshal_type_size) struct alignment changed for 
10714         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
10715         64bits. Avoid leak in mono_marshal_get_native_wrapper when
10716         mono_lookup_pinvoke_call throws.        
10717
10718 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
10719
10720         * reflection.c (mono_reflection_parse_type): Fix #49114.
10721
10722         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
10723         temporary workaround for cygwin header problem.
10724
10725         * object.c (mono_object_isinst): Synchronize this with the code
10726         generated by the JIT for casts.
10727
10728 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
10729
10730         * reflection.c (encode_type): Fix #38332.
10731
10732 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
10733
10734         * marshal.c (mono_marshal_method_from_wrapper): New function to return
10735         the original method from the wrapper method.
10736
10737 2003-09-25  Martin Baulig  <martin@ximian.com>
10738
10739         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
10740         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
10741         (ves_icall_Type_get_IsGenericInstance): New interncall.
10742
10743 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
10744
10745         * object.c: fix cast warning in big endian code.
10746
10747 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
10748
10749         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
10750         
10751 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10752
10753         * assembly.c: don't call check_env from mono_assembly_load. It's
10754         already done once in mono_assemblies_init and may cause headaches when
10755         multiple threads are loading assemblies.
10756
10757 2003-09-19  Martin Baulig  <martin@ximian.com>
10758
10759         * reflection.c (mono_reflection_define_generic_parameter): Don't
10760         allocate `klass->methods', set `klass->flags' to
10761         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
10762
10763 2003-09-18  Martin Baulig  <martin@ximian.com>
10764
10765         * class.c (mono_class_init): Don't create `class->methods' if it's
10766         already initialized.
10767
10768         * metadata.c (mono_metadata_load_generic_params): Make this
10769         actually work.
10770
10771         * reflection.c (mono_reflection_define_generic_parameter): Set
10772         parent class and interfaces from the constraints.
10773
10774         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
10775         to keep this struct in sync with the declaration in TypeBuilder.cs.
10776
10777 2003-09-17  Martin Baulig  <martin@ximian.com>
10778
10779         * metadata.h (MonoType): Replaced the data's `int type_param'
10780         field with `MonoGenericParam *generic_param'.
10781         (MonoGenericParam): Added `MonoClass *klass'.
10782
10783         * class.c (mono_class_from_gen_param): Removed the
10784         `MonoImage *image' and `int type_num' arguments.
10785
10786         * metadata.c (mono_metadata_parse_generic_param): New static
10787         method; creates a MonoGenericParam which just contains the index.
10788         (do_mono_metadata_parse_type): Call
10789         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
10790         MONO_TYPE_MVAR.
10791
10792         * reflection.c (mono_image_typedef_or_ref): Generic type
10793         parameters may be in the same assembly, but never use a typedef
10794         for them.
10795         (mono_reflection_define_generic_parameter): We're now creating a
10796         "real" class for the type parameter; it's now safe to call
10797         mono_class_from_mono_type() on the class'es type, it'll do the
10798         right thing.
10799
10800 2003-09-16  Martin Baulig  <martin@ximian.com>
10801
10802         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
10803         `symfile->range_entry_size' and `symfile->class_entry_size' here;
10804         the `symfile' data structure must be fully initialized before it
10805         gets added to the table.
10806
10807 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
10808
10809         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
10810
10811         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
10812         class init trampolines.
10813
10814 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
10815
10816         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
10817         to the built-in profiler to turn off time and allocation profiling
10818         respectively.
10819
10820 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
10821
10822         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
10823         g_direct_equal.
10824
10825         * debug-helpers.c (mono_method_full_name): Print the wrapper type
10826         in human readable form.
10827
10828 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
10829
10830         * reflection.c icall.c: Fixed warnings.
10831
10832         * image.c (load_class_names): Use a temporary hash table to hold the
10833         namespaces in order to avoid doing many string comparisons.
10834
10835         * image.h: Fix typo.
10836
10837         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
10838         Pass NULL instead of g_direct_equal to the GHashTable constructor 
10839         since the NULL case is short-circuited inside g_hash_table_lookup, 
10840         leading to better performance.  
10841
10842         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
10843         obtain the first custom attribute for a given index. Depends on the
10844         CustomAttribute table being sorted by the parent field.
10845
10846         * reflection.c (mono_custom_attrs_from_index): Use the new function 
10847         for better performance.
10848
10849 2003-09-07  Martin Baulig  <martin@ximian.com>
10850
10851         * class.c (mono_class_init): If we're a generic instance, inflate
10852         all our methods instead of loading them from the image.
10853         (mono_class_from_generic): Set `class->methods = gklass->methods'.
10854
10855 2003-09-07  Martin Baulig  <martin@ximian.com>
10856
10857         * mono-debug-debugger.c: Added support for constructors.
10858
10859 2003-09-06  Martin Baulig  <martin@ximian.com>
10860
10861         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
10862         New interncall.
10863
10864         * reflection.c (mono_reflection_setup_generic_class): Call
10865         ensure_runtime_vtable() to create the vtable.
10866
10867 2003-09-05  Martin Baulig  <martin@ximian.com>
10868
10869         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
10870         MONO_TYPE_MVAR.
10871
10872 2003-09-04  Martin Baulig  <martin@ximian.com>
10873
10874         * reflection.c (mono_reflection_define_generic_parameter): Generic
10875         parameters start with zero.
10876
10877 2003-09-04  Martin Baulig  <martin@ximian.com>
10878
10879         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
10880
10881         * reflection.h (MonoReflectionGenericParam): New typedef.
10882         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
10883         the generic parameters from the managed TypeBuilder.
10884
10885         * reflection.c (mono_reflection_define_generic_parameter): New function.
10886         (mono_reflection_create_runtime_class): Encode generic parameters.
10887         (mono_reflection_setup_generic_class): New function; this is
10888         called after adding adding all generic params to the TypeBuilder.
10889         (encode_type): Added MONO_TYPE_VAR.
10890
10891 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
10892
10893         * class.h class.c (mono_class_needs_cctor_run): Moved this method
10894         here from the JIT.
10895
10896         * assembly.h assembly.c: Moved the AOT loading code into an assembly
10897         load hook.
10898
10899 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
10900
10901         * reflection.h reflection.c class.h class.c: Delete duplicate 
10902         definition of mono_type_get_name () from reflection.c and export the
10903         one in class.c.
10904
10905         * class.c: Class loading fixes from Bernie Solomon 
10906         (bernard@ugsolutions.com).
10907
10908         * reflection.c: Endianness fixes from Bernie Solomon 
10909         (bernard@ugsolutions.com).
10910         
10911 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
10912
10913         * assembly.h assembly.c: Define a file format version for AOT
10914         libraries.
10915         
10916         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
10917
10918         * appdomain.h (MonoJitInfo): New field to determine whenever the
10919         code is domain neutral.
10920         
10921 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
10922
10923         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
10924
10925 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
10926
10927         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
10928         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
10929         Avoid caching the result since strings must be domain specific. Fixes
10930         #48050.
10931
10932 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
10933
10934         * marshal.c (mono_marshal_init): Make this callable multiple times
10935         since it is hard to find a correct place to call it.
10936
10937         * object.c (mono_runtime_class_init): Execute static constructors in
10938         the correct appdomain.
10939
10940         * image.c (build_guid_table): Handle the case when multiple images have
10941         the same GUID.
10942
10943 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10944
10945         * icall.c: added a couple of icalls for System.Web.
10946
10947 2003-08-28  Martin Baulig  <martin@ximian.com>
10948
10949         * icall.c (ves_icall_Type_BindGenericParameters): Use
10950         `klass->generic_inst' instead of `&klass->byval_arg' in the
10951         mono_type_get_object() call.  The returned type must be
10952         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
10953
10954 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
10955
10956         * NOTES: New file.
10957
10958         * object.c (mono_class_proxy_vtable): Make it thread safe.
10959
10960         * pedump.c: Fix warning.
10961
10962         * object.c appdomain.h: Get rid of metadata_section. 
10963         It is no longer needed and it was causing deadlocks with domain->lock.
10964
10965         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
10966
10967 2003-08-26  Martin Baulig  <martin@ximian.com>
10968
10969         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
10970
10971 2003-08-26  Martin Baulig  <martin@ximian.com>
10972
10973         * pedump.c (main): Call mono_metadata_init(),
10974         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
10975         and mono_loader_init().
10976
10977 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
10978
10979         * loader.h: Add missing include to fix build.
10980
10981         * image.h: mono_image_load_references is no more.
10982
10983         * assembly.c: Reworked assembly loading to make it really thread safe.
10984         After these changes, the assembly returned by mono_assembly_open is
10985         fully initialized, i.e. all its references assemblies are loaded.
10986
10987         * assembly.c (mono_image_load_references): Renamed to 
10988         mono_assembly_load_references, and made private, since clients no
10989         longer need to call it.
10990
10991         * class.c: Removed calls to mono_assembly_load_references, since it was
10992         a source of deadlocks.
10993
10994         * loader.h loader.c class.h class.c: Protect data structures using a 
10995         new lock, the loader lock.
10996
10997         * class.c (mono_class_setup_vtable): Create temporary hash tables and
10998         GPtrArrays only when needed.
10999
11000         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
11001         into empty structures by mcs. Fixes pinvoke7.cs.
11002         
11003         * domain.c (mono_init): Call a new initialization function.
11004
11005         * appdomain.c (mono_runtime_init): Call the new initializer function
11006         of the marshal module.
11007
11008         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
11009         inserted into empty structures by mcs. Fixes pinvoke7.cs.
11010
11011         * marshal.h marshal.c: Added locks around the wrapper caches to make
11012         this module thread safe.
11013
11014         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
11015         this argument. Fixes pinvoke1.exe.
11016
11017 2003-08-25  Lluis Sanchez <lluis@ximian.com>
11018
11019         * object.h: Added call_type field to MonoMethodMessage and the corresponding
11020         enumeration of values. Removed fields to store remote call output values in
11021         MonoAsyncResult. Not needed any more.
11022         * object.c: Initialize call_type and async_result fields in mono_message_init.
11023         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
11024         dispatching the message.
11025         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
11026         async call to finish. To do it use a message with EndInvoke call type.
11027
11028 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
11029
11030         * loader.h loader.c (mono_method_hash_marhal_info): New function which
11031         determines whenever a method has marshalling info.
11032
11033 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11034
11035         * assembly.c: fix the build on windows.
11036
11037 2003-08-22 Lluis Sanchez <lluis@ximian.com>
11038
11039         * object.cs: Fixed bug #47785.
11040
11041 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
11042
11043         * string-icalls.c (StringReplace): If their are no occurances of
11044         the old string found return a reference to the supplied
11045         string. This saves some memory and matches MS behavoir.
11046         
11047 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11048
11049         * socket-io.c: fixed compilation for systems that define AF_INET6
11050         and don't define SOL_IP/SOL_IPV6.
11051
11052 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
11053
11054         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
11055         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
11056
11057         * rawbuffer.c rawbuffer.h: Make this module thread safe.
11058
11059         * domain.c: Make this module thread safe.
11060
11061         * domain.c (mono_init): Call new initialization function.
11062
11063         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
11064         reference types too. Fixes #38812.
11065
11066         * image.c (mono_image_init): Fixed warnings.
11067
11068         * class.c (mono_class_from_typeref): Handle assembly load failure
11069         correctly.
11070
11071         * appdomain.c (add_assemblies_to_domain): Handle the case when
11072         the references of an assembly are not yet loaded.
11073
11074         * metadata.c image.c assembly.c: Moved initialization of global
11075         variables to a separate function called at startup since lazy 
11076         initialization of these variables is not thread safe.
11077         
11078         * image.c assembly.c: Made this module thread safe by adding locks in 
11079         the appropriate places.
11080
11081         * domain.c (mono_init): Call the new initialization functions of the
11082         three modules.
11083
11084 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
11085
11086         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
11087           make a direct call. It is proxy's work to make the call asynchronous.
11088           mono_delegate_end_invoke(): If the targe is a proxy, just collect
11089           the return values.
11090         * object.cs: mono_method_call_message_new(): read AsyncResult and
11091           state object from parameters list, if this info is requested.
11092         * object.h: Added fields to store remote call output values in
11093           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
11094
11095 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11096
11097         * object.h: add needed fields to MonoThread.
11098         * threads.c, threads.h: allow registering a function to cleanup data
11099         allocated per thread by the JIT.
11100
11101 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11102
11103         * loader.h: portability fix by Bernie Solomon
11104         * <bernard@ugsolutions.com>.
11105
11106 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
11107
11108         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
11109         return a MonoArray. This simplifies the code and also ensures that
11110         the cache allways contains an object reference as a value.
11111
11112         * icall.c (ves_icall_get_parameter_info): Simplified using the new
11113         function.
11114
11115 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11116
11117         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
11118         fixes a problem with byte ordering when getting the address family for
11119         a socket.
11120
11121 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
11122
11123         * .cvsignore: Added monosn.
11124
11125         * reflection.h reflection.c loader.c: Added support for parameter
11126         marshalling to dynamically created types. Fixes #47295.
11127
11128 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
11129
11130         * rand.c: remove useless warnings.
11131
11132 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11133
11134         * class.c: implemented ldtoken for methods and fieldrefs.
11135
11136 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11137
11138         * threadpool.c: when mono_async_invoke was called, no one took care of
11139         monitoring the queue. So if the method invoked took some time and we
11140         got new async invoke requests after 500 ms (the thread created waited
11141         that long in WaitForSingleObject), the new async invoke was not called
11142         until the previous one finished.
11143
11144         This is fixed now. Thanks to Totte for helping with it.
11145
11146 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11147
11148         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
11149
11150 2003-08-11  Martin Baulig  <martin@ximian.com>
11151
11152         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
11153
11154 2003-08-06  Martin Baulig  <martin@ximian.com>
11155
11156         * mono-debug-debugger.c: Added support for static fields,
11157         properties and methods.
11158
11159 2003-08-06  Martin Baulig  <martin@ximian.com>
11160
11161         * mono-debug-debugger.c: Don't store the MonoString's vtable to
11162         make this work for applications with multiple application domains.
11163
11164 2003-08-04  Martin Baulig  <martin@ximian.com>
11165
11166         * mono-debug-debugger.c: Completely reworked the type support; the
11167         most important thing is that we're now just using one single
11168         `MonoType' instance per type.
11169
11170 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
11171
11172         * mono-endian.h, mono-endian.c, icall.c: Added icall
11173         ves_icall_System_Double_AssertEndianity to assert double word endianity
11174         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
11175
11176 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11177
11178         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
11179         support, icalls and fixes.
11180
11181 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
11182
11183         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
11184         classes that are a punctuation character in .NET is not the same a
11185         g_unichar_ispunct.
11186
11187 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11188
11189         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
11190
11191 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
11192
11193         * icall.c: Add new MemCopy internalcall.
11194         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
11195         Simplified code; It is not necessary to handle all the cases here,
11196         as the C# code takes care of it.  Only handle the case of the name
11197         resource embedded into the assembly.
11198
11199         Changed signature to return the data pointer and the size of the
11200         data. 
11201
11202 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
11203
11204         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
11205         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
11206
11207 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
11208
11209         * socket-io.c: ignore EINTR error in select.
11210
11211 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11212
11213         * class.h, class.c: removed unused subclasses field in MonoClass.
11214
11215 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
11216
11217         * icall.c: improve fix of get_base_definition(). If the parent class
11218           doesn't have the mehod, look at the parent of the parent.
11219         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
11220           to check if a parameter is an in or out parameter
11221           (PARAM_ATTRIBUTE_IN is not set by default).
11222           mono_method_return_message_restore(): Use mono_class_value_size to
11223           get the size of a value type. mono_type_stack_size (parameterType)
11224           does not return the correct value if parameterType is byRef.
11225           mono_load_remote_field(), mono_load_remote_field_new(),
11226           mono_store_remote_field(), mono_store_remote_field_new():
11227           raise exception if the remote call returns an exception.
11228
11229 2003-07-28  Martin Baulig  <martin@ximian.com>
11230
11231         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
11232         method.  This is a wrapper around mono_runtime_invoke() which
11233         boxes the instance object if neccessary.
11234
11235 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11236
11237         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
11238         metadata.h, row-indexes.h, verify.c: first cut of generics support.
11239
11240 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11241
11242         * icall.c: disable mcs bug workaround.
11243
11244 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
11245
11246         * object.c (mono_runtime_class_init): Take the metadata_section
11247         mutex before obtaining the domain mutex.
11248
11249         * appdomain.h: Added definition of metadata_section mutex here. 
11250
11251         * object.c: define metadata_mutex here.
11252
11253 2003-07-24  Ravi Pratap  <ravi@ximian.com>
11254
11255         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
11256         fixed.
11257
11258 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
11259
11260         * reflection.c: Fix bug #46669
11261
11262 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11263
11264         * exception.c:
11265         * exception.h:
11266         * icall.c:
11267         * object.h: fill in the type name for TypeLoadException.
11268
11269 2003-07-23  Ravi Pratap  <ravi@ximian.com>
11270
11271         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
11272         relationship between TypeBuilders while compiling corlib) and bug
11273         45993 (Array types returned from the runtime while compiling
11274         corlib were from the loaded corlib).
11275
11276 2003-07-22  Martin Baulig  <martin@ximian.com>
11277
11278         * mono-debug-debugger.c: Reworked the type support a bit more;
11279         distinguish between types and classes.
11280
11281 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
11282
11283         * icall.c: add IsArrayImpl icall.
11284
11285 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
11286
11287         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
11288         initializing real_size only once. Also fix bug #46602.
11289
11290 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
11291
11292         * object.c: Renamed mono_metadata_section to metadata_section.
11293
11294 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
11295
11296         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
11297           empty array if the type is an array. Fixed.
11298           ves_icall_MonoMethod_get_base_definition: if the base method
11299           is abstract, get the MethodInfo from the list of methods of
11300           the class.
11301         * reflection.c: ParameterInfo.PositionImpl should be zero-based
11302           and it was 1-based. Fixed in mono_param_get_objects.
11303
11304 2003-07-20  Martin Baulig  <martin@ximian.com>
11305
11306         * mono-debug.h: Set version number to 31.
11307         (mono_debug_init): Added `MonoDomain *' argument.
11308
11309         * mono-debug-debugger.c: Reworked the type support; explicitly
11310         tell the debugger about builtin types; pass the `klass' address to
11311         the debugger.
11312
11313 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
11314
11315         * image.c: Allow new metadata tables to be loaded without a
11316         warning. Also update the warning message to give the new constant value.
11317                 
11318 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
11319
11320         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
11321         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
11322         array type representation changes.
11323
11324 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11325
11326         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
11327         on Environment.Exit () call.
11328
11329 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11330
11331         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
11332         requires a matching corlib.
11333
11334 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
11335
11336         * Changelog: My editor decided to add a CR to each line. Sorry about that.
11337           Committed again without the CRs.
11338         
11339 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
11340
11341         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
11342           getting it from the "this" socket instance. Did not work
11343           if the socket is a subclass of Socket.
11344           Also fixed bug #35371.
11345
11346 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11347
11348         * metadata.c: fixed size for TypedByRef.
11349         * loader.c: when searching for a method, consider the vararg amrker.
11350         * unicode.c, decimal.c: constify some arrays.
11351
11352 2003-07-15  Dick Porter  <dick@ximian.com>
11353
11354         * socket-io.c: Fixed compilation for gcc < 3.2.
11355
11356         Fixed compilation for machines that don't have AF_INET6 (thanks to
11357         Bernie Solomon <bernard@ugsolutions.com> for that part.)
11358
11359         Fixed compile warnings.
11360         
11361         Fixed formatting and line endings.
11362
11363 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
11364
11365         * socket-io.h:
11366         * socket-io.c: Added IPv6 support.
11367
11368 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
11369
11370         * class.c (mono_class_is_assignable_from): New function to implement
11371         the is_assignable_from logic. Used by mono_object_isinst, 
11372         Type::IsAssignableFrom () and the interpreter.
11373
11374         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
11375         Object, even interfaces.
11376         
11377         * object.c (mono_object_isinst): Implement in terms of 
11378         is_assignable_from.
11379
11380         * icall.c (ves_icall_type_is_assignable_from): New icall.
11381
11382 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
11383
11384         * domain.c (foreach_domain): fix compiler warning.
11385
11386 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
11387
11388         * image.c (load_metadata_ptrs): use g_strndup because strndup is
11389         not available on all plattforms
11390
11391 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
11392
11393         * image.h image.c: Store the metadata version string in MonoImage.
11394         * icall.c: New icall to retrieve the image version.
11395         * reflection.c (create_dynamic_image): Fill in the image version field
11396         * reflection.c (build_compressed_metadata): Use the image version
11397         from the image structure.
11398
11399 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11400
11401         * appdomain.c: modified comment.
11402         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
11403         That will be its last iteration when mono_gc_cleanup is called from
11404         mono_runtime_cleanup and before the domain is unloaded.
11405
11406         Fixes bug #45962.
11407
11408 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
11409
11410         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
11411         attributes.
11412
11413 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11414
11415         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
11416         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
11417         Bernie Solomon <bernard@ugsolutions.com>.
11418
11419 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11420
11421         * object.c, object.h: provide mono_object_new_fast() for faster
11422         allocation in some special cases.
11423
11424 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11425
11426         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
11427         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
11428
11429 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
11430
11431         * threadpool.c: fix leaks.
11432
11433 2003-07-01  Dick Porter  <dick@ximian.com>
11434
11435         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
11436         using MonoGHashTables.  Fixes threadpool bug posted to list.
11437
11438 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
11439
11440         * image.h, image.c: added support to load an assembly from a byte array.
11441         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
11442         assembly bundle support.
11443
11444 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
11445
11446         * threadpool.c (mono_thread_pool_add): keep a reference to the
11447         AsyncResult to prevent GC
11448
11449 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
11450
11451         * class.c: leak fix.
11452
11453 2003-06-25  Dick Porter  <dick@ximian.com>
11454
11455         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
11456         for the async object, the WaitHandle object will close the handle.
11457         Fixes bug 45321.
11458
11459 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11460
11461         * class.c: in mono_array_class_get (), lookup from the hash with the
11462         same type we insert: this works around a bug in
11463         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
11464         lluis. The real fix will have to wait for after the release.
11465
11466 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11467
11468         * icall.c: fix memory leak when getting type members.
11469
11470 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11471
11472         * reflection.c: added more pubtoken special cases.
11473
11474 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
11475
11476         * class.c: handle field offset correctly when class size
11477         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
11478
11479 2003-06-20  Martin Baulig  <martin@ximian.com>
11480
11481         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
11482         *image' field.
11483
11484 2003-06-20  Martin Baulig  <martin@ximian.com>
11485
11486         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
11487
11488 2003-06-20  Martin Baulig  <martin@ximian.com>
11489
11490         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
11491         just distinguish between variables in registers and variables at
11492         an offset relative to a register.
11493
11494 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11495
11496         * icall.c: #ifdef out latest changes until mcs is fixed.
11497
11498 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11499
11500         * icall.c: return members in metadata order.
11501
11502 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11503
11504         * icall.c: avoid infinite loop in GetTimeZoneData.
11505
11506 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
11507
11508         * icall.c: added Marshal.Prelink/All icalls.
11509
11510 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
11511
11512         * object.c, object.h: fix warnings and do some overflow checking
11513         when creating arrays.
11514
11515 2003-06-17  Dick Porter  <dick@ximian.com>
11516
11517         * file-io.h:
11518         * file-io.c: File attributes need to be tweaked slightly when
11519         passed from the managed to the w32 world.
11520
11521 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
11522         * profiler.h profiler-private.h profiler.c: Rework last patch
11523         based on suggestion by Paolo.
11524         
11525 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
11526
11527         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
11528         instruction level coverage data collection.
11529         * profiler.h profiler.c (: Added new callback function which can be
11530         used by the profiler to limit which functions should have coverage
11531         instrumentation.
11532         * profiler.c (mono_profiler_load): Call g_module_build_path to
11533         generate the file name of the profiler library.
11534
11535 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11536
11537         * profiler.c, profiler.h, profiler-private.h: added basic block 
11538         coverage profiling API.
11539
11540 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
11541
11542         * reflection.c (mono_reflection_create_runtime_class): Add support
11543         for events in dynamically generated code.
11544
11545         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
11546         not allocated.
11547
11548 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11549
11550         * icall.c: when getting timezone info, return reasonable values if we
11551         can't get the actual data.
11552
11553 2003-06-14  Dick Porter  <dick@ximian.com>
11554
11555         * threads.c (start_wrapper): Remove the reference to the thread
11556         object in the TLS data, so the thread object can be finalized.
11557         This won't be reached if the thread threw an uncaught exception,
11558         so those thread handles will stay referenced :-( (This is due to
11559         missing support for scanning thread-specific data in the Boehm GC
11560         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
11561
11562 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
11563
11564         * reflection.c: ensure streams and tables are first allocated with
11565         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
11566
11567 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
11568
11569         * icall.c: fixed GetElementType for byrefs (bug# 44792).
11570
11571 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
11572
11573         * reflection.c (mono_reflection_create_runtime_class): Add support for
11574         properties to dynamically created classes.
11575         * reflection.c: Fix a few places where non-MonoObjects were inserted
11576         into the tokens hashtable.
11577
11578 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11579
11580         * object.c: some support to handle out of memory exceptions.
11581
11582 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
11583
11584         * marshal.c (mono_marshal_get_native_wrapper): support reference
11585         return types
11586
11587 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
11588
11589         * object.h, object.c: more portability stuff from Bernie Solomon.
11590         Unexport mono_object_allocate(). Added mono_object_unbox ().
11591         Set exitcode when an unhandled exception is thrown.
11592
11593 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
11594
11595         * marshal.c (mono_marshal_get_native_wrapper): use custom
11596         marshaler for return types.
11597
11598 2003-06-10  Dick Porter  <dick@ximian.com>
11599
11600         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
11601         ip_mreq is available
11602
11603 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
11604
11605         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
11606         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
11607         by Bernie Solomon <bernard@ugsolutions.com>.
11608
11609 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
11610
11611         * gc.c (mono_gc_init): Avoid error message on shutdown when
11612         GC_DONT_GC=1 is used.
11613
11614         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
11615         New icall to return the GUID of a module.
11616
11617 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
11618
11619         * class.c: ensure instance size always includes the parent's size
11620         even whem class size is set explicitly (fixes bug#44294).
11621
11622 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
11623
11624         * profiler.h, profiler.c: made the simple profiler thread-safe,
11625         get more accurate timing info. Allow the loading of an
11626         externally-developed profiler module.
11627
11628 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
11629
11630         * marshal.c (mono_marshal_get_native_wrapper): improved
11631         class/byref arguments.
11632         (mono_marshal_get_native_wrapper): better string marshaling support.
11633
11634 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
11635
11636         * class.c: ensure .pack and .size are handled correctly and
11637         simplified layout of static fields.
11638
11639 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
11640
11641         * appdomain.c
11642         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
11643
11644         * loader.c (mono_lookup_pinvoke_call): look for modules in the
11645         current directory (fix bug 44008)
11646
11647 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
11648
11649         * marshal.c (mono_marshal_get_native_wrapper): started support for
11650         custom marshalers.
11651         (mono_delegate_to_ftnptr): consider marshalling specifications
11652
11653 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
11654
11655         * reflection.c, reflection.h: emit custom marshal info.
11656
11657 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11658
11659         * object.c: free the GError.
11660         * icall.c: added CloseEvent_internal.
11661         * threads.[ch]:
11662         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
11663         call.
11664
11665 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
11666
11667         * loader.c (mono_method_get_signature): Add support for dynamic
11668         assemblies.
11669
11670 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
11671
11672         * reflection.c: fixed bug #43905.
11673
11674 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11675
11676         * class.c, domain.c, icall.c, metadata.h, object.h: support for
11677         handling TypedReference and ArgIterator.
11678         * loader.c, loader.h: added function to get signature at call site.
11679
11680 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
11681
11682         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
11683         data readonly. Buglets and warning fixes. Some MethodSpec support.
11684
11685 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11686
11687         * class.h, class.c, object.c: remove relative numbering support.
11688
11689 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
11690
11691         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
11692         free the string, until we get a chance to fix Gtk#
11693
11694 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11695
11696         * marshal.c: revert last patch.
11697
11698 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
11699
11700         * icall.c: updates for new mono_class_vtable() not calling
11701         the type constructor anymore.
11702
11703 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
11704
11705         * object.h, object.c: separate vtable creation from type
11706         initialization. Make running the .cctor thread safe.
11707
11708 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
11709
11710         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
11711
11712 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
11713
11714         * loader.c (mono_get_method): consider calling convention
11715
11716 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
11717
11718         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
11719         to return the invisible global type for a module.
11720
11721         * reflection.c (mono_image_build_metadata): Emit global fields too.
11722
11723 2003-05-20  Peter Williams  <peterw@ximian.com>
11724
11725         * loader.c (mono_lookup_internal_call): Add a few newlines.
11726
11727 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
11728
11729         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
11730         literal strings.
11731
11732         * appdomain.c (set_domain_search_path): Recalculate search path when
11733         AppDomainSetup.PrivateBinPath changes.
11734
11735         * object.c (mono_class_compute_gc_descriptor): It turns out some
11736         parts of the class libs (like System.Thread) holds pointers to
11737         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
11738         to treat native int a pointer type here.
11739         
11740 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
11741
11742         * appdomain.h, domain.c: add hashtable for jump target resolution.
11743
11744 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
11745
11746         * reflection.h reflection.c icall.c: Added new icalls 
11747         GetManifestResourceInfoInternal, GetModulesInternal and support
11748         infrastructure.
11749
11750 2003-05-16  Dick Porter  <dick@ximian.com>
11751
11752         * icall.c:
11753         * file-io.h:
11754         * file-io.c: Implement System.IO.MonoIO::GetTempPath
11755
11756 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
11757
11758         * object.c: mono_store_remote_field: little fix to previous patch.
11759
11760 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11761
11762         * class.c: add constructors to array classes.
11763         * icall.c: special case array construction for InternalInvoke (),
11764
11765 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
11766
11767         * class.h class.c reflection.c object.c: Added support for field
11768         defaults in dynamically generated classes.
11769
11770 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
11771
11772         * reflection.c: properly encode charset for ddlimport.
11773
11774 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
11775
11776         * threads.c: allow compiling without GC.
11777
11778 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
11779
11780         * appdomain.h, object.c, object.h, threads.c, threads.h: added
11781         handling of thread static data.
11782
11783 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11784
11785         * reflection.h, reflection.c: added mono_custom_attrs_free ().
11786
11787 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
11788
11789         * class.c (mono_array_class_get): always set the serializable flags
11790         (mono_array_class_get): always set the SEALED attribute for array types
11791
11792 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
11793
11794         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
11795         attributes (fix for bug 42021).
11796
11797 2003-05-12  Dick Porter  <dick@ximian.com>
11798
11799         * gc.c: Don't run finalizers when the finalizer thread is
11800         finishing up, because the default domain has already been
11801         destroyed.
11802
11803 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
11804
11805         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
11806         value is null, we should throw an exception.   This is slightly
11807         different than the other conventions used for the constructor.
11808
11809 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11810
11811         * socket-io.c: fixed windows build.
11812
11813 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11814
11815         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
11816
11817 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
11818
11819         * object.c (mono_string_new_wrapper): Compatibility fix for MS
11820         compilers.
11821
11822 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
11823
11824         * class.c (mono_class_layout_fields): Add experimental GC aware
11825         auto layout facility. Requires class library changes to work correctly.
11826
11827         (mono_class_setup_vtable): Avoid overriding explicit interface
11828         method implementations. Fixes iface3.exe test.
11829
11830         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
11831         object reference.
11832         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
11833         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
11834
11835         * metadata.h: Add new type classification macro which determines
11836         whenever the type holds an object reference.
11837
11838 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
11839
11840         * marshal.c (mono_marshal_get_native_wrapper): cleanups
11841
11842 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
11843
11844         * gc.c (finalizer_thread): Work around a GC bug.
11845
11846 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
11847
11848         * marshal.c (emit_struct_conv): allow unions
11849
11850         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
11851
11852 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
11853
11854         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
11855
11856 2003-05-06  Martin Baulig  <martin@ximian.com>
11857
11858         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
11859
11860 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11861
11862         * socket-io.c:
11863         (Select_internal): allow NULLs, don't create arrays if not needed.
11864         Coupled with Socket.cs changes.
11865
11866         * threadpool.c:
11867         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
11868         register a finalizer for it that will close the semaphore handle. This
11869         fixes the leak and make Lupus' test run with > 4080 loops.
11870
11871 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
11872
11873         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
11874         Jerome Laban (bug #42287)
11875
11876 2003-05-02  Martin Baulig  <martin@ximian.com>
11877
11878         * debug-mono-symfile.h
11879         (MonoSymbolFile): Moved declaration into mono-debug.h.
11880         (MonoDebugMethodJitInfo): Likewise.
11881         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
11882         argument.
11883         (_mono_debug_address_from_il_offset): Take a
11884         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
11885
11886         * mono-debug.h
11887         (MonoDebugDomainData): New struct.
11888         (mono_debug_get_domain_data): New function.
11889         (mono_debug_add_method): Take an additional `MonoDomain *'
11890         argument.
11891         (mono_debug_source_location_from_address): Likewise.
11892         (mono_debug_il_offset_from_address): Likewise.
11893         (mono_debug_address_from_il_offset): Likewise.
11894
11895 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
11896
11897         * reflection.c: one more check for null type in custom attrs.
11898
11899 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11900
11901         * reflection.c: avoid warning (comparison is always false due to limited
11902         range of data type).
11903
11904 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11905
11906         * icall.c: throw an exception in Type.GetField if the argument 'name'
11907         is NULL.
11908
11909 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
11910
11911         * reflection.c: fixed handling of enums in named arguments to custom
11912         attributes (bug #42123).
11913
11914 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
11915
11916         * reflection.c: use the right array element type and handle
11917         a null for a Type argument, too.
11918
11919 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
11920
11921         * reflection.c: handle arrays as arguments to custom attributes.
11922
11923 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
11924
11925         * reflection.c: handle a string value in a custom attr
11926         ctor that takes an object.
11927
11928 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
11929
11930         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
11931         (fix bug #42063)
11932
11933 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
11934
11935         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
11936
11937 2003-04-27  Martin Baulig  <martin@ximian.com>
11938
11939         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
11940         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
11941         MONO_DEBUGGER_EVENT_BREAKPOINT.
11942         (mono_breakpoint_trampoline_code): Removed.
11943         (mono_debugger_event_handler): The last argument is now a
11944         `guint32'.
11945         (mono_debugger_insert_breakpoint_full): Removed the
11946         `use_trampoline' argument.
11947         (mono_debugger_method_has_breakpoint): Likewise.
11948         (mono_debugger_trampoline_breakpoint_callback): Renamed to
11949         mono_debugger_breakpoint_callback(); take the method and
11950         breakpoint number as arguments.
11951
11952 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11953
11954         * metadata.c: fix off by one when loading parameters attributes.
11955
11956 2003-04-24  Martin Baulig  <martin@ximian.com>
11957
11958         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
11959
11960 2003-04-24  Martin Baulig  <martin@ximian.com>
11961
11962         * mono-debug-debugger.c: Moved all code which interacts with the
11963         Mono Debugger here.
11964
11965         * debug-mono-symfile.c: This code now just deals with the symbol
11966         file itself, the debugger code is now in mono-debug-debugger.c.
11967
11968 2003-04-23  Martin Baulig  <martin@ximian.com>
11969
11970         * mono-debug.c (mono_debug_source_location_from_il_offset):
11971         New method; like mono_debug_source_location_from_address(), but
11972         takes an IL offset instead of a machine address.
11973
11974 2003-04-23  Martin Baulig  <martin@ximian.com>
11975
11976         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
11977         `line' field; this is now computed by the debugger.
11978
11979 2003-04-23  Martin Baulig  <martin@ximian.com>
11980
11981         * mono-debug.[ch]: New files.  This is the new debugging interface.
11982
11983         * mono-debug-debugger.[ch]: New files.  Moved all code which
11984         interacts with the Mono Debugger here.
11985
11986 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
11987
11988         * domain.c (mono_init): initialize mono_defaults.monitor_class
11989
11990 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
11991
11992         * reflection.c (method_encode_code): Add a spicy exception to help
11993         future compiler authors.
11994
11995 2003-04-21  Martin Baulig  <martin@ximian.com>
11996
11997         * icall.c
11998         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
11999         Make this work with relative pathnames; g_filename_to_uri() needs
12000         an absolute filename.
12001
12002 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
12003
12004         * icall.c: Track name changes in Object and ValueType.
12005
12006 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
12007
12008         * metadata.c (mono_type_stack_size): size should be a multiple of
12009         sizeof (gpointer)
12010
12011 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12012
12013         * gc.c:
12014         (internal_domain_finalize): moved into mono_domain_finalize. No need
12015         to create another thread because the finalizers will be run in the
12016         finalizer thread.
12017         
12018         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
12019         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
12020         to be run (MS does this too).
12021
12022 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
12023
12024         * object.c (mono_class_compute_gc_descriptor): Update comment.
12025
12026         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
12027
12028         * image.h: Add synchronized wrapper cache.
12029
12030         * image.c (do_mono_image_open): Initialize cache.
12031
12032         * reflection.c (create_dynamic_mono_image): Initialize cache.
12033
12034 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12035
12036         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
12037         ves_icall_System_Buffer_ByteLengthInternal.
12038
12039 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
12040
12041         * reflection.c: setup klass->nested_in earlier. Allow
12042         a dash in the assembly name.
12043
12044 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
12045
12046         * metadata.c (mono_type_to_unmanaged): dont access
12047         type->data.klass for MONO_TYPE_OBJECT
12048         (mono_type_to_unmanaged): consider System.Delegate class
12049
12050 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
12051
12052         * class.c: just setup supertypes in the proper place instead of
12053         initializing the full element class for arrays.
12054
12055 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
12056
12057         * class.c: ensure the element class of arrays is initialized.
12058         Setup the supertype info for array classes, too.
12059
12060 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
12061
12062         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
12063
12064 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12065
12066         * Makefile.am: re-added -m option when running cygpath. This way,
12067         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
12068         separator.
12069         * mono-config.c: same codepath for locating mono config file for WIN32
12070         and the rest.
12071         * assembly.c: if mono_assembly_setrootdir is called, don't override
12072         the value set.
12073
12074 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12075
12076         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
12077         MONO_ASSEMBLIES variable.
12078
12079 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
12080
12081         * icall.c: added Assembly::GetNamespaces() icall.
12082
12083 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12084
12085         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
12086
12087 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
12088
12089         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
12090         * object.c: fixed bug in the construction of vtable for proxies
12091
12092 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
12093
12094         * object.c (mono_array_new): Mark mono_array_new as an icall.
12095
12096 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12097
12098         * class.c: fixed test for public method when overriding interfaces.
12099         Closes bug #40970.
12100
12101 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
12102
12103         * appdomain.h, domain.c: added mono_domain_foreach() to
12104         be able to access the currently loaded appdomains.
12105         * object.c: make string interning work across sppdomains.
12106         Mark some functions for use as icalls.
12107
12108 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
12109
12110         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
12111
12112         * reflection.h reflection.c: Allocate long living data using 
12113         GC_MALLOC_ATOMIC so the collector does not need to scan it.
12114
12115         * reflection.c: Double the allocation size in streams instead of
12116         increasing it, to prevent unneccesary copying on large assemblies.
12117         
12118         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
12119         creation if the assembly does not have the Run flag set.
12120
12121 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
12122
12123         * class.h: avoid the C++ keywords in header files (Jerome Laban
12124         spotted and fixed this).
12125
12126 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12127
12128         * object.c:
12129         (mono_unhandled_exception): fill in the arguments for the
12130         UnhandledException event. Only trigger that event for the default
12131         domain (as MS does).
12132
12133 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
12134
12135         * object.c: Improve typed allocation stuff based on suggestions from
12136         Paolo. Also turn it on if the GC library supports it.
12137
12138 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
12139
12140         * object.c object.h class.h: Added experimental typed allocation
12141         facility using the interfaces in gc_gcj.h.
12142
12143         * os/gc_wrapper.h: Added new include files.
12144         
12145 2003-04-03  Martin Baulig  <martin@ximian.com>
12146
12147         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
12148         which is not yet enabled by default.
12149
12150         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
12151         functions.
12152         (mono_gc_lock, mono_gc_unlock): New static functions.
12153
12154         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
12155         functions; stop/start the world for the garbage collector.  This
12156         is using the windows API; we need to complete the SuspendThread()/
12157         ResumeThread() implementation in the io-layer to make this work on Unix.
12158         (mono_gc_push_all_stacks): New public function; tells the garbage
12159         collector about the stack pointers from all managed threads.
12160
12161 2003-04-03  Martin Baulig  <martin@ximian.com>
12162
12163         * object.h (MonoThread): Added `gpointer stack_ptr'.
12164
12165         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
12166
12167 2003-04-03  Martin Baulig  <martin@ximian.com>
12168
12169         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
12170
12171 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
12172
12173         * reflection.c (typebuilder_setup_fields): Initialize field.first and
12174         field.last.
12175
12176 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
12177
12178         * loader.c (mono_lookup_internal_call): Report the corlib that is
12179         out of sync.
12180
12181 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
12182
12183         * icall.c (ves_icall_type_GetTypeCode): fixed check for
12184         System.DBNull (it's class not valuetype).
12185
12186 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
12187
12188         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
12189         if the array method was already assigned a token (fixes bug#40646).
12190
12191 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
12192
12193         * reflection.c (mono_reflection_get_type): Attempt type resolve even
12194         if no assembly is given.
12195
12196 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
12197
12198         * metadata.h: Added the new tables.
12199
12200         * row-indexes.h: Added definitions for new tables.
12201
12202         * metadata.c: Add schemas for new tables, and add support for
12203         computing the sizes of them.
12204
12205         * class.c: Update for handling the new type cases.
12206
12207 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
12208
12209         * metadata.h (MONO_TYPE_IS_VOID): new macro
12210
12211 2003-03-31  Martin Baulig  <martin@ximian.com>
12212
12213         * threads.h (MonoThreadCallbacks): Added `thread_created'.
12214
12215         * threads.c (mono_thread_new_init): Call `thread_created' in the
12216         mono_thread_callbacks.
12217
12218 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
12219
12220         * loader.h: added marshalbyrefobject_class to mono_defaults
12221         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
12222         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
12223           generation of output parameters.
12224           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
12225         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
12226           contextbound and the target object belongs to the context of the caller.
12227         * object.h: added context and unwrapped_server variables in MonoRealProxy.
12228         * object.c: Implemented support for interfaces and abstract classes
12229           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
12230           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
12231
12232 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
12233
12234         * class.h class.c (mono_class_is_subclass_of): New function.
12235         
12236         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
12237         routines for most common case (calls from ArrayList::ToArray).
12238
12239         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
12240         routine so programs which call Environment::Exit() can be profiled.
12241
12242         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
12243         Added MONO_ARCH_SAVE_REGS.
12244
12245         * icall.c (ves_icall_type_is_subtype_of): Use new function.
12246
12247 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
12248
12249         * blob.h: Add a couple of new MonoType types definitions.
12250
12251         * tabledefs.h: Add a couple of new call convs.
12252
12253 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
12254
12255         * reflection.h (MonoReflectionDynamicAssembly): track changes in
12256         the layout of the class.
12257
12258         * reflection.c (alloc_table): double the size on overflow to avoid
12259         unnecessary copying.
12260
12261         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
12262         avoid filling out metadata tables and blobs. Also set mb->ilgen to
12263         null so it can be garbage collected.
12264         
12265 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
12266
12267         * reflection.c (mono_reflection_get_type): Return the resolved type
12268         only if it is in the assembly we searched.
12269
12270         * reflection.c (ensure_runtime_vtable): Initialize method slots.
12271
12272         * class.c (mono_class_setup_vtable): Set the slot of the overriding
12273         method.
12274
12275 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12276
12277         * appdomain.c:
12278         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
12279         the right one is 'file:///blah', but MS allows it.
12280         * assembly.c:
12281         (mono_assembly_open): allow 'file://blah'
12282
12283         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
12284
12285 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
12286
12287         * socket-io.c: fixes bug #40310.
12288
12289 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
12290
12291         * reflection.c (mono_reflection_parse_type): handle deeply nested
12292         types correctly.
12293
12294         * reflection.c (mono_image_create_token): Use unique token values
12295         since they will be put into a hash table.
12296
12297         * class.c (mono_class_setup_vtable): If a method occurs in more than
12298         one place in the vtable, and it gets overriden, then change the
12299         other occurances too.
12300
12301         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12302         object as return type.
12303
12304 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
12305
12306         * icall.c: Deleted "ToString" implementation for double and float
12307         because they are full implemented in managed code.
12308
12309 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12310
12311         * reflection.c, reflection.h: implemented and exported functions
12312         to retrieve info about custom attributes.
12313
12314 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12315
12316         * appdomain.c: moved Uri handling to assembly.c
12317         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
12318         work when using a file Uri in *nix and windows.
12319
12320         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
12321         GetReferencedAssemblies.
12322
12323 2003-03-18  Dick Porter  <dick@ximian.com>
12324
12325         * icall.c: Rename a couple of internal calls
12326
12327         * threads.c: Set the thread state to Stopped when a thread exits.
12328         Fixes bug 39377.
12329
12330 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
12331
12332         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
12333         New icall.
12334
12335         * object.c (mono_class_vtable): fix warning.
12336
12337 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
12338
12339         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
12340
12341         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
12342         memory.
12343         (method_encode_clauses): Create exception info structures in the right
12344         order.
12345         (mono_reflection_setup_internal_class): Initialize supertypes field.
12346
12347         * class.c object.c: Handle interfaces which implement other interfaces 
12348         correctly.
12349
12350         * class.h class.c: Move the supertypes array initialization code into 
12351         a separate function so it can be used for dynamic types too. Also call
12352         it earlier, in mono_class_init(), since it can be used before the
12353         type is initialized.
12354
12355 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12356
12357         * Makefile.am:
12358         * assembly.c:
12359         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
12360
12361         * appdomain.c:
12362         * appdomain.h:
12363         * marshal.c:
12364         * object.c: remove warnings.
12365
12366 2003-03-13  Martin Baulig  <martin@ximian.com>
12367
12368         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
12369         (MonoDebugLexicalBlockEntry): New types.
12370
12371         * debug-mono-symfile.c
12372         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
12373
12374 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12375
12376         * process.c: ret can be any non-zero value accroding to MS doc.
12377
12378 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
12379
12380         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
12381         fixing a warning for a miss-used prototype, would have cause
12382         random memory corruption.
12383
12384 2003-03-07  Martin Baulig  <martin@ximian.com>
12385
12386         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
12387         getting really annoying ....
12388
12389 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
12390
12391         * reflection.c (fixup_method): added support for array methods.
12392
12393 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12394
12395         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
12396         (pointed out by Michael Adams).
12397
12398 2003-03-04  Dick Porter  <dick@ximian.com>
12399
12400         * icall.c: Temporarily reverted the Double and Single ToString()
12401         change, because it broke nunit.
12402
12403 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
12404
12405         * object.h, threads.h: make include files compatible with C++
12406         (patch by Jerome Laban <jlaban@wanadoo.fr>).
12407
12408 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
12409
12410         * icall.c: Erased ToString helper functions for Double and Single.
12411         Now, that implementations ar all in managed code (Double and Single
12412         Formatters).
12413
12414 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
12415
12416         * appdomain.c: Added method for initializing the default context of
12417         a domain. Added internal call for getting the default context.
12418         * appdomain.h: Added context variable in MonoDomain struct.
12419         * domain.c: mono_domain_set also sets the default context of the domain
12420         * icall.c: Mapped internal method InternalGetDefaultContext.
12421         * object.c: mono_object_get_virtual_method returns always a remoting
12422         wrapper if the object is a transparent proxy.
12423         mono_runtime_invoke_array: when creating an object by calling the
12424         constructor, if the created object is a proxy, then the constructor should
12425         be called using the a remoting wrapper.
12426
12427 2003-03-03  Dick Porter  <dick@ximian.com>
12428
12429         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
12430         variable so it compiles on solaris.  Problem spotted by
12431         Christopher Taylor <ct@cs.clemson.edu>
12432
12433 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12434
12435         * appdomain.c:
12436         (get_info_from_assembly_name): don't leak value.
12437
12438         * icall.c:
12439         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
12440         result.
12441
12442 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12443
12444         * assembly.c: export mono_image_load_references ().
12445         * class.c: handle function pointers. mono_class_from_name() now
12446         supports nested type names directly.
12447
12448 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
12449
12450         * reflection.h reflection.c: Encode already created dynamic methods 
12451         and fields correctly as a DEF instead of a REF.
12452
12453         * reflection.c: Get rid of the force_ref argument to 
12454         mono_image_typedef_or_ref since it was wrong in the first place.
12455
12456         * string-icalls.c: add error checking to string constructors according
12457         to the MSDN docs.
12458
12459         * reflection.c: Emit types in the order their TypeBuilders were 
12460         created. Previously, a new table index was assigned to each type before
12461         the tables were emitted. This was wrong because the signature blob
12462         might already refer to a type by its original table index.
12463
12464 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
12465
12466         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
12467         change.
12468         
12469 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12470
12471         * Makefile.am: make assemblies dir have \ instead of / on windows.
12472
12473 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
12474
12475         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
12476         iterate over the NESTEDCLASS table using a linear search since the
12477         table is not guaranteed to be sorted by the secondary key.
12478
12479         * class.c (mono_class_create_from_typedef): fixed up call to
12480         mono_metadata_nesting_typedef.
12481         
12482 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
12483
12484         * marshal.c (mono_string_to_byvalstr): clear the memory as
12485         suggested by Jerome Laban <jlaban@wanadoo.fr>
12486
12487 2003-02-26  Dick Porter  <dick@ximian.com>
12488
12489         * process.c: Cope with padding in .rsrc blocks
12490
12491 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
12492
12493         * metadata.h: reverted the filter_len change, it breaks reflection
12494         
12495 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
12496
12497         * metadata.h: added a new field to store the filter_len
12498         
12499
12500 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12501
12502         * reflection.c: handle custom attributes for types and members
12503         created with Reflection.Emit (bug#38422).
12504
12505 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
12506
12507         * reflection.c: define RTSpecialName automatically for constructors for
12508         compatibility with MS.NET.
12509
12510         * reflection.c (mono_reflection_create_runtime_class): initialize
12511         nested_in field of dynamically created classes.
12512
12513 2003-02-22  Martin Baulig  <martin@ximian.com>
12514
12515         * debug-mono-symfile.h: Incremented version number.
12516
12517 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
12518
12519         * object.h icall.c process.c: fix warnings.
12520
12521 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
12522
12523         * appdomain.h appdomain.c:
12524         (mono_domain_try_type_resolve): split the 
12525         name_or_tb argument into a name and a tb argument.
12526         (mono_domain_has_type_resolve): new function to check whenever the
12527         application has registered a TypeResolve event handler.
12528         
12529         * icall.c reflection.h reflection.c: move the type resolve logic into
12530         mono_reflection_get_type () so it will be invoked when 
12531         Assembly::GetType () is called.
12532
12533         * reflection.c:
12534         (mono_reflection_get_type): renamed to get_type_internal.
12535         (mono_reflection_get_type): fixed type name generation so it works 
12536         for nested types too.
12537         (mono_reflection_get_type): call has_type_resolve () to avoid the 
12538         costly type name generation if there is no resolve event handler.
12539
12540 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12541
12542         * class.c, image.c: load exported types from file references.
12543
12544 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
12545
12546         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
12547           used to cache the managed methods used to create proxies and make 
12548           remote invocation of methods.
12549         * class.h: Added in MonoVTable a flag to indicate that a class needs 
12550           to be remotely created.
12551         * object.c: Modified the method mono_class_vtable(). It now initializes 
12552           the remote flag of the vtable. Modified mono_object_new_specific(), 
12553           so now it checks the remote flag.
12554         * icall.c: Added a couple of internal methods, one for enabling instance 
12555           creation interception for a type, and one for creating objects bypassing
12556           the remote check.
12557
12558 2003-02-18  Martin Baulig  <martin@ximian.com>
12559
12560         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
12561         New interncall to get a method's metadata token.
12562
12563         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
12564         New interncall for the debugger.
12565
12566 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
12567
12568         * class.c (mono_class_setup_vtable): allocate supertype array
12569
12570 2003-02-18  Martin Baulig  <martin@ximian.com>
12571
12572         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
12573
12574 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12575
12576         * reflection.c:
12577         (assembly_name_to_aname): jump over unknown properties (i've found
12578         something like: 'type, assembly, version=xxx, custom=null, public...',
12579         so now will ignore custom=null and still get the rest of the values).
12580
12581 2003-02-17  Dick Porter  <dick@ximian.com>
12582
12583         * threads.c: Have Thread.Start() wait for a semaphore to signal
12584         that the thread has set up all its local data.  This fixes bug
12585         34323, where Abort() raced the new thread's TLS data.
12586
12587         Also removes the handle_store() call from start_wrapper, because
12588         threads are now always created suspended and there is no longer a
12589         race between the parent and child threads to store the info.
12590
12591 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
12592
12593         * image.c: explain the #- heap issue in a message, hopefully
12594         avoiding FAQs on mono-list.
12595
12596 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12597
12598         * icall.c:
12599         (GetEntryAssembly): if the domain has not invoked
12600         AppDomain.ExecuteAssembly yet, return the assembly of the default
12601         AppDomain.
12602
12603 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
12604
12605         * class.c (mono_ldtoken): make it work in dynamic assemblies.
12606
12607 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12608
12609         * metadata.c, reflection.c: simple speedup to type hash
12610         and equals code.
12611
12612 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
12613
12614         * image.c, image.h, class.c, assembly.c: move module loading
12615         to MonoImage. When loading metadata, consider alignemnet from
12616         the start of metadata, not from the metadata address in memory.
12617
12618 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
12619
12620         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
12621         AssemblyBuilder objects. Factored out custom attribute creation into
12622         a separate function.
12623         (create_custom_attr): new function to create custom attributes.
12624
12625 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
12626
12627         * Makefile.am: Got tired of typing the full pathname to pedump.
12628         Until there is another option, am installing this.
12629
12630 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
12631
12632         * class.c (class_compute_field_layout): always set field->parent 
12633         (mono_ldtoken): use mono_defaults.fieldhandle_class;
12634
12635 2003-02-11  Dick Porter  <dick@ximian.com>
12636
12637         * threads-types.h:
12638         * monitor.c: Rewrote Monitor, making lock much faster and
12639         Pulse/Wait work as specified.  Also uses much fewer handles, and only
12640         creates them as needed.
12641
12642         * exception.c: Added SynchronizationLockException
12643
12644         * threads.c: Deleted old Monitor implementation.  The new one is
12645         in a new file.
12646
12647 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12648
12649         * class.c: handled TypedReference type code. Set the correct size for
12650         class data. Setup interface_offsets for interface classes, too.
12651
12652 2003-02-09  Martin Baulig  <martin@ximian.com>
12653
12654         * debug-mono-symfile.h: Reflect latest symbol writer changes.
12655
12656 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
12657
12658         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
12659         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
12660         * object.c: fixed mono_object_get_virtual_method () for interfaces.
12661         * verify.c: check for code that runs after the end of the method.
12662
12663 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
12664
12665         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
12666         "System.Math::Round2".
12667         * sysmath.h: Added Floor, Round and Round2 definitions.
12668         * sysmath.c: Modified certain functions that were not 100% compliant
12669         with MS.NET (math precision) and added the implementation of Floor,
12670         Round and Round2.
12671
12672 2003-02-07  Martin Baulig  <martin@ximian.com>
12673
12674         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
12675
12676 2003-02-07  Martin Baulig  <martin@ximian.com>
12677
12678         * debug-mono-symfile.c: Reflected latest symwriter changes.
12679         (mono_debug_create_mono_symbol_file): Removed.
12680         (mono_debug_open_mono_symbol_file): Take an argument which
12681         specifies whether to create a dynamic symbol file.
12682
12683 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
12684
12685         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
12686
12687 2003-02-05  Martin Baulig  <martin@ximian.com>
12688
12689         * reflection.c (mono_image_build_metadata): Make this public,
12690         protect it against being called multiple times, don't create
12691         resources and don't build the compressed metadata here.
12692         (mono_image_create_pefile): Do this here.
12693
12694         * icall.c
12695         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
12696
12697 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12698
12699         * socket-io.c: fixed bug #36322.
12700
12701 2003-02-06  Piers Haken <piersh@friskit.com>
12702
12703         * appdomain.[ch]:
12704         * class.h:
12705         * debug-mono-symfile.c:
12706         * icall.c:
12707         * loader.c:
12708         * mono-config.c:
12709         * monosn.c:
12710         * reflection.c:
12711         * socket-io.c: warning cleanups
12712
12713 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
12714
12715         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
12716         function. works like remoting invoke, but does a check for the Proxy first.
12717
12718 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
12719
12720         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
12721
12722 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
12723
12724         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
12725         array of pointers.
12726         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
12727         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
12728
12729         * object.c (mono_store_remote_field_new): used by the new jit
12730         instead of mono_store_remote_field
12731         (mono_load_remote_field_new): used by the new jit
12732         instead of mono_load_remote_field
12733
12734 2003-02-05  Patrik Torstensson
12735
12736         * appdomain.c: changed unload to take the domain id instead
12737         of domain
12738         
12739         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
12740
12741
12742 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12743
12744         * appdomain.c: don't look for assemblies in ApplicationBase if
12745         PrivateBinPathProbe is set.
12746
12747 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12748
12749         * object.c: make the first argument in main_args contain the absolute
12750         path to the assembly. Fixes bug #37511.
12751
12752 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12753
12754         * icall.c: get correct UTC offset for countries not using daylight
12755         time saving. Fixes bug #30030.
12756
12757 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12758
12759         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
12760         and 1 are the family).
12761
12762 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
12763
12764         * icall.c (ves_icall_InternalExecute): removed wrong assertion
12765
12766         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
12767
12768 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
12769
12770         * reflection.c: added support for SignatureHelper tokens, which is
12771         needed by the Calli opcode.
12772
12773         * reflection.h: track changes to SignatureHelper class.
12774
12775         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
12776
12777 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12778
12779         * appdomain.c: fixed loading assemblies from PrivateBinPath.
12780
12781 2003-02-03  Patrik Torstensson
12782         * appdomain.[c|h], domain.c : 
12783          - Added support for getting a domain via domain id
12784          - Support for setting and getting domain from System.AppDomain 
12785            (used in cross appdomain channel)
12786          - Added support for get/set for a MonoAppContext on a thread 
12787            (Context class in System.Runtime.Remoting.Contexts),
12788          - Removed hack in Get/SetData and ExecuteAssembly.
12789         
12790         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
12791         the managed world to get control when a proxy is created.
12792
12793         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
12794         
12795 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
12796
12797         * icall.c
12798         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
12799         Populate the codebase field as well.
12800
12801 2003-02-02  Martin Baulig  <martin@ximian.com>
12802
12803         * debug-mono-symfile.c
12804         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
12805         (mono_debug_symfile_add_method): Allow interncalls.
12806
12807 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12808
12809         * icall.c: throw parse exception if strtod fails or the string is empty.
12810
12811 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
12812
12813         * marshal.c: handle object type separately from defined
12814         class types.
12815
12816 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
12817
12818         * marshal.c: handle NATIVE_LPSTR for strings when it's
12819         explicitly specified.
12820
12821 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
12822
12823         * reflection.c, reflection.h, icall.c: setup the reflection
12824         handle cache for ModuleBuilders and AssemblyBuilders.
12825
12826 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
12827
12828         * reflection.c (reflection_methodbuilder_to_mono_method): set
12829         pinvoke flag
12830
12831 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12832
12833         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
12834
12835 2003-01-29  Dick Porter  <dick@ximian.com>
12836
12837         * threads.c: No need for the fake_thread kludge now that Thread
12838         doesn't run a class constructor
12839         
12840 2003-01-29  Dick Porter  <dick@ximian.com>
12841
12842         * threads.c: Use g_direct_hash instead of the rather bogus
12843         g_int_hash
12844
12845 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
12846
12847         * marshal.c (mono_marshal_get_native_wrapper): add check for null
12848         (fix pinvoke12.exe)
12849         (mono_marshal_get_struct_to_ptr): generate valid IL code
12850         (mono_marshal_get_ptr_to_struct): generate valid IL code
12851         (*): correctly set sig->pinvoke, we need to memdup the signature
12852         to do that
12853
12854 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12855
12856         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
12857         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
12858
12859 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
12860
12861         * profiler.c: provide more callers information.
12862
12863 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
12864
12865         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
12866
12867         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
12868
12869         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
12870
12871 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12872
12873         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
12874         exception instead of going into an infinite loop on dates which it 
12875         can't yet handle.
12876
12877         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
12878         out-of-range exception if needed.
12879
12880         * class.c (mono_class_setup_vtable): allow a virtual method to provide
12881         an implementation for an interface method and to override an inherited
12882         method at the same time. 
12883         Imagine a scenario when a virtual method is used to override a
12884         virtual abstract method in a parent class, and this same method 
12885         provides an implementation for an method inherited from an interface. 
12886         In this case, the interface resolution code will set im->slot, which 
12887         means that the virtual method override pass will skip this method 
12888         which means a pointer to the abstract method inherited from the parent
12889         will remain in the vtable of this non-abstract class.
12890
12891         * class.c: (mono_class_setup_vtable): continue search for a real 
12892         method if only an abstract method is found.     
12893
12894 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
12895
12896         * reflection.c: add size to encoding for ByValStr and ByValArray
12897         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
12898
12899 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12900
12901         * class.c (mono_class_setup_vtable): pass the override info as an
12902         argument.
12903
12904         * class.c (mono_class_setup_vtable): set the slot of overriding methods
12905         correctly.
12906         
12907         * reflection.c (ensure_runtime_vtable); add support for method 
12908         overrides.
12909         
12910 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12911
12912         * reflection.c (resolution_scope_from_image): Hack to work to work with
12913         dynamic assemblies.
12914
12915         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
12916         added a 'force_ref' argument to force this function to allways return 
12917         a TypeRef. This is needed by mono_image_get_memberref_token ().
12918         
12919 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12920
12921         * reflection.c (mono_image_get_type_info): interfaces really don't have
12922         a parent.
12923
12924         * reflection.c (mono_image_basic_init): fill out missing fields of
12925         image structure.
12926
12927         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
12928         dynamic assemblies. This is required so dynamic assemblies show up in
12929         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
12930         Type::GetType() etc. This is consistent with MS behaviour.
12931
12932         * image.c image.h reflection.c: add newly created classes to the name 
12933         cache so mono_class_get () will find them.      
12934
12935 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
12936
12937         First part of changes to get IKVM.NET running under mono.
12938         
12939         * appdomain.h, appdomain.c: added new function 
12940         mono_domain_try_type_resolve() which will emit TypeResolve events. 
12941         This function will call AppDomain::DoTypeResolve to do the actual work.
12942
12943         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
12944         moved existing code dealing with dynamic tokens to a new function 
12945         called mono_reflection_lookup_dynamic_token (). This function will 
12946         raise TypeResolve events when appropriate. Since reflection.c is not 
12947         part of libmetadata, a new hook function called 
12948         mono_lookup_dynamic_token() is added to class.c which will call this.
12949
12950         * assembly.h assembly.c: make the invoke_load_hook function public,
12951         so it can be called for dynamic assemblies.
12952
12953         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
12954
12955         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
12956         type isn't found.
12957
12958         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
12959         MonoGHashTable, since it contains pointers to objects which the GC 
12960         needs to track.
12961
12962         * assembly.c (search_loaded): remove unused variable.
12963         
12964 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
12965
12966         * object.c: fixed issue exposed by gcc-generated IL programs
12967         that use RVA data for pointers.
12968
12969 2003-01-25  Martin Baulig  <martin@ximian.com>
12970
12971         * threads.c (start_wrapper): Moved the initialization of
12972         `start_func' above the mono_new_thread_init() call to which we
12973         pass it as argument.
12974
12975 2003-01-24  Martin Baulig  <martin@ximian.com>
12976
12977         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
12978         the MonoThread pointer.
12979
12980 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
12981
12982         * icall.c: Rename `PowImpl' to Pow.
12983
12984 2003-01-23  Dick Porter  <dick@ximian.com>
12985
12986         * threads.c (start_wrapper): Create a Thread object if needed, so
12987         the Main() thread can do the class initialisation in a subthread
12988         that has been set up to allow managed code execution.
12989
12990         Pass the thread ID instead of the MonoThread pointer to the thread
12991         start and attach callbacks.  This change is required, because the
12992         jit thread start callback must be called _before_ the Thread
12993         object can be created.
12994         
12995         (mono_thread_init): Removed much object creation code that is no
12996         longer needed.  No managed code is called from here now.
12997
12998         * object.c (mono_runtime_exec_managed_code): Create a subthread
12999         for Main, and call back to the runtime to use it.
13000         Set the exit code when Main exits.
13001
13002         * gc.c: Make sure domain finalisation happens in a subthread.
13003         Re-enable threaded GC, fixing bug 31333 (again).
13004
13005         * environment.c: System.Environment internall calls (so far just
13006         ExitCode is here, the others are still in icall.c)
13007
13008         * appdomain.c (mono_runtime_cleanup): All threads running managed
13009         code should have finished before mono_runtime_cleanup() is
13010         reached, so no need to clean up threads.
13011
13012 2003-01-22  Martin Baulig  <martin@ximian.com>
13013
13014         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
13015         `gpointer func' arguments.      
13016         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
13017         but added `MonoThread *thread' argument.
13018         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
13019
13020         * threads.c (mono_new_thread_init): Added `gpointer func' argument
13021         and pass it to the mono_thread_start_cb callback.
13022         (mono_install_thread_callbacks): New public function to install a
13023         set of callbacks which are set by the debugger.
13024         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
13025
13026 2003-01-22  Martin Baulig  <martin@ximian.com>
13027
13028         * Makefile.am: Install debug-mono-symfile.h.
13029
13030 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
13031
13032         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
13033
13034 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
13035
13036         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
13037         * class.c (mono_ptr_class_get): correctly set access levels of pointers
13038         (mono_array_class_get): correctly set access levels of arrays
13039
13040 2003-01-20      Patrik Torstensson
13041         * image.h (MonoAssemblyName): changed major, minor, build, revision
13042         from signed to unsigned.
13043
13044 2003-01-20  sean kasun <skasun@azstarnet.com>
13045
13046         * reflection.c (load_cattr_value): Now this handles
13047         MONO_TYPE_SZARRAY.  Fixes bug #35629
13048
13049 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
13050
13051         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
13052         integer value
13053
13054 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13055
13056         * decimal.c: fixed bug #26056.
13057
13058 2003-01-17  Martin Baulig  <martin@ximian.com>
13059
13060         * gc.c: Raise an ExecutionEngineException instead of using g_error().
13061
13062 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13063
13064         * exception.[ch]:
13065         (mono_get_exception_type_initialization): new function.
13066
13067         * object.c: throw a TypeInitializationException when an exception is
13068         thrown invoking the class constructor.
13069
13070 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13071
13072         * reflection.c: fixed attribute reading.
13073
13074 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13075
13076         * icall.c:
13077         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
13078         provided, look for the type in the calling assembly and then in
13079         mscorlib; if the assembly name is provided, only try that one.
13080
13081 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13082
13083         * object.c: register the vtable before there is a chance it's
13084         queried again recursively.
13085
13086 2003-01-13  Duncan Mak  <duncan@ximian.com>
13087
13088         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
13089         gc-internal.h. 
13090         
13091 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
13092
13093         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
13094
13095 2003-01-11  Martin Baulig  <martin@ximian.com>
13096
13097         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
13098         this to 20 for the release.
13099
13100 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
13101
13102         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
13103
13104         * loader.c (mono_method_get_marshal_info): bug fix
13105
13106         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
13107         structures with explicit layout
13108
13109 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13110
13111         * profiler.c: made the output more readable (and sorted). 
13112         Added caller information for the allocation profiler.
13113
13114 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
13115
13116         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
13117
13118 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13119
13120         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
13121         to get value types.
13122         
13123 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
13124
13125         * object.c, profiler.h, profiler.c, profiler-private.h:
13126         Added object allocation profiler.
13127
13128 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
13129
13130         * reflection.h, reflection.c: handle global methods.
13131         Compress blob entries.
13132
13133 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
13134
13135         * marshal.c: fix compilation.
13136
13137 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
13138
13139         * loader.c (mono_method_get_marshal_info): impl.
13140
13141         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
13142
13143 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13144
13145         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
13146         for reference types.
13147
13148 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
13149
13150         * loader.c: fixed off by one error in loaded parameter names.
13151
13152 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
13153
13154         * marshal.c (mono_marshal_get_icall_wrapper): like
13155         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
13156         instead of a MonoMethod.
13157
13158 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13159
13160         * decimal.c: fixed bug #36537.
13161
13162 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
13163
13164         * marshal.c: throw a missing method exception if a
13165         P/Invoke method is not found.
13166
13167 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13168
13169         * icall.c: allow a null this for constructors.
13170
13171 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13172
13173         * icall.c: raise the proper exceptions if the arguments to the
13174         internal Invoke are incorrect.
13175
13176 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
13177
13178         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
13179
13180 2003-01-03  Martin Baulig  <martin@ximian.com>
13181
13182         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13183
13184 2002-12-31  Martin Baulig  <martin@ximian.com>
13185
13186         * debug-mono-symfile.c: Completely rewrote the type section.
13187         Instead of using individual malloc()ed fields, we use one big
13188         continuous memory area and offsets into this area.
13189         See the comments in the source code for details.
13190
13191 2002-12-30  Martin Baulig  <martin@ximian.com>
13192
13193         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
13194
13195 2002-12-30  Martin Baulig  <martin@ximian.com>
13196
13197         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
13198         line number table in this data blob instead of using an external
13199         pointer.
13200
13201 2002-12-28  Martin Baulig  <martin@ximian.com>
13202
13203         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
13204
13205 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
13206
13207         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
13208         as a boxed return type.
13209
13210 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
13211
13212         * appdomain.c
13213         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
13214         g_build_filename to properly get separators on the filename created.
13215
13216         * object.h: Small change, introduce MonoMarshalByRefObject to
13217         track the layout of that structure in the C# universe as we make
13218         changes there.
13219
13220 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
13221
13222         * object.c: removed assert to allow static fields on interfaces.
13223         * loader.c: a TypeSpec may be used for any type, not just arrays.
13224
13225 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13226
13227         * class.c, class.h: added mono_class_array_element_size ().
13228         Ignore static methods in interfaces.
13229
13230 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13231
13232         * threads.c: fixed the build under cygwin.
13233
13234 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13235
13236         * reflection.c: handle nullref constants. Allocate keys for
13237         reflection handles with the GC.
13238
13239 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13240
13241         * threads.c, threads.h: added mono_thread_get_abort_signal()
13242         to get a suitable signal for thread abort.
13243
13244 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
13245
13246         * metadata.c: fix handling of ExportedType table.
13247
13248 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13249
13250         * icall.c: added WriteWindowsDebugString internal call.
13251
13252 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13253
13254         * reflection.h: added fields to match C# implementation.
13255
13256 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13257
13258         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
13259
13260 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
13261
13262         * gc.h, gc-internal.h: Rename header for GC internal calls to
13263         gc-internal.h from gc.h as to not clash with Boehm GC having its
13264         header installed as <gc.h> in outside include paths.
13265         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
13266         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
13267
13268 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13269
13270         * icall.c: assign minor, build and revision in FillName.
13271
13272 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
13273
13274         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
13275         Added support for running code generated by Reflection.Emit.
13276
13277 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13278
13279         * appdomain.c: check for NULL argument in LoadFrom.
13280
13281 2002-12-10  Dick Porter  <dick@ximian.com>
13282
13283         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
13284
13285 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13286
13287         * appdomain.c: fix buglet when building exe file name.  Handle full
13288         assembly name (needed after latest changes to AssemblyName).
13289         * image.c:
13290         (mono_image_close): free some hashtables.
13291
13292 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
13293
13294         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
13295         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
13296         on some systems (redhat 7.3) 
13297
13298 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
13299
13300         * threads.c: delete the critical section of a sync block,
13301         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
13302
13303 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
13304
13305         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
13306
13307 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13308
13309         * appdomain.[ch]: handle the assembly preload event to try loading the
13310         assemblies using the paths we have in the current domain.
13311
13312         * assembly.[ch]: created an assembly preload hook that is called to try
13313         loading the assembly by other means that the ones provided here.
13314
13315         * domain.c: initialize the domain search path.
13316
13317         From now on, assemblies (TODO: except corlib and System) are loaded
13318         according to these rules when using mono_assembly_load ():
13319
13320                 1. It tries to load the assembly from the ApplicationBase
13321                 of the current domain appending .dll and .exe (TODO: have to
13322                 try loading from name/name.dll and name/name.exe).
13323
13324                 2. It tries the search path specified in PrivateBinPath for the
13325                 current domain (if any).
13326
13327                 3. Previous behavior.
13328
13329 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
13330
13331         * icall.c: implemented GetInterfaceMap() related icall.
13332         * domain.c, loader.h: load MethodInfo in mono_defaults.
13333
13334 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13335
13336         * gc.c: disable the finalizer thread for now, untill all the issues
13337         with it are resolved.
13338
13339 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13340
13341         * string-icalls.c: handle embedded nulls in string ctor when the
13342         length is specified.
13343
13344 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13345
13346         * class.c: look for explicit interface implementation in parent
13347         classes, too.
13348
13349 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
13350
13351         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
13352
13353 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13354
13355         * gc.c: protect handles with a critical section.
13356
13357 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13358
13359         * icall.c:
13360         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
13361         parameters. If no assembly specified, try getting the type from all
13362         the assemblies in the current domain, else, load the assembly and get
13363         the type from it.
13364
13365 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13366
13367         * marshal.c: applied patch from Aleksey Demakov that fixes
13368         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
13369
13370 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13371
13372         * icall.c: fixed get_location.
13373
13374 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
13375
13376         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
13377         declarations to make it work with older gcc. 
13378
13379         * loader.c (mono_get_method): set signature->pinvoke for native calls
13380
13381 2002-11-20  Dick Porter  <dick@ximian.com>
13382
13383         * threads.c (mono_thread_init): Set the main thread's handle
13384
13385 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13386
13387         * gc.c: allow compilation without GC support. Changed to match the
13388         mono coding style.
13389
13390 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13391
13392         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
13393
13394 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
13395
13396         * reflection.c: set a public key token on the core assemblies.
13397
13398 2002-11-18  Dick Porter  <dick@ximian.com>
13399
13400         * threads.c: Split out some thread initialisation so that other
13401         files can set the start callback function.
13402
13403         * gc.c: Run finalisers in a separate thread, to avoid stack
13404         overflow.  Fixes bug 31333.
13405
13406         * appdomain.c: Set up GC finalisation thread.
13407
13408         * reflection.c: 
13409         * object.c: 
13410         * domain.c: Use gc.h macros for GC_malloc
13411         
13412 2002-11-15  Dick Porter  <dick@ximian.com>
13413
13414         * threadpool.c: 
13415         * threads.c:
13416         * appdomain.c: Removed mono_runtime_init_with_attach(),
13417         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
13418         merging the extra parameter with the existing function.  Removed
13419         unneeded code in mono_thread_attach().
13420
13421 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
13422
13423         * image.c (mono_image_loaded_by_guid): a method to get loaded
13424         images by guid. 
13425         (load_metadata_ptrs): we store the guid as string.
13426
13427 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
13428
13429         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
13430
13431         * metadata.c (mono_guid_to_string): imported method form Zoltan
13432         Varga (slightly modified)
13433
13434         * assembly.c (mono_assembly_open): load precompiled code
13435
13436         * loader.h (MonoMethod): we store the method token for use in the
13437         aot compiler. 
13438
13439 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13440
13441         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
13442         the hook function called when an assembly is loaded.
13443         
13444         * domain.c: Modified file.
13445         (mono_domain_assembly_load): removed hash table insertion of assemblies.
13446
13447         Fixes bug #33196.
13448
13449 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
13450
13451         * reflection.c: Map PEFileKind to the value expected by the WinNT
13452         image loader. 
13453
13454 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13455
13456         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
13457         Read until the buffer is filled completely.
13458
13459 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13460
13461         * icall.c: implemented MonoType.InternalGetEvent ().
13462
13463 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13464
13465         * appdomain.c: implemented InitAppDomainSetup. Delayed
13466         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
13467         the entry_assembly.
13468
13469         * assembly.c: base_dir is now an absolute path ending with
13470         G_DIR_SEPARATOR.
13471
13472         * icall.c: modified get_location according to the above changes.
13473
13474         * object.c: init AppDomain.SetupInformation for the default domain after
13475         we have the entry assembly.
13476
13477         * domain.c: when unloading a domain, setup = NULL.
13478
13479 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
13480
13481         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
13482
13483 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
13484
13485         * object.h, object.c: introduced mono_object_get_virtual_method ()
13486         to lookup the method invoked on an object when a callvirt is done on
13487         a method.
13488         * icall.c: make MethodInfo::Invoke() always do a virtual call.
13489
13490 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13491
13492         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
13493         current domain when loaded an assembly and failed to load it.
13494
13495         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
13496
13497 2002-10-31  Dick Porter  <dick@ximian.com>
13498
13499         * icall.c: 
13500         * file-io.h: 
13501         * file-io.c: Return the error status in a parameter, as the
13502         GetLastError() value has long since been blown away if we try and
13503         look it up in a subsequent internal call invocation.  Delete the
13504         GetLastError() internal call, because it's useless.
13505
13506 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
13507
13508         * class.[ch]: added cast_class to fix bug 29517
13509
13510 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
13511
13512         * marshal.c: create valid IL code in the filter clause:
13513         the new JIT is less forgiving:-)
13514
13515 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13516
13517         * icall.c: removed get_property internal call.
13518
13519 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
13520
13521         * appdomain.h domain.c: Added an ID to appdomains.
13522         
13523         * threads.c threads.h icall.c: Implement icall
13524         Thread:GetDomainID(), and remove unused icall 
13525         CurrentThreadDomain_internal.
13526
13527 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13528
13529         * icall.c: Don't recurse through the base types in GetConstructor.
13530         Fixes bug #32063. 
13531
13532 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
13533
13534         * mempool.h, mempool.c: added mono_mempool_empty() and
13535         mono_mempool_stats().
13536
13537 2002-10-23  Dick Porter  <dick@ximian.com>
13538
13539         * file-io.c: 
13540         * file-io.h: 
13541         * icall.c: Added MonoIO.GetFileType internal call
13542
13543 2002-10-17  Dick Porter  <dick@ximian.com>
13544
13545         * appdomain.c (mono_runtime_cleanup): Don't signal the async
13546         delegate semaphore before waiting for all threads to finish,
13547         because new threads can also call async delegates.  Fixes bug
13548         32004.
13549
13550         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
13551         of 3 seconds, in case another async job is queued.  (This part is
13552         needed because the bug fix reintroduced the 3s exit lag.)  This
13553         makes the mono_runtime_shutdown flag superfluous.
13554
13555 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
13556
13557         * reflection.c: include ehader size in method section headers.
13558         Really check for suplicated modules entries.
13559
13560 2002-10-17  Martin Baulig  <martin@gnome.org>
13561
13562         * debug-mono-symfile.c: Added back support for locals.
13563
13564 2002-10-14  Martin Baulig  <martin@gnome.org>
13565
13566         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
13567         MONO_TYPE_VOID.
13568
13569 2002-10-14  Martin Baulig  <martin@gnome.org>
13570
13571         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
13572         mono_class_get() instead of looking in the class cache. 
13573
13574 2002-10-13  Martin Baulig  <martin@gnome.org>
13575
13576         * debug-mono-symfile.c: Set version number to 28, include the
13577         signature in method names.
13578
13579 2002-10-13  Martin Baulig  <martin@gnome.org>
13580
13581         * debug-mono-symfile.h: Set version number to 27.
13582
13583 2002-10-11  Martin Baulig  <martin@gnome.org>
13584
13585         * gc.c: Don't register/unregister NULL pointers as disappearing links.
13586
13587 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
13588
13589         * metadata.c, metadata.h: added helper function to allocate signatures.
13590
13591 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13592
13593         * icall.c: added internal call to get the location of machine.config.
13594
13595 2002-10-08  Martin Baulig  <martin@gnome.org>
13596
13597         * debug-mono-symfile.c: Ignore classes with a pending init for the
13598         moment.
13599
13600 2002-10-03  Dick Porter  <dick@ximian.com>
13601
13602         * threads.c: Freebsd pthread_t is a pointer
13603
13604 2002-10-03  Dick Porter  <dick@ximian.com>
13605
13606         * socket-io.c: Implemented GetHostName_internal
13607
13608 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13609
13610         * mono-config.c:
13611         (mono_config_parse_file): don't leak the text.
13612
13613 2002-10-02  Martin Baulig  <martin@gnome.org>
13614
13615         * debug-mono-symfile.c: Added support for methods.
13616
13617 2002-10-01  Martin Baulig  <martin@gnome.org>
13618
13619         * debug-mono-symfile.c: Don't emit methods and line numbers for
13620         the dynamic symbol file, just write the type table.  We can easily
13621         have an external helper program which creates a symbol file for an
13622         IL file.        
13623
13624 2002-10-01  Dick Porter  <dick@ximian.com>
13625
13626         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
13627         Only add the handle to the cleanup array when we're about to
13628         launch the thread.  Bug 31425 deadlocked when the test was run on
13629         mono under w32.
13630
13631 2002-10-01  Martin Baulig  <martin@gnome.org>
13632
13633         * debug-mono-symfile.c: Added support for properties.
13634
13635 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
13636
13637         * reflection.c: unaligned store fix from Mark Crichton
13638         <crichton@gimp.org>.
13639
13640 2002-09-27  Martin Baulig  <martin@gnome.org>
13641
13642         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
13643         New interncall.
13644
13645 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
13646
13647         * assembly.h, assembly.c: use a sane API to hook into the assembly
13648         loading process instead of a useless special-purpouse hack
13649         (ngen needs a hook, too, for example).
13650
13651 2002-09-27  Dick Porter  <dick@ximian.com>
13652
13653         * threads.c (mono_thread_init): Call GetCurrentProcess() so
13654         io-layer can set up some process handle info.  Not needed on w32,
13655         but doesn't hurt either.
13656
13657         * process.c: Pass the program name in the second parameter to
13658         CreateProcess, so the path is searched.  Include the working
13659         directory. Implemented process name, process enumeration, and some
13660         process detail internal calls.
13661         
13662         * icall.c: Added internal calls for process lookup, and some
13663         process details
13664
13665 2002-09-26  Martin Baulig  <martin@gnome.org>
13666
13667         * assembly.c (mono_install_open_assembly_hook): New global
13668         function to install a function to be invoked each time a new
13669         assembly is loaded.
13670         (mono_assembly_open): Run this callback function if set.
13671
13672         * debug-mono-symfile.c: Put back line numbers for the dynamic
13673         symbol file and also record the .il file as source file.  This
13674         allows us to install the temporary symbol file as `file.dbg' just
13675         like a compiler-generated one.
13676
13677 2002-09-26  Nick Zigarovich <nick@chemlab.org>
13678
13679         * Corrected typo in gc.c (BOHEM vs BOEHM).
13680
13681 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13682
13683         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
13684         GetProperties. Also avoid calling g_slist_length in GetProperties and
13685         GetMethods.
13686
13687 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
13688
13689         * reflection.c: avoid unaligned stores (bug spotted by
13690         Mark Crichton  <crichton@gimp.org>).
13691
13692 2002-09-25  Martin Baulig  <martin@gnome.org>
13693
13694         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
13695         instead of guint64 for addresses and added prologue/epilogue info.
13696
13697 2002-09-25  Martin Baulig  <martin@gnome.org>
13698
13699         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
13700         store line number info.  For the dynamic symbol file, we only need
13701         to provide the JIT generated dynamic line number info for the dynamic
13702         symbol file.
13703
13704 2002-09-25  Martin Baulig  <martin@gnome.org>
13705
13706         * debug-mono-symfile.h: Incremented version number.
13707
13708 2002-09-24  Martin Baulig  <martin@gnome.org>
13709
13710         * class.c (mono_debugger_class_init_func): New global function
13711         pointer variable.
13712         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
13713         call it.
13714
13715         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
13716         function.  This is called via the mono_debugger_class_init_func
13717         hook to add all types to the dynamic type table.
13718         (ves_icall_MonoDebugger_GetType): New interncall to get a class
13719         from its metadata token.
13720
13721         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
13722         New interncall for the debugger.
13723
13724 2002-09-24  Nick Drochak <ndrochak@gol.com>
13725
13726         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
13727         before using it in case it is null.
13728         
13729 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
13730
13731         * metadata.c: allow custom modifiers in local var signatures
13732         (bug spotted by Zoltan Varga).
13733
13734 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
13735
13736         * class.c: deal with the <Module> class that may have a NULL vtable.
13737         Eliminate warnings.
13738
13739 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13740
13741         * image.c, image.h: more strong name helpers.
13742         * monosn.c: more work: convert pem keys to cryptoapi format.
13743
13744 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
13745
13746         * string-icalls.c: speedup IndexOf.
13747
13748 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13749
13750         * icall.c: updates from Zoltan.2.Varga@nokia.com.
13751
13752 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
13753
13754         * icall.c: cleanup: use mono_object_domain ().
13755
13756 2002-09-23  Martin Baulig  <martin@gnome.org>
13757
13758         * debug-mono-symfile.c: Improved type support.
13759
13760 2002-09-22  Martin Baulig  <martin@gnome.org>
13761
13762         * debug-mono-symfile.c: Added support for reference types and strings.
13763
13764 2002-09-22  Martin Baulig  <martin@gnome.org>
13765
13766         * debug-mono-symfile.c: Started to work on the type table.
13767
13768 2002-09-21  Martin Baulig  <martin@gnome.org>
13769
13770         * debug-mono-symfile.c: Largely reworked the symbol table format.
13771         The symbol table is now incrementally updated each time a new
13772         method is added.  We're now also using our own magic and version
13773         so that you don't need to recompile all your classes if the
13774         dynamic table changes.
13775         (mono_debug_update_mono_symbol_file): Removed.
13776         (mono_debug_symfile_add_method): New function to add a method.
13777
13778 2002-09-21  Martin Baulig  <martin@gnome.org>
13779
13780         * icall.c
13781         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
13782         New interncall.
13783
13784         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
13785         New interncall to get a method from its metadata token.
13786
13787 2002-09-21  Martin Baulig  <martin@gnome.org>
13788
13789         * debug-mono-symfile.c: Create type table.
13790
13791 2002-09-20  Martin Baulig  <martin@gnome.org>
13792
13793         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
13794
13795 2002-09-20  Martin Baulig  <martin@gnome.org>
13796
13797         * debug-mono-symfile.c: Provide information about params and locals.
13798
13799 2002-09-20  Martin Baulig  <martin@gnome.org>
13800
13801         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
13802         New interncall.
13803
13804         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
13805         interncall to get a method from its metadata token.
13806
13807 2002-09-20  Martin Baulig  <martin@gnome.org>
13808
13809         * debug-mono-symfile.c: Added a few checks for method->header
13810         being non-NULL.  This should never happen, but for the moment
13811         let's use a g_warning() rather than a g_assert().
13812
13813 2002-09-19  Mark Crichton  <crichton@gimp.org>
13814
13815         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
13816         even if support for it isn't present.  Added an #ifdef to fix this.
13817
13818         * socket-io.c: Added checks back for Solaris support.
13819
13820 2002-09-19  Martin Baulig  <martin@gnome.org>
13821
13822         * debug-mono-symfile.c (read_string, write_string): Reflect latest
13823         changes in the symbol file format.
13824
13825 2002-09-18  Martin Baulig  <martin@gnome.org>
13826
13827         * debug-mono-symfile.c: Set version number to 21.
13828
13829 2002-09-18  Dick Porter  <dick@ximian.com>
13830
13831         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
13832         on netbsd.  Fixes bug 30051.
13833
13834 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13835
13836         * reflection.c:
13837         (set_version_from_string): little fix.
13838
13839 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13840
13841         * monosn.c, Makefile.am: added strong name utility.
13842         * reflection.h, reflection.c: implemented delayed signing,
13843         locale, version and hash id assembly attributes.
13844
13845 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
13846
13847         * loader.c, metadata.c: load param attributes in signatures.
13848
13849 2002-09-16  Martin Baulig  <martin@gnome.org>
13850
13851         * debug-mono-symfile.c: Added string table with all method names.
13852
13853 2002-09-14  Martin Baulig  <martin@gnome.org>
13854
13855         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
13856         fast method lookup.
13857
13858 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13859
13860         * reflection.c: record the public key token of referenced assemblies.
13861
13862 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
13863
13864         * image.c, image.h: added functions to get the strong name and the
13865         public key of an assembly.
13866         * pedump.c: use them.
13867
13868 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
13869
13870         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
13871
13872 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
13873
13874         * marshal.c (mono_marshal_get_managed_wrapper): Added
13875         MONO_TYPE_BOOLEAN 
13876
13877 2002-09-11  Martin Baulig  <martin@gnome.org>
13878
13879         * gc.c: Call GC_unregister_disappearing_link() on all links when
13880         finalizing them, this is necessary to aviod a crash in boehm's
13881         finalize handler.
13882
13883 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
13884
13885         * gc.c: handle GetTarget for finalized objects spotted and fixed by
13886         nick@chemlab.org.
13887
13888 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
13889
13890         * icall.c: implemented MonoType::Module.
13891         * reflection.c, reflection.h: mono_module_get_object () from
13892         Tomi Pakarinen <tomi.pakarinen@welho.com>.
13893
13894 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
13895
13896         * icall.c: ignore overridden methods in GetMethods ().
13897         Fix for FieldInfo::SetValue().
13898         * object.c: handle float/double in runtime invoke.
13899
13900 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
13901
13902         * object.c: allow a constructor to be called again on an object.
13903
13904 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13905
13906         * class.h, class.c: move field layout code to it's own function and
13907         export it. Get an interface id earlier. Move fields in MonoClass
13908         so they are more cache friendly and align the bitfields.
13909         * loader.c: temporary handle get_param_names() for a runtime method.
13910         * reflection.c, reflection.h: more code to handle runtime creation of
13911         types.
13912
13913 2002-09-09  Martin Baulig  <martin@gnome.org>
13914
13915         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
13916         signature with the pinvoke field being set for the actual call.
13917
13918 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
13919
13920         * icall.c: removed some unused icalls. Start of map of glib charsets
13921         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
13922
13923 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
13924
13925         * debug-helpers.c: break infinite loop (found and fixed by
13926         Holger Arnold <harnold@gmx.de>).
13927
13928 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
13929
13930         * icall.c: target may be null in create_delegate.
13931
13932 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
13933
13934         * marshal.c: handle a boolean return type.
13935
13936 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
13937
13938         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
13939
13940 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
13941
13942         * gc.c: fix weakreferences.
13943
13944 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
13945
13946         * icall.c: added icall to get default codepage.
13947
13948 2002-09-03  Dick Porter  <dick@ximian.com>
13949
13950         * threads.h: 
13951         * threads.c: Use MonoThread instead of MonoObject where
13952         apropriate.
13953
13954         Store running thread objects in a hash table, so that we have all
13955         the info to hand when waiting for them to finish
13956         (means we don't need OpenThread() any more, so mingw builds should
13957         be fully functional again.)
13958
13959         * verify.c:
13960         * object.h: Added thread ID to MonoThread
13961
13962 2002-09-03  Martin Baulig  <martin@gnome.org>
13963
13964         * icall.c (System.Reflection.Assembly::get_location): New interncall.
13965
13966 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13967
13968         * icall.c: fixed leak in get_temp_path. Thanks lupus.
13969
13970 2002-09-03  Martin Baulig  <martin@gnome.org>
13971
13972         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
13973         argument to store the end address of the disassembled instruction.
13974
13975         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
13976         here from debug-symfile.h.
13977         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
13978         JIT into this struct.
13979         (MonoSymbolFile): Added `char *image_file' field.
13980         (MonoDebugGetMethodFunc): Removed.
13981         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
13982         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
13983         (mono_debug_find_method): New method.
13984
13985         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
13986         create a full symbol file.
13987         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
13988         and static symbol files.
13989         (mono_debug_find_method): The symbol file keeps an internal method hash,
13990         call this to get a MonoDebugMethodInfo from a MonoMethod.
13991
13992         * debug-symfile.[ch]: Removed.
13993
13994 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
13995
13996         * image.c (do_mono_image_open): Remove linker version check.
13997
13998 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
13999
14000         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
14001         wrappers for instance methods.
14002         
14003 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14004
14005         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
14006
14007 2002-08-28  Dick Porter  <dick@ximian.com>
14008
14009         * Makefile.am: Export HOST_CC for w32 builds
14010
14011 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14012
14013         * file-io.c process.c: MonoString are null terminated, no
14014         need for mono_string_to_utf16() anymore.
14015
14016 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14017
14018         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
14019
14020 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
14021
14022         * icall.c, reflection.h: speedup System.MonoType.
14023
14024 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
14025
14026         * reflection.c: allow null as the value of a string argument in
14027         custom attributes constructors.
14028
14029 2002-08-27  Martin Baulig  <martin@gnome.org>
14030
14031         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
14032         `trampoline_address' field.
14033
14034 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
14035
14036         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
14037         check (fixes bug #29486) 
14038
14039 2002-08-27  Martin Baulig  <martin@gnome.org>
14040
14041         * debug-mono-symfile.c: Changed the file format in a way that allows us
14042         open it read-only and to use a specially malloced area for all the
14043         dynamic data.  We can now also generate a symbol file on-the-fly if we're
14044         debugging IL code and there is no MCS generated symbol file for it.
14045
14046 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14047
14048         * object.c: added a define for a good string and array
14049         creation speedup (not enabled by default because we need to deal with
14050         the synch stuff).
14051
14052 2002-08-26  Martin Baulig  <martin@gnome.org>
14053
14054         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
14055         function to create a dynamic symbol file.  This is used by the
14056         debugger to create a symbol file for IL code on-the-fly.
14057
14058 2002-08-26  Martin Baulig  <martin@gnome.org>
14059
14060         * loader.c (mono_lookup_pinvoke_call): Include the error message
14061         from g_module_error() in the error message.
14062
14063 2002-08-24  Martin Baulig  <martin@gnome.org>
14064
14065         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
14066         function to update the symbol file.  The symbol file is mmap()ed
14067         writable, but private.  This allows us to install the symbol file
14068         together with the assembly.
14069
14070 2002-08-24  Martin Baulig  <martin@gnome.org>
14071
14072         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
14073         but they can read the new symbol file format which mcs is now creating.
14074
14075         * debug-symfile.c (mono_debug_find_source_location): Moved to
14076         debug-mono-symfile.c; this is now operating on the new symbol file.
14077
14078 2002-08-23  Martin Baulig  <martin@gnome.org>
14079
14080         * debug-helpers.c (mono_method_desc_from_method): New function to get
14081         a MonoMethodDesc from a MonoMethod.
14082
14083 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
14084
14085         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
14086         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
14087
14088 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
14089
14090         * string-icalls.[ch]: make helper methods static.
14091
14092 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14093
14094         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
14095         types to it and to SetValueInternal.
14096
14097         * object.c: Moved handle_enum label to its proper place. This was the
14098         f... bug! ;-)
14099
14100         This time i compiled mcs and gtk-sharp and they both work.
14101
14102 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14103
14104         * icall.c: reverted partially my previous patch until 
14105         object.c:set_value handles enums correcly.
14106
14107 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14108
14109         * icall.c:
14110         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
14111         (ves_icall_System_Environment_get_MachineName): removed warning when
14112         compiling under cygwin.
14113
14114 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14115
14116         * object.c: fixed field_get_value() for reference types.
14117
14118 2002-08-22  Dick Porter  <dick@ximian.com>
14119
14120         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
14121         Don't free a buffer while it's still needed.  Patch from Jonathan
14122         Liger <Jonathan.liger@wanadoo.fr>
14123
14124 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
14125
14126         * icall.c (ves_icall_System_Environment_get_Platform): Add new
14127         internal call.
14128
14129 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
14130
14131         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
14132         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
14133
14134         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
14135         we call unmanaged code which throws exceptions.
14136
14137 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14138
14139         * appdomain.h: added per-domain entry_assembly.
14140         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
14141         arguments.
14142         * icall.c: Assembly::GetEntryAssembly icall.
14143         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
14144         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
14145
14146 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14147
14148         * appdomain.h, gc.c: added mono_domain_finalize ().
14149
14150 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14151
14152         * object.c:
14153         (mono_print_unhandled_exception): changed g_warning by g_printerr
14154         because g_log has a 1024 characters limit (yeah, i got a big stack
14155         trace). Don't print exception name, that should be in ToString 
14156         returned string.
14157
14158 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14159
14160         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
14161         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
14162
14163 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14164
14165         * object.c:
14166         (mono_print_unhandled_exception): after previous commit, i realized
14167         that MS calls ToString on the exception. I changed this function to
14168         do that. This way we get stack_trace for free.
14169
14170 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14171
14172         * object.c:
14173         (mono_print_unhandled_exception): invoke Message property instead of
14174         getting 'message' field from Exception. Don't allocate memory for
14175         'trace' and 'message' if not needed.
14176
14177 2002-08-18  Dick Porter  <dick@ximian.com>
14178
14179         * unicode.c: Fix asserts to match Encoder.cs checks
14180
14181 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14182
14183         * marshal.c: fix unaligned store issue and a few wrong
14184         opcode argument types.
14185
14186 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14187
14188         * icall.c: added GetUninitializedObjectInternal internal call.
14189
14190 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
14191
14192         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
14193         to the right domain.
14194
14195 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
14196
14197         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
14198
14199         * class.c (class_compute_field_layout): set blittable to false for Strings
14200
14201         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
14202
14203 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14204
14205         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
14206         first chunk of code to create types at runtime. Code to
14207         handle ReflectedType/DeclaringType. Make reflection handles
14208         domain specific.
14209
14210 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
14211
14212         * class.c: set correct name in arrays.
14213
14214 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
14215
14216         * appdomain.c (mono_domain_transfer_object): make it work with
14217         valuetypes. bug fixes.
14218
14219 2002-08-12  Dick Porter  <dick@ximian.com>
14220
14221         * object.h: Rename some parameters to avoid c++ keywords (Patch
14222         from Joseph Wenninger <kde@jowenn.at>)
14223
14224 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
14225
14226         * icall.c: added icall to implement Assembly.GetFile*.
14227
14228 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14229
14230         * reflection.h, reflection.c: code to embed managed resources.
14231
14232 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
14233
14234         * class.c: move all the type size stuff into
14235         class_compute_field_layout().
14236
14237 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
14238
14239         * class.c: ensure enums have always the correct instance size.
14240         * unicode.c: remove wrong assert.
14241
14242 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14243
14244         * assembly.c: fix mem corruption issue.
14245         * image.h, image.c: added mono_image_get_resource () to access
14246         managed resources.
14247         * icall.c: implemented Assembly.EntryPoint property and some
14248         Managed Resources related internalcalls.
14249
14250
14251 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14252
14253         * image.c, image.h: impemented mono_image_get_entry_point ().
14254         * appdomain.c: use mono_image_get_entry_point.
14255
14256 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14257
14258         * reflection.c: support the object type argument when loading
14259         custom attributes.
14260
14261 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
14262
14263         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
14264         String as return type.
14265
14266 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
14267
14268         * reflection.c: fix encoding of named args for custom attrs to match
14269         the ms implementation. Read them back when instantiating custom
14270         attributes.
14271
14272 2002-08-02  Radek Doulik  <rodo@ximian.com>
14273
14274         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
14275         by Dietmar as quick fix
14276         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
14277         16 as stack size, used on more places as quick fix before Dietmar
14278         will fix it properly
14279
14280 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
14281
14282         * object.h, object.c: added accessors for fields and properties.
14283
14284 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
14285
14286         * class.c, class.h: made mono_class_get_field_from_name ()
14287         loop on parent types.
14288         Added mono_class_get_property_from_name ().
14289
14290 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14291
14292         * class.c, class.h: move the code to setup the type vtable in its own
14293         function so that it can be reused also for types created at runtime.
14294         Eliminate the "class" identifier from the header file.
14295         * reflection.c: setup the vtable for enums so that we can create
14296         objects for use in SetConstant ().
14297
14298 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
14299
14300         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
14301         instead of the delegate itself as this pointer (bug #28383)
14302
14303 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
14304
14305         * marshal.c (mono_marshal_get_managed_wrapper): added return type
14306         conversions.
14307
14308 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14309
14310         * loader.c: don't set the pinvoke bit on icalls.
14311
14312 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
14313
14314         * debug-helpers.c (mono_method_full_name): only print a number to
14315         indicate wrapper type (so that the output is more readable in traces).
14316
14317 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
14318
14319         * class.c (mono_class_init): include method override patch from Paolo
14320
14321 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
14322
14323         * icall.c: fixed GetTypeCode().
14324
14325 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
14326
14327         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
14328         use real delegate invoke function to make it work with multicast
14329         delegates (fix bug# 28291).
14330
14331 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14332
14333         * object.c: load constant strings.
14334
14335 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14336
14337         * reflection.c: no magic numbers.
14338         * tabledefs.h: security action enum.
14339
14340 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14341
14342         * assembly.c: fix possible memory corruption.
14343
14344 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14345
14346         * reflection.h, reflection.c: added support for linking resources.
14347         * verify.c: check we have an updated corlib.
14348
14349 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
14350
14351         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
14352         string arrays.
14353         (mono_marshal_string_array): null terminate unmanaged string arrays.
14354         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
14355
14356 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14357
14358         * icall.c: Type.GetType () can now return also types from the
14359         calling assembly.
14360
14361 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14362
14363         * loader.h, loader.c: stack walking support.
14364         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
14365         GetCallingAssembly.
14366
14367 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
14368
14369         * marshal.c: added optimisations for blittable types 
14370
14371         * class.c (mono_array_class_get): do not set blittable attribute on arrays
14372         (mono_class_setup_mono_type): set blittable attribute for single
14373         and double.
14374
14375         * marshal.c (mono_string_utf8_to_builder): impl.
14376         (mono_string_builder_to_utf8): impl.
14377         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
14378
14379 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
14380
14381         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
14382         (mono_marshal_get_managed_wrapper): impl. byref types
14383
14384 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14385
14386         * icall.c:
14387         (search_method): don't display debug message. 
14388
14389 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
14390
14391         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
14392
14393 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
14394
14395         * appdomain.c: set the missing filename when throwing exception.
14396
14397 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
14398
14399         * metadata.c (mono_type_size): code cleanup
14400         (mono_type_stack_size): removed some test code
14401
14402 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
14403
14404         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
14405         mono_get_exception_file_not_found now.
14406
14407         * exception.c (mono_exception_from_name_two_strings): New version
14408         that will call a constructor with two string arguments. 
14409         (mono_get_exception_file_not_found): New helper routine, used to
14410         report file-not-found errors.
14411
14412 2002-07-20  Dick Porter  <dick@ximian.com>
14413
14414         * process.h:
14415         * process.c: Pass file handles to CreateProcess
14416         
14417         * icall.c:
14418         * file-io.h:
14419         * file-io.c: Implemented CreatePipe
14420
14421 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
14422
14423         * metadata.c (mono_get_param_info): set alignment for value types
14424
14425 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
14426
14427         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
14428         Constify mono_domain_assembly_open().
14429         * loader.c: handle null namespace in icalls.
14430
14431 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
14432
14433         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
14434         (emit_str_to_ptr_conv): marshal object as structs
14435
14436         * metadata.c (mono_type_to_unmanaged): marshal object as structs
14437
14438         * marshal.c (mono_marshal_get_runtime_invoke): support value types
14439
14440 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
14441
14442         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
14443         (mono_marshal_get_native_wrapper): we an now return value types
14444
14445 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14446
14447         * verify.c: more checks implemented.
14448
14449 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
14450
14451         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
14452         (fix bug #27695)
14453         (mono_marshal_get_native_wrapper): allow byref arguments
14454         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
14455         impl. PtrToStringXXX methods
14456         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
14457         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
14458         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
14459         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
14460         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
14461
14462 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14463
14464         * reflection.c: fix buglet in parsing an assembly name.
14465
14466 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
14467
14468         * marshal.c (emit_ptr_to_str_conv): first impl.
14469
14470 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14471
14472         * object.c, class.h: cache the vtable in the class as suggested by
14473         vargaz@freemail.hu (Zoltan Varga).
14474
14475 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14476
14477         * class.h, loader.c: added mono_field_from_token().
14478         * verify.c: first cut of type checking code.
14479
14480 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
14481
14482         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
14483
14484 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
14485
14486         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
14487         (fix bug #27782)
14488         (mono_marshal_get_remoting_invoke): impl.
14489         (mono_delegate_begin_invoke): impl.
14490         (mono_mb_emit_save_args): impl.
14491         (mono_delegate_end_invoke): impl.
14492         (mono_marshal_get_delegate_begin_invoke):
14493         (mono_marshal_get_delegate_end_invoke):
14494         (mono_marshal_get_delegate_invoke): generate a special name for
14495         those methods (including the signature) and associate them whith
14496         the delegate class. 
14497
14498 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
14499
14500         * reflection.[ch]: 
14501         (mono_reflection_type_from_name): now it has a MonoImage parameter
14502         which is used as the default image to search the type in. If the image
14503         is NULL or getting the type from it fails, it defaults to corlib.
14504
14505         * icall.c: changed 1 call to mono_reflection_type_from_name to match
14506         new parameter.
14507
14508 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14509
14510         * reflection.c: update the parameter table index.
14511
14512 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14513
14514         * domain.c: don't include the mark byte in the string hash.
14515
14516 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14517
14518         * icall.cs: icall for Type.GetTypeCode ().
14519         * verify: a couple of fixes and disabled local initialization checks.
14520
14521 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
14522
14523         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
14524
14525         * debug-helpers.c (mono_method_full_name): print the type of the
14526         runtime wrapper
14527
14528         * metadata.c (mono_signature_hash): a hash function for signatures
14529         (mono_signature_hash): better hash algorithm
14530
14531         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
14532
14533         * debug-helpers.c (mono_method_full_name): this can now generate
14534         method names with signatures
14535
14536         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
14537         method dont have this pointers.
14538
14539 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
14540
14541         * reflection.c: fixup typebuilder tokens.
14542         * image.c: fix buglet.
14543         * marshal.h: remove whitespace.
14544         * metadata.h, metadata.c: reinstate code that was removed.
14545         * verify.c: handle catch directives and fix another couple of bugs.
14546
14547 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
14548
14549         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
14550         (mono_marshal_get_native_wrapper): make it comp. with the old code
14551         (mono_marshal_get_native_wrapper): support boolean
14552         (mono_marshal_get_managed_wrapper): support more types
14553
14554 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
14555
14556         * class.c (class_compute_field_layout): compute class->blittable attribute.
14557
14558 2002-07-09  Dick Porter  <dick@ximian.com>
14559
14560         * threads.c: Make the thread cleaning up cope with threads that
14561         call ExitThread()
14562
14563 2002-07-08  Radek Doulik  <rodo@ximian.com>
14564
14565         * reflection.c (method_encode_code): use non-translated values to
14566         compute finally_start, this fixes exception handling on ppc, yay!
14567
14568         * decimal.h (struct signscale): fix endianess
14569
14570 2002-07-07  Radek Doulik  <rodo@ximian.com>
14571
14572         * reflection.c: swap box_val and not val
14573
14574 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
14575
14576         * reflection.c, reflection.h: handle full assembly info in type name.
14577         Handle Type arguments when loading custom attributes.
14578         * icall.c: updated to use new mono_reflection_type_from_name () method.
14579
14580 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14581
14582         * loader.c:
14583         (method_from_memberref): also print assembly name when method not found.
14584
14585 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14586
14587         * icall.c:
14588         (ves_icall_TypeGetProperties): fixed bug #27473. 
14589
14590 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14591
14592         * reflection.c: display image name and token when cannot find the
14593         .ctor for an attribute.
14594
14595 2002-07-05  Martin Baulig  <martin@gnome.org>
14596
14597         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
14598
14599 2002-07-04  Dick Porter  <dick@ximian.com>
14600
14601         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
14602         compile on mingw.  This will cause mingw builds to not wait for
14603         subthreads to terminate after the main thread does.  I've lodged a
14604         bug with the mingw developers for them to wrap OpenThread().
14605
14606 2002-07-03  Dick Porter  <dick@ximian.com>
14607
14608         * threads.c: Store thread IDs instead of handles, because
14609         GetCurrentThread() returns a pseudohandle and therefore stores
14610         useless values.  mono_thread_cleanup() continues checking the
14611         array of threads until it is empty, to cope with subthreads
14612         spawning new threads after the main thread has finished.
14613
14614         * profiler.h:
14615         * profiler.c:
14616         * profiler-private.h: Pass the thread ID to thread profiler
14617         functions, instead of a handle
14618
14619 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
14620
14621         * verify.c: fixes to make it more usable.
14622         * pedump.c: added --verify code to verify IL code in an assembly.
14623
14624 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14625
14626         * reflection.c: turn errors into warnings to allow compiling corlib.
14627
14628 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
14629
14630         * reflection.c: add special cases to compile corlib.
14631
14632 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14633
14634         * reflection.c: handle properties with only a set method.
14635
14636 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
14637
14638         * opcodes.h: add enum with opcodes in opval order.
14639
14640 2002-07-01  Dick Porter  <dick@ximian.com>
14641         
14642         * object.h:
14643         * object.c (mono_runtime_run_main): Removed unneeded argument
14644
14645 2002-06-28  Martin Baulig  <martin@gnome.org>
14646
14647         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
14648
14649 2002-06-27  Dick Porter  <dick@ximian.com>
14650
14651         * threads.c: Store the handle in both the parent thread and in the
14652         subthread, to minimise the time between starting a new thread and
14653         storing its ID.
14654
14655 2002-06-26  Dick Porter  <dick@ximian.com>
14656
14657         * appdomain.c (mono_runtime_cleanup): Close the socket library
14658         after all the threads have finished, not before
14659
14660 2002-06-26  Martin Baulig  <martin@gnome.org>
14661
14662         * debug-symfile.c (mono_debug_find_source_location): Added
14663         `guint32 *line_number' argument.  If it's not NULL, store the line number
14664         there and return the file name without the line number.
14665
14666 2002-06-25  Dick Porter  <dick@ximian.com>
14667
14668         * icall.c:
14669         * process.h:
14670         * process.c: Process forking and other support functions
14671
14672 2002-06-25  Dick Porter  <dick@ximian.com>
14673
14674         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
14675         things dont happen when the image is closed.
14676         (mono_image_lookup_resource): Walk the resource section looking
14677         for a particular entry
14678
14679         * cil-coff.h: PE resource section decoding
14680
14681 2002-06-25  Dick Porter  <dick@ximian.com>
14682         
14683         * assembly.h:
14684         * assembly.c: 
14685         (mono_assembly_foreach): Accessor functions to walk the list of
14686         loaded assemblies
14687         (mono_assembly_set_main):
14688         (mono_assembly_get_main): Process methods need to know which
14689         assembly is the "main" one
14690
14691         * object.c (mono_runtime_run_main): Record the main assembly
14692
14693         * debug-helpers.c: Fix typo
14694
14695 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
14696
14697         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
14698         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
14699
14700 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
14701
14702         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
14703
14704 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
14705
14706         * image.c (do_mono_image_open): Initialize reference count,
14707         otherwise we leak the MonoImage.
14708
14709 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14710
14711         * reflection.c: small tweak to handle self-hosting.
14712
14713 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
14714
14715         * reflection.c: fix type name parse code.
14716
14717 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14718
14719         * reflection.c: break out of the loop.
14720         * image.c: special case corlib.
14721
14722 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14723
14724         * reflection.c: add all the custom attrs at the end to ensure the
14725         ctors have been properly initialized when the attributes are defined
14726         in the current assembly.
14727
14728 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14729
14730         * reflection.c: handle correctly multiple-nested types.
14731
14732 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
14733
14734         * row-indexes.h: fix typos.
14735         * reflection.c: adjust for typos and fix method_def_or_ref
14736         encoding in MethodImpl table.
14737
14738 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14739
14740         * reflection.c: fix entry point patching (thanks Serge!).
14741
14742 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
14743
14744         * verify.c: add check for System.Exception
14745
14746 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
14747
14748         * image.c, class.c: minifix for code just c&p'ed.
14749         * reflection.c: warning fix.
14750         * object.h, loader.h, domain.c: load also StringBuilder.
14751
14752 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
14753
14754         * marshal.h, marshal.c: some support code to handle complex marshaling.
14755
14756 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14757
14758         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
14759         Better signatures with vtable error dump.
14760
14761 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
14762
14763         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
14764
14765 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
14766
14767         * icall.c (ves_icall_Type_GetField): impl.
14768
14769 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14770
14771         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
14772         to retrieve a marshal description blob for a field or param.
14773
14774 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
14775
14776         * reflection.h, reflection.c: change order of nested type emission
14777         to avoid table corruption. The NestedTypes table is sorted.
14778         * icall.c: change order of GetConstructor results to workaround mcs bug.
14779
14780 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
14781
14782         * reflection.h, reflection.c: handle field and param marshal
14783         information.
14784
14785 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
14786
14787         * icall.c, marshal.c marshal.h: more Marshal class implementation.
14788
14789 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14790
14791         * reflection.c: fix call convention.
14792
14793 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14794
14795         * reflection.h, reflection.c: mono_image_get_memberref_token()
14796         takes a type instead of a class, now. Added
14797         mono_image_get_array_token() to create tokens for the special
14798         multi-dim array methods.
14799
14800 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
14801
14802         * assembly.c: handle modules (no assembly table). Split
14803         loading references in its own function.
14804         * class.c: handle moduleref resolution scope.
14805         * image.c, image.h: cache module name in image.
14806
14807 2002-06-07  Martin Baulig  <martin@gnome.org>
14808
14809         * reflection.c (mono_image_get_type_info): Only add a class layout entry
14810         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
14811
14812 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
14813
14814         * icall.c: more signature fixes that used uint instead of int.
14815
14816 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14817
14818         * reflection.c: fixed signature of field refs.
14819
14820 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
14821
14822         * class.c, reflection.c: handle typerefs of nested types
14823         (both on read and when writing files).
14824
14825 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
14826
14827         * icall.c: fix method signatures that tried to workaround the previous
14828         typo, d'oh!
14829
14830 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
14831
14832         * debug-helpers.c: fix typo.
14833
14834 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
14835
14836         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
14837         rewrote the PE/COFF writing code (our programs are understood by the
14838         ms runtime, now).
14839
14840 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
14841
14842         * gc.c, gc.h, icall.c: weakreference support.
14843
14844 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
14845
14846         * Makefile.am, mono-config.c: use $(sysconfdir).
14847
14848 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
14849
14850         * icall.c: changed default precision of Double.ToString() to 15.
14851         Fixed memory leak. Unified with Single.ToString.
14852
14853 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
14854
14855         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
14856
14857 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
14858
14859         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
14860         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
14861         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
14862         and myself.
14863
14864 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14865
14866         * debug-symfile.c, sysmath.c: yet more compilation fixes.
14867
14868 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
14869
14870         * reflection.c, socket-io.c: more compilation fixes.
14871
14872 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
14873
14874         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
14875         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
14876         unicode.c: warning and compiler compatibility fixes.
14877
14878 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
14879
14880         * class.h, metadata.c: fixed warnings/compilation errors.
14881
14882 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
14883
14884         * Makefile.am, mono-config.c, mono-config.h: configuration file
14885         support routines.
14886         * loader.c, loader.h: make Dll mapping configurable at runtime in the
14887         config file. Export methods to insert and lookup mappings.
14888
14889 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
14890
14891         * reflection.c: handle types and boxed objects in custom attr
14892         constructors.
14893
14894 2002-05-30  Martin Baulig  <martin@gnome.org>
14895
14896         * debug-symfile.c
14897         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
14898
14899 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
14900
14901         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
14902         to lookup the implmap row for a P/Invoke method.
14903         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
14904         P/Invoke method from the runtime on an as needed basis.
14905
14906 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
14907
14908         * metadata.c (mono_metadata_parse_signature): impl.
14909
14910 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
14911
14912         * class.c: handle .pack directive.
14913
14914 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
14915
14916         * object.c: initialize static fields with RVA data.
14917
14918 2002-05-25  Martin Baulig  <martin@gnome.org>
14919
14920         * debug-symfile.c
14921         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
14922
14923 2002-05-24  Martin Baulig  <martin@gnome.org>
14924
14925         * debug-symfile.c
14926         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
14927         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
14928         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
14929
14930 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
14931
14932         * object.c: special case string ctros in invoke.
14933         * gc.c: silly whitespace changes.
14934
14935 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
14936
14937         * threadpool.[ch]: impl. a threadpool that can
14938         be used by mint and mono.
14939
14940 2002-05-22  Martin Baulig  <martin@gnome.org>
14941
14942         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
14943         The first argument is now a `MonoReflectionModuleBuilder *', the return
14944         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
14945         `methods' field to get the method builder.  The `token' argument is the
14946         unfixed token.
14947
14948         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
14949         invalid characters instead of g_assert_not_reached()ing.  This seems
14950         to be the behaviour of mscorlib.
14951
14952 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
14953
14954         * object.c (mono_runtime_invoke_array): applied patch from Rachel
14955         Hestilow to fix bug #25104
14956
14957 2002-05-21  Martin Baulig  <martin@gnome.org>
14958
14959         * debug-symfile.c (mono_debug_find_source_location): New function.
14960         Looks up an IL offset in the line number table and returns the source
14961         location as a string.
14962
14963 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14964
14965         * icall.c:
14966         (mono_double_ToStringImpl): changed %f by %g until we have something
14967         better.
14968
14969 2002-05-21  Nick Drochak  <ndrochak@gol.com>
14970
14971         * icall.c : Use different name for Math.Pow's icall.  Needed to check
14972         parameters first in C#.
14973
14974 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
14975
14976         * icall.c, reflection.h: added icall to get info about an event.
14977
14978 2002-05-20  Radek Doulik  <rodo@ximian.com>
14979
14980         * object.c (mono_value_box): don't use memcpy for boxing on BIG
14981         endian
14982         (mono_value_box): don't use memcpy for small sizes on
14983         architectures with unaligned access
14984
14985 2002-05-20  Martin Baulig  <martin@gnome.org>
14986
14987         * reflection.c (mono_reflection_setup_internal_class): Don't crash
14988         if `tb->parent == NULL'.
14989         (mono_reflection_create_internal_class): New function.  This is
14990         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
14991         for enum types.
14992
14993         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
14994         New interncall.
14995
14996 2002-05-19  Martin Baulig  <martin@gnome.org>
14997
14998         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
14999         argument to get the length, don't default to the array length.
15000
15001 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
15002
15003         * assembly.c (mono_assembly_setrootdir): New function used to
15004         override the MONO_ASSEMBLIES directory.
15005
15006 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15007
15008         * icall.c: ValueType_GetHashCode() initialize local var.
15009
15010 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15011
15012         * reflection.c: sort custom attributes table.
15013
15014 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15015
15016         * reflection.c: support named args in custom attributes (write support).
15017
15018 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
15019
15020         * reflection.c: fix finally position calculation.
15021
15022 2002-05-15  Radek Doulik  <rodo@ximian.com>
15023
15024         * reflection.c: fixed endianess at many places
15025
15026         * icall.c (ves_icall_InitializeArray): comment out debug msg
15027
15028 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
15029
15030         * object.c (mono_unhandled_exception): new function to handle
15031         unhandled exceptions.
15032         (mono_unhandled_exception): call the UnhandledException event.
15033         (mono_runtime_delegate_invoke): impl.
15034
15035 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
15036
15037         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
15038         returns the RVA, not the direct pointer to the data. Handle the case
15039         when the class size is fixed.
15040
15041 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15042
15043         * reflection.c: fix some endianess issues.
15044
15045 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
15046
15047         * object.c (mono_runtime_invoke): is now able to catch exceptions.
15048
15049         * threads.c (mono_thread_init): added a callback which is invoked
15050         at thread start.
15051
15052 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
15053         
15054         * icall.c: make GetHashCode return non-negative values.
15055
15056 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
15057
15058         * object.c, icall.c, gc.c: revert to address-based hashcode.
15059
15060 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
15061
15062         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
15063
15064 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15065
15066         * icall.c, class.c: special case <Module>.
15067
15068 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
15069
15070         * icall.c: fix bug in GetNow().
15071
15072 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
15073
15074         * object.c (mono_runtime_class_init): make sure that we call all
15075         static class constructors.
15076
15077 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15078
15079         * reflection.c: sort methodsemantics table.
15080
15081 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15082
15083         * reflection.h, reflection.c: honour init locals setting.
15084
15085 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
15086
15087         * icall.c: copied Double ToStringImpl for Single ToStringImpl
15088
15089 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15090
15091         * reflection.c: support ContructorBuilders in attribute blob creation.
15092
15093 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15094
15095         * reflection.c: some changes to build a binary that can be run
15096         directly in windows.
15097
15098 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15099
15100         * loader.c: print a big message when an icall can't be found.
15101
15102 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15103
15104         * string-icalls.c: fix bug 24248.
15105
15106 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15107
15108         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
15109         icall.c, reflection.h: separate assembly loading by pathname and by
15110         assembly name. Use the MONO_PATH env var to search for assemblies.
15111
15112 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15113
15114         * assembly.c, image.h: add some support for assemblies
15115         with multiple modules.
15116         * class.c, class.h: export mono_class_from_typeref().
15117         * loader.c: remove duplicated code and use mono_class_from_typeref(),
15118         instead.
15119
15120 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15121
15122         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
15123         documentation says (the ECMA one is correct).
15124
15125 2002-05-02  Dick Porter  <dick@ximian.com>
15126
15127         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
15128         Don't name the synchronisation mutex.
15129
15130 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
15131
15132         * rand.c
15133         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
15134         Make the prototypes match.
15135         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
15136         Same.
15137
15138         * icall.c
15139         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
15140         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
15141         all systems have tm.tm_zone, so use strftime() with %Z to print
15142         the timezone abreviation into a temp string.
15143
15144         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
15145         rather than mono_array_addr() on a MonoString on Big Endian
15146         machines.
15147
15148 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
15149
15150         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
15151         fix bug 24041
15152
15153 2002-04-30  Dick Porter  <dick@ximian.com>
15154
15155         * socket-io.c: Cope with SOCKET being an integer rather than a
15156         pointer now.
15157
15158         * threads.c: Added Thread_free_internal, to deal with thread
15159         handle cleanup.  Moved calls to handle_store() and handle_remove()
15160         to start_wrapper(), so each can only be called once.  Allocate
15161         synchronisation blocks with GC_malloc(), and use GC finalisation
15162         to close the handles.
15163
15164         * icall.c: added System.Threading.Thread::Thread_free_internal
15165
15166 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15167
15168         * icall.c: support Environment.Exit, CommandLineArgs().
15169
15170 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15171
15172         * object.c, object.h: added mono_runtime_run_main () and
15173         mono_runtime_get_main_args () for use in System.Environment.
15174
15175 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15176
15177         * gc.c: fix thinko, enable actual finalization since the jit is now
15178         fixed.
15179
15180 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15181
15182         * gc.c, object.c: take into account that an object may be offset wrt the address
15183         returned by GC_malloc().
15184
15185 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15186
15187         * image.c: handle files without entries in the assembly table (modules).
15188
15189 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
15190
15191         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
15192         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
15193         allowed to be null when it's System.Object class setup.
15194
15195 2002-04-27  Martin Baulig  <martin@gnome.org>
15196
15197         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
15198         if `tb->parent == NULL' rather than crashing.
15199
15200 2002-04-28  Nick Drochak  <ndrochak@gol.com>
15201
15202         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
15203         calling acos() where asin() should have been called.
15204
15205 2002-04-26  Martin Baulig  <martin@gnome.org>
15206
15207         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
15208         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
15209         there's a subdirectory called `System', but we don't want to read that
15210         subdirectory as an assembly.
15211
15212 2002-04-25  Martin Baulig  <martin@gnome.org>
15213
15214         * debug-symfile.c: Reflect latest MonoString changes.
15215
15216 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15217
15218         * rand.c, rand.h: instance method icalls need to have an explicit
15219         this pointer as first argument in the C implementation.
15220
15221 2002-04-25  Nick Drochak <ndrochak@gol.com>
15222
15223         * icall.c: Fix typo in map for GetNonZeroBytes
15224
15225 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
15226
15227         * string-icalls.c : String does now passes unit tests without any 
15228         errors, the following changes has been made:
15229         
15230         Implemented replace methods.
15231         Renaming of methods to (try) follow the standard.
15232         Fixed compare ordinal
15233         Made all memory allocated directly to function instead of via icall function.
15234         Small performance fix in is_in_array function
15235                         
15236  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
15237
15238         c (mono_string_Internal_ctor_charp_int_int):
15239         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
15240         sindex < 0, throw ArgumentOutOfRangeException instead of
15241         ArgumentNullException.
15242
15243         Added new check for length == 0, however
15244         I need to make it return String.Empty from the C code.
15245         
15246         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
15247         that calculate the length for us here.
15248         
15249         (mono_string_Internal_ctor_sbytep_int_int): Replaced
15250         mono_string_new_utf16 with mono_string_new, since value is utf8.
15251
15252 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15253
15254         * object.c: register the object for finalization if needed.
15255         Allocate one more char in the string for the terminating 0 char.
15256
15257 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15258
15259         * class.c, class.h, image.c: check if a type implemenst a destructor.
15260         Use the proper key for array class lookups.
15261         * icall.c: register the icalls in the System.GC class.
15262         * gc.c, gc.h: GC-related functions and icalls.
15263
15264 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15265
15266         * icall.c:
15267         * socket-io.c:
15268         * unicode.c: free some strings gotten from mono_string_to_utf8 and
15269         changed a couple of free () by g_free ().
15270
15271         * decimal.c: one-liner in the comments for decimal2string ().
15272
15273 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
15274
15275         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
15276
15277 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
15278
15279         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
15280         * object.c (mono_runtime_invoke_array) : handle null in params
15281
15282 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
15283
15284         * string-icalls.c: fixed bug in split (one off bug)
15285
15286 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
15287
15288         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
15289         * icalls.c: added String::Equals as internal method
15290
15291 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
15292
15293         * threads.c: fixed bug in the double interlocked functions
15294
15295 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
15296
15297         * threads.c: implemented all of the new interlocked icalls.
15298         * string-icalls.c: fix a bug in insert.
15299         * icalls.c: added the icalls for interlocked, removed old string functions.
15300         
15301 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15302
15303         * loader.c: fix off-by-one error when reading argument names.
15304
15305 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15306
15307         * profiler.c: win32 counter implementation (untested).
15308         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
15309         (the latter needs testing and more complete impl. from win32 folks).
15310
15311 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
15312
15313         * object.c: mono_array_new_full workaround mono_array_class_get
15314         problem.
15315
15316 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15317
15318         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
15319         * object.h (mono_string_chars): Changed casting type.
15320
15321 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15322
15323         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
15324                            method signatures to use gunichar2 instead of gint16.
15325
15326 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
15327
15328         * object.h, object.c: domain-specific versions of mono_object_new and
15329         mono_array_new.
15330
15331 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
15332
15333         * object.c: changed String layout
15334
15335         * string-icalls.c (mono_string_Internal_ctor_chara): added
15336         internal string constructors.
15337
15338 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
15339
15340         * threads.c: pass 'this' to the thread start routine.
15341
15342 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15343
15344         * string-icalls.c: fix IndexOf and LastIndexOf. Now
15345         InternalCompareStr don't call twice mono_string_cmp_char for the last
15346         character. Improved performance in mono_string_cmp_char.
15347
15348 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15349
15350         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
15351         code into its own library: libmonoruntime.
15352
15353 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
15354
15355         * object.h, object.c: changed array format so that szarrays do not
15356         require a bounds structure.
15357         * icall.c, appdomain.c: support for new szarray format.
15358
15359 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
15360
15361         * metadata.c: compare also the retuns type when comparing signatures:
15362         we didn't do this as an optimization since really overloaded methods
15363         must differ also in the arguments, but this doesn't work with
15364         low-level IL code (or when using explicit conversion operators: see
15365         bug#23498 for an example).
15366
15367 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15368
15369         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
15370
15371 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15372
15373         * icall.c: make MonoType::GetElementType its own icall.
15374
15375 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
15376
15377         * icall.c: remove MonoMethod_get_Name().
15378         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
15379         object.
15380
15381 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15382
15383         * string-icalls.c: optimized a few methods.
15384
15385 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
15386
15387         * icall.c: added all new string internal calls
15388         * string-icalls.c: added, new string internal call implementation.
15389         * object.c: added mono_string_new_size for allocating a string a size
15390
15391 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
15392
15393         * object.c (mono_object_isinst): use the same code as in the
15394         optimized x86 version.
15395
15396 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15397
15398         * profiler.c: TSC-based timer code (faster and more accurate).
15399         Not hooked up in configure, yet (set USE_X86TSC to 1).
15400
15401 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
15402
15403         * profiler.c, profiler.h: track time spent compiling methods.
15404         * threads.c: track thread creation/destruction.
15405
15406 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
15407
15408         * profiler.c, profiler.h, profiler-private.h: profiling interface
15409         and sample implementation. Moved here so that it can be used also by
15410         the jit.
15411
15412 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
15413
15414         * reflection.c, reflection.h: keep types and other handles separate in
15415         the hash tables for referred tokens. Add guid for modules.
15416
15417 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
15418
15419         * assembly.c: fix bugs found with valgrind.
15420         * metadata.h, metadata.c: added mono_metadata_guid_heap().
15421
15422 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
15423
15424         * threads: added icall support for getting current domain for
15425                    the thread.
15426  
15427 2002-04-13  Martin Baulig  <martin@gnome.org>
15428
15429         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
15430         (MonoDebugVarInfo): Added `index' field for register based addresses.
15431         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
15432         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
15433         `MonoDebugVarInfo *params' and `guint32 this_offset' with
15434         `MonoDebugVarInfo *this_var'.
15435
15436         * debug-symfile.c (relocate_variable): New static function to write
15437         a location description for a local variable or method parameter.
15438
15439 2002-04-12  Martin Baulig  <martin@gnome.org>
15440
15441         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
15442         stack offset and begin/end scope address of a local variable.
15443         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
15444         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
15445         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
15446
15447         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
15448         Added new relocation types for start/end scope of a local variable.
15449
15450 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15451
15452         * object.h: add mono_object_domain() macro.
15453         * reflection.c: handle typespecs.
15454         * icall.c: MonoMethod::get_Name() implementation.
15455
15456 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15457
15458         * icall.c: String::GetHashCode() icall implementation.
15459
15460 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15461
15462         * icall.c: String::IndexOfAny icall.
15463         * object.c, object.h: make array->max_length more useful.
15464         Intrduced mono_object_class() and mono_string_length() macros.
15465
15466 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15467
15468         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
15469         instead of g_unichar_isdigit.
15470
15471 2002-04-11  Nick Drochak  <ndrochak@gol.com>
15472
15473         * icall.c: Implement a simple Double.ToString().
15474
15475 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15476
15477         * appdomain.h: only io-layer.h is supposed to be included.
15478         * icall.c: explicitly import environ. Fix warning.
15479
15480 2002-04-10  Nick Drochak  <ndrochak@gol.com>
15481
15482         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
15483                 return true even if it's not Daylight Savings time.
15484                 Only return false for the case where the function isn't
15485                 implemented for a plaform (read Windows).
15486
15487 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15488
15489         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
15490         data with a mutex.
15491
15492 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
15493
15494         * mempool.c (mono_mempool_alloc): only use g_malloc when
15495         absolutely necessary.
15496
15497 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
15498
15499         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
15500
15501         * class.c (mono_class_vtable): use domain mempool to allocate vtable
15502         (mono_class_proxy_vtable): use domain mempool
15503
15504 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15505
15506         * appdomain.h, appdomain.c: split initialization that requires the
15507         execution engine support into mono_runtime_init().
15508
15509 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
15510
15511         * class.c (mono_class_init): don't include vtable inside MonoClass
15512         to save some memory, gather some statistics.
15513         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
15514
15515 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15516
15517         * icall.c: internalcall implementation for ValueType.Equals().
15518
15519 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
15520
15521         * object.c (mono_message_init): moved 
15522         (mono_runtime_exec_main): new arch. independent impl.
15523         (mono_runtime_invoke_array): new method - like
15524         mono_runtime_invoke, but you can pass an array of objects.
15525         (mono_remoting_invoke): new arch. independent impl.
15526         (mono_message_invoke): new arch. independent impl.
15527         (mono_runtime_class_init): new arch. independent impl.
15528         (mono_runtime_object_init): new arch. independent impl.
15529
15530 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15531
15532         * metadata.c, object.c, reflection.c: documented the exported
15533         functions.
15534
15535 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15536
15537         * icall.c: simpler code to pass the assembly builder data to corlib.
15538         Implement GetNestedTypes() internalcall.
15539
15540 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
15541
15542         * class.c: warn if a type can't be loaded.
15543
15544 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
15545
15546         * image.h: typedef MonoImageOpenStatus
15547         * types.h: removed unused file
15548         
15549 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
15550
15551         * icall.c: Enum_ToObject accepts enum value arguments.
15552
15553 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15554
15555         * class.c: move initialization of properties, events and nested
15556         classes, so that they happen for interfaces, too.
15557
15558 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15559
15560         * icall.c: cleanup some ugly casts in Array_SetValue*.
15561
15562 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15563
15564         * icall.c: the values array fro enums is of the correct type, now.
15565         Implement (correctly) getFullName instead of assQualifiedName for
15566         MonoType.
15567         * reflection.h, reflection.c: added mono_type_get_name ().
15568
15569 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15570
15571         * assembly.c, image.h: for each MonoImage, record from wich assembly
15572         it was loaded.
15573         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
15574         Make Type.Assembly work.
15575
15576 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
15577
15578         * debug-symfile.h: use char* instead of gpointer to avoid
15579         unnecessary casts.
15580
15581         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
15582
15583         * icall.c (ves_icall_InternalExecute): impl. FielSetter
15584         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
15585
15586 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
15587
15588         * icall.c (mono_message_init): impl. (code cleanup)
15589         (ves_icall_InternalExecute): impl. FieldGetter
15590
15591         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
15592         defined we call all (non-static)methods through the vtable. 
15593
15594 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
15595
15596         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
15597         finalizer even though the memory is still referenced (and the chunk of
15598         memory is not freed).
15599
15600 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
15601
15602         * assembly.c: fix brokeness.
15603
15604 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
15605
15606         * class.c: kill some warnings. Check explicit interface method
15607         implementation also without considering the namespace.
15608         Load also literal strings in static class data.
15609
15610 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
15611
15612         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
15613         (default_assembly_name_resolver): Make the resolver take the
15614         "base" directory where the assembly was originally defined, so we
15615         can load DLLs that are in the same directory as the assembly that
15616         is being referenced.
15617
15618 2002-03-28  Dick Porter  <dick@ximian.com>
15619
15620         * file-io.h: 
15621         * file-io.c:
15622         * socket-io.c: 
15623         * unicode.h: 
15624         * unicode.c: Warning cleanups
15625
15626 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
15627
15628         * object.h, reflection.h: use the correct type instead of MonoObject.
15629
15630 2002-03-28  Martin Baulig  <martin@gnome.org>
15631
15632         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
15633         (mono_debug_update_symbol_file): Initialize classes if necessary.
15634
15635 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
15636
15637         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
15638         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
15639
15640 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
15641
15642         * assembly.h: fix function prototype.
15643         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
15644         * mono-endian.h: use const cast.
15645
15646 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
15647
15648         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
15649
15650 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
15651
15652         * loader.c: don't assert when a typeref can't be loaded, give
15653         a chance to the runtime to trow an exception instead.
15654         * loader.h: fix warning.
15655
15656 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
15657
15658         * class.c (mono_class_proxy_vtable): added proxy support
15659
15660 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
15661
15662         * icall.c: removed last of PAL calls, added System.Environment
15663         * file-io.h, file-io.c: MonoIO implementation
15664         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
15665
15666 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
15667
15668         * appdomain.c: do not use the byte marker in ldstr table lookup.
15669         * debug-helpers.c: allow two ':' to separate class and method name.
15670         * object.c: allocate arrays bounds with the GC, too.
15671         * verify: add a few more checks.
15672
15673 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
15674
15675         * reflection.c: output also literal strings. Allocate parameter data
15676         with GC_malloc() (thanks, Martin, for catching this!).
15677
15678 2002-03-26  Martin Baulig  <martin@gnome.org>
15679
15680         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
15681         include the `this' offset in the `param_offsets'.
15682
15683 2002-03-25  Martin Baulig  <martin@gnome.org>
15684
15685         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
15686         mono_debug_get_class() function to get the classes. Added new
15687         relocation types for arrays and strings.
15688         (mono_debug_get_class): New static function to search in all
15689         referenced assemblies for a metadata token.
15690
15691         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
15692
15693 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
15694
15695         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
15696         hold gc-allocated objects. Make the string heap a stream like the
15697         others. Removed duplicated code when writing stream info.
15698         Added asserts to catch possible buffer overflows. Set the sorted map
15699         for tables that need sorting. Added some documentation.
15700
15701 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
15702
15703         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
15704         for interned strings and vtables.
15705
15706 2002-03-24  Martin Baulig  <martin@gnome.org>
15707
15708         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
15709         it in the array since it was created with g_slist_prepend().
15710
15711 2002-03-24  Martin Baulig  <martin@gnome.org>
15712
15713         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
15714         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
15715         (mono_debug_method_from_token): Renamed to
15716         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
15717         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
15718
15719         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
15720         relocation types.
15721
15722         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
15723
15724 2002-03-24  Martin Baulig  <martin@gnome.org>
15725
15726         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
15727         (mono_debug_method_from_token): New func.
15728
15729         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
15730         New interncall, calls mono_debug_local_type_from_signature().
15731         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
15732         calls mono_debug_method_from_token().
15733
15734 2002-03-23  Martin Baulig  <martin@gnome.org>
15735
15736         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
15737         specifies the number of bytes to be converted, not the array size.
15738         Return the number of chars, not the number of bytes.
15739         (ves_icall_iconv_get_chars): The `byteCount' argument
15740         specifies the number of bytes to be converted, not the array size.
15741
15742 2002-03-23  Martin Baulig  <martin@gnome.org>
15743
15744         * reflection.h (MonoReflectionSigHelper): New type.
15745
15746         * reflection.c (mono_reflection_sighelper_get_signature_local),
15747         (mono_reflection_sighelper_get_signature_local): New functions.
15748
15749         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
15750         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
15751         interncalls.
15752
15753 2002-03-23  Martin Baulig  <martin@gnome.org>
15754
15755         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
15756         is_writeable is set.
15757         (mono_raw_buffer_update): New function to write the modified map
15758         back to disk.
15759
15760         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
15761
15762         * debug-symfile.c (mono_debug_update_symbol_file): Call
15763         mono_raw_buffer_update() when done writing.
15764
15765 2002-03-23  Martin Baulig  <martin@gnome.org>
15766
15767         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
15768
15769         * debug-symfile.c: Added support for arguments and local variables.
15770
15771 2002-03-23  Dick Porter  <dick@ximian.com>
15772
15773         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
15774         protected by ifdefs, hence breaking the w32 build.
15775
15776 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15777
15778         * object.c: implement is_interned() the right way.
15779
15780 2002-03-21  Martin Baulig  <martin@gnome.org>
15781
15782         * debug-symfile.[ch]: New files to handle debugging information
15783         files. There's also support to dynamically update these symbol
15784         files to include machine dependent information.
15785
15786 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
15787
15788         * threads.c (mono_thread_create): new function to create thread
15789         from C
15790
15791 2002-03-20  Martin Baulig  <martin@gnome.org>
15792
15793         * icall.c (ves_icall_InternalInvoke): Create a new object if the
15794         method is a constructor.
15795         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
15796         points to ves_icall_InternalInvoke().
15797
15798 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
15799
15800         * file-io.c: Flush shouldn't throw exceptions.
15801
15802 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
15803
15804         * file-io.c: FileStream flush support; FileSetLength now
15805         restores file pointer.
15806
15807 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
15808
15809         * class.c: set image for pointer classes.
15810
15811 2002/03/19  Nick Drochak <ndrochak@gol.com>
15812
15813         * sysmath.c: Forgot one.
15814
15815 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
15816
15817         * sysmath.c: Avoid redefining existing names.
15818
15819 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
15820
15821         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
15822         handled by runtime as icall rather than dllimport from libm.so
15823         * file-io.c, file-io.h: fixed handle argument type.
15824
15825 2002-03-18  Dick Porter  <dick@ximian.com>
15826
15827         * reflection.c (mono_image_get_type_info): rename interface to
15828         iface, because of "#define interface struct" on windows.
15829
15830 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
15831
15832         * class.c, class.h: rename and export mono_ptr_class_get().
15833         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
15834         * reflection.c, reflection.h, icall.c: better/saner type name
15835         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
15836         method signatures.
15837
15838 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
15839
15840         * class.c (mono_class_init): removed hardcoded GHC_SLOT
15841
15842         * icall.c (ves_icall_InternalInvoke): impl.
15843
15844 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15845
15846         * reflection.c: output the interface map table, too.
15847
15848 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
15849
15850         * class.c (class_compute_field_layout): separate computation of 
15851         static field layout
15852
15853 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
15854
15855         * icall.c: added System.Buffer support.
15856         * file-io.c: moved file icalls from PAL to FileStream.
15857
15858 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
15859
15860         * icall.c (ves_icall_System_Object_GetHashCode): impl.
15861
15862 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
15863
15864         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
15865
15866 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
15867
15868         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
15869
15870 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
15871
15872         * debug-helpers.{c,h}: moved here from monograph some useful functions
15873         to locate a method by name/signature in a class or image. Included
15874         also a small and flexible IL disassembler.
15875
15876 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
15877
15878         * reflection.c: fixup tokens in methods with small header size, too.
15879
15880 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
15881
15882         * object.c (mono_string_to_utf8): remove assert(!error), instead
15883         print a warning. 
15884
15885 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
15886
15887         * icall.c: update to the new mono_Array_class_get interface.
15888
15889 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
15890
15891         * appdomain.c, object.c: Boehm-GC enable.
15892         * icall.c: make get_data_chunk() support split data requests.
15893         Ensure a class is initialized in more cases. Return only the first
15894         property found in GetProperties() or the compiler gets confused. 
15895         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
15896         * reflection.h, reflection.c: add fixup mechanism for field and method
15897         tokens. Initialize assembly->typeref in a single place. Output
15898         properties after events. Support custom attributes for events, too.
15899         Typo fix for paramter custom attrs.
15900
15901 2002-03-07  Martin Baulig  <martin@gnome.org>
15902
15903         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
15904
15905 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
15906
15907         * class.c (mono_array_class_get): fix. for multi. dim. arrays
15908
15909 2002-03-06  Martin Baulig  <martin@gnome.org>
15910
15911         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
15912         non-zero lower bounds. See testcases #F10-#F13.
15913
15914 2002-03-05  Martin Baulig  <martin@gnome.org>
15915
15916         * exception.c (mono_get_exception_argument_out_of_range): New exception.
15917
15918         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
15919         ves_icall_System_Array_GetValue(), only calculate the absolute array position
15920         here.
15921         (ves_icall_System_Array_SetValue): Likewise.
15922         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
15923         as argument and does the actual work. This function is used when copying a
15924         multi-dimensional array.
15925         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
15926         now do all the widening conversions of value types.
15927         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
15928
15929 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15930
15931         * class.c: remove some magic numbers and use the smbolic names,
15932         instead. Added init_events() to load event info at class init time.
15933         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
15934         and mono_metadata_methods_from_event().
15935         * reflection.h, reflection.c: added support for writing out the evnets
15936         related information.
15937
15938 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
15939
15940         * reflection.h, icall.c: use a different method (GetInterfaces)
15941         to gather interface info and add isbyref, isprimitive and
15942         ispointer to the ves_icall_get_type_info() return value.
15943
15944 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
15945
15946         * class.h: stared adding support for events.
15947         * icall.c: split find_members implementation. Added debug icall to get
15948         the address of an object.
15949         * reflection.c: handle TypeBuilders in mono_type_get_object().
15950
15951 2002-03-01  Martin Baulig  <martin@gnome.org>
15952
15953         * icall.c (ves_icall_System_Array_GetLength): This must throw an
15954         ArgumentOutOfRangeException(), not an ArgumentException().
15955         (ves_icall_System_Array_GetLowerBound): Likewise.
15956         (ves_icall_System_Array_GetValue): Improved argument checking.
15957         (ves_icall_System_Array_SetValue): Improved argument checking.
15958
15959 2002-03-01  Martin Baulig  <martin@gnome.org>
15960
15961         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
15962         called with invalid arguments rather than just dying with g_assert().
15963         (ves_icall_System_Array_SetValue): Likewise.
15964         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
15965         raise a NotImplementedException instead.
15966         (ves_icall_System_Array_GetLength): Added argument checking.
15967         (ves_icall_System_Array_GetLowerBound): Added argument checking.
15968
15969 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
15970
15971         * object.h (mono_assert): new macros mono_assert and
15972         mono_assert_not_reached
15973
15974 2002-02-28  Martin Baulig  <martin@gnome.org>
15975
15976         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
15977         and "System::String::IsInterned" to "System::String::_IsInterned".
15978
15979 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
15980
15981         * icall.c: remove hacks for typebuilder. Added icall to create a
15982         modified type from a tybebuilder.
15983         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
15984         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
15985         to create a backing MonoClass for a TypeBuilder.
15986
15987 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15988
15989         * class.c, class.h: more refactoring of class init.
15990         Export mono_class_setup_mono_type() and mono_class_setup_parent().
15991
15992 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
15993
15994         * marshal.c, marshal.h: start of marshaling interface.
15995
15996 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
15997
15998         * icall.c: fix order in assembly qualified name icall.
15999
16000 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16001
16002         * class.c: do not free str, since we store it in the hash table.
16003         * reflection.h: add label field to MonoILExceptionInfo.
16004         * reflection.c: handle references to more than one assembly. Handle
16005         case when there isn't a module created in the assembly.
16006
16007 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
16008
16009         * class.c: Fix typo. Start refactoring of class init code.
16010
16011 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
16012
16013         * appdomain.c: exit with 1 on error.
16014         * class.c: we already have the name in MonoClassField.
16015         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
16016         MonoStreamHeader instead of an offset of image->raw_metadata.
16017
16018 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
16019
16020         * appdomain.c (mono_init): Be even more descriptive about the error.
16021
16022 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
16023
16024         * appdomain.c: give the user an informative message when corlib can't
16025         be loaded.
16026
16027 2002-02-26  Martin Baulig  <martin@gnome.org>
16028
16029         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
16030         New icall to get the time zone data.
16031
16032 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16033
16034         * reflection.c: set virtual and raw size of section correctly.
16035         * threads.c: transfer domain information to newly created threads.
16036
16037 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16038
16039         * class.c: when instancing a class in a domain, load the default
16040         vaules for static fields from the constant table. Fix System.Enum to
16041         not be an enum.
16042         * icall.c: implement Object::GetType() internalcall. Implemented
16043         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
16044         Fixed checking of binding flags in find_members().
16045         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
16046         * reflection.c: handle enumerations when writing to the constant
16047         table. Use a different object cache for types.
16048
16049
16050 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
16051
16052         * object.c (mono_object_isinst): fix for arrays
16053
16054         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
16055
16056 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16057
16058         * object.c: don't use mprotect ()  and fix intern pool hash table
16059         lookup for big endian systems.
16060
16061 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16062
16063         * icall.c: change type_is_subtype_of () signature.
16064
16065 2002-02-21  Mark Crichton  <crichton@gimp.org>
16066
16067         * rand.c, rand.h: Added random number generator for
16068         System.Security.Cryptography classes.
16069
16070         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
16071
16072         * icall.c: Added System.Security.Cryptography calls.
16073
16074 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
16075
16076         * class.c, icall.c, metadata.c: better support for pointer types.
16077         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
16078         * reflection.c: Add support for getting custom attrs for properties
16079         and simplify some code.
16080
16081 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
16082
16083         * icall.c: change getToken () and add custom attribute GetBlob()helper
16084         method.
16085         * reflection.h: add custom attrs array to the reflection builder structures.
16086         * reflection.c: encode and emit custom attributes for all the relevant
16087         reflection objects. Cache fieldref and methodref tokens. Change
16088         mono_image_create_token() interface to take a MonoDynamicAssembly.
16089         More complete custom attributes decoder. Load custom attributes for
16090         Assembly, Field, Method and Constructor objects, too. Make the
16091         returned array an Attribute[] one, not object[]. Added
16092         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
16093         custom attribute constructor.
16094
16095 2002-02-20  Dick Porter  <dick@ximian.com>
16096
16097         * icall.c:
16098         * rawbuffer.c:
16099         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
16100         problem code out for now).
16101
16102 2002-02-19  Radek Doulik  <rodo@ximian.com>
16103
16104         * object.c (mono_ldstr): use hash table to avoid multiple swapping
16105
16106 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
16107
16108         * icall.c: register the GetCustomAttributes method.
16109         * object.c, object.h: add mono_string_new_len ().
16110         * reflection.h, reflection.c: added mono_runtime_invoke(),
16111         mono_install_runtime_invoke(). Added
16112         mono_reflection_get_custom_attrs () to load custom attributes and
16113         create the attribute objects.
16114
16115 2002-02-19  Dick Porter  <dick@ximian.com>
16116         * threads-dummy-types.c:
16117         * threads-dummy-types.h:
16118         * threads-dummy.c:
16119         * threads-dummy.h:
16120         * threads-pthread-types.c:
16121         * threads-pthread-types.h:
16122         * threads-pthread.c:
16123         * threads-pthread.h:  Deleted obsolete files
16124
16125 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
16126
16127         * class.c (mono_class_vtable): runtime init the class when we
16128         allocate static class data.
16129
16130         * icall.c (ves_icall_System_Array_SetValue): check for null values.
16131
16132         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
16133         and String - but we will need generic marshalling support in the
16134         future. 
16135         (mono_init): set the domain name in a ms compatible way
16136
16137         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
16138         String[].
16139
16140 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
16141
16142         * object.c (mono_array_clone): use alloca() instead of g_malloc  
16143         for sizes
16144
16145         * appdomain.c (mono_domain_unload): impl.
16146
16147 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16148
16149         * appdomain.c, object.c: fix intern pool implementation.
16150         * class.c: fix alignment code.
16151
16152 2002-02-16  Radek Doulik  <rodo@ximian.com>
16153
16154         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
16155         and s2 > s1, just copy lower bytes to be compatible with little
16156         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
16157         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
16158
16159         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
16160         force big_endian to be 1 for big endian machines 
16161         (ves_icall_iconv_new_decoder): ditto
16162
16163 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
16164
16165         * socket-io.c (convert_sockopt_level_and_name): If the system
16166         doesn't define SOL_IP or SOL_TCP, get them by hand using
16167         getprotobyname() and caching the values (because this could be a
16168         slow operation).
16169         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
16170         Use the appropriate struct when the system does support it. Ie,
16171         not all systems have struct ip_mreqn so use struct ip_mreq when
16172         appropriate.
16173
16174 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
16175
16176         * reflection.c: handle finally clauses.
16177
16178 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
16179
16180         * socket-io.c: use g_snprintf() instead of snprintf.
16181
16182 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
16183
16184         * reflection.c (mono_param_get_objects): Cast second argument to
16185         mono_method_get_param_names to a const char** to silence the
16186         compiler warning.
16187
16188         * appdomain.c (mono_domain_assembly_open): Put parens around the
16189         truth statement in the for-loop.
16190
16191         * unicode.c (iconv_convert): Got rid of a compiler warning about
16192         int i being unused when the system has a new iconv.
16193         (iconv_get_length): Same.
16194
16195         * image.c (load_class_names): Cast the second argument to
16196         g_hash_table_insert() to char* to hush compiler warnings about the
16197         arg being a const.
16198         (mono_image_open): Same here.
16199
16200         * socket-io.c: Don't conditionally include sys/filio.h or
16201         sys/sockio.h here anymore since we now get them from
16202         io-layer/io-layer.h
16203         (inet_pton): If the system doesn't support inet_aton, implement
16204         using inet_addr and also #define INADDR_NONE if it isn't defined
16205         by the system.
16206
16207 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
16208
16209         * metadata.c, metadata.h: added function to get packing and size info
16210         of a typedef.
16211         * reflection.h, reflection.c: handle field RVA data. Save info about
16212         the table layout if needed. Assign typedef indexes to all the types
16213         before dumping the info about them to avoid forward reference problems.
16214
16215 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
16216
16217         * socket-io.c (convert_sockopt_level_and_name): ifdef
16218         SO_ACCEPTCONN because it is not defined on my system (old debian)
16219
16220 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
16221
16222         * opcode.c: use stddef.h to get NULL.
16223
16224 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
16225
16226         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
16227         for FIONBIO, FIONREAD and SIOCATMARK.
16228         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
16229         define INADDR_NONE and besides, inet_addr() is deprecated and
16230         should not be used. Use inet_pton() instead - it also has the
16231         added bonus that it can easily handle IPv6 addresses as well.
16232         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
16233
16234 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
16235
16236         * decimal.c: remove _MSC_VER conditional.
16237
16238 2002-02-13  Dick Porter  <dick@ximian.com>
16239
16240         * socket-io.c: 
16241         * icall.c: Internal calls for Blocking, Select, Shutdown,
16242         GetSocketOption and SetSocketOption
16243
16244 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16245
16246         * assembly.cs: better resolver: use it instead of some kludgy
16247         code.
16248
16249 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
16250
16251         * reflection.c: the best way to speed-up the compiler is to avoid
16252         infinite loops.
16253
16254 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
16255
16256         * class.c (mono_class_vtable): changed the object layout
16257         (obj->vtable->class). 
16258         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
16259
16260 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
16261
16262         * assembly.c: look for assemblies in the assembly dir, too.
16263
16264 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16265
16266         * class.c: fix thinko in mono_class_from_type().
16267
16268 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
16269
16270         * exception.h, exception.c: added TypeLoadException.
16271         * object.h, object.c: added mono_array_clone ().
16272         * icall.c: handle throwOnError in AssemblyGetType().
16273         Added Array.Clone().
16274         * opcode.h, opcode.c: use a single value for the opcode val.
16275         Compile fix for non-gcc compilers.
16276
16277 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
16278
16279         * opcodes.c, opcodes.h: export interesting info about opcodes.
16280
16281 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
16282
16283         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
16284         icalls. 
16285
16286         * class.c (class_compute_field_layout): set element_class for enums
16287         (mono_class_create_from_typedef): set element_class for normal classes
16288
16289         * icall.c (ves_icall_System_Enum_get_value): impl.
16290
16291         * class.c (mono_class_create_from_typedef): do not set valuetype
16292         flag for System.ValueType and System.Enum
16293
16294 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
16295
16296         * unicode.c (iconv_convert): fix big endian problem.
16297
16298 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
16299
16300         * class.c: add asserts if we are ever going to scribble over memory.
16301         * socket-io.c: not all systems have AF_IRDA defined.
16302
16303 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
16304
16305         * class.c (class_compute_field_layout): do not consider static
16306         fields to compute alignment
16307
16308 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
16309
16310         * appdomain.c (mono_appdomain_get): impl.
16311         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
16312
16313 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
16314
16315         * icall.c: ignore "file://" prefix when loading an assembly.
16316
16317 2002-01-23  Dick Porter  <dick@ximian.com>
16318
16319         * socket-io.c:
16320         * icall.c:
16321         * Makefile.am: Added socket support
16322
16323 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
16324
16325         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
16326         code back.  This should return the assemblies that are loaded by
16327         the runtime on behalf of an application domain. 
16328
16329         The current implementation is still broken, it just returns every
16330         assembly loaded, but until we get real applications domain this
16331         will do.
16332
16333 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
16334
16335         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
16336         AppDomain object.
16337
16338 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
16339
16340         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
16341         the mono_class_from_name lookup.
16342         (ves_icall_get_parameter_info): ditto.
16343         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
16344         method.
16345         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
16346
16347 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
16348
16349         * class.c: load also nested classes on class init.
16350         System.ValueType instance methods gets passed boxed
16351         values, unless methods in derived classed that get a pointer to the
16352         data.
16353         * icall.c: use better name parsing code in GetType().
16354         * image.c, image.h: add mono_image_loaded ().
16355         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
16356         * reflection.c, reflection.h: added mono_reflection_parse_type().
16357
16358 2002-01-22  Veronica De Santis <veron78@interfree.it>
16359
16360         * icall.c : Added mapping of internal calls for Manual and Auto reset events
16361         * threads.c : Added the implementation of internal calls for events
16362         * threads.h : Added prototypes of internal calls for events
16363         
16364 2002-01-21  Radek Doulik  <rodo@ximian.com>
16365
16366         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
16367
16368 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
16369
16370         * class.c (mono_class_init): set min_align to 1 (instead of 0)
16371         (mono_class_value_size): use min_align
16372
16373 2002-01-20  Dick Porter  <dick@ximian.com>
16374
16375         * threads.h:
16376         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
16377         so it compiles on w32.
16378
16379 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
16380
16381         * metadata.c (mono_type_stack_size): impl.
16382
16383         * class.c (mono_class_get_field): impl. memberref token
16384
16385 2002-01-16 Veronica De Santis <veron78@@interfree.it>
16386
16387         * icall.h : Added the internal calls mapping for CreateMutex_internal
16388                     and ReleaseMutex_internal.
16389         * threads.h : Added the prototype of mutexes internal calls.
16390         * threads.c : Added the implementations of mutexes internal calls.
16391
16392 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
16393
16394         * metaparse.h: removed unused file.
16395         * reflection.c, reflection.h: added stream_data_align () function 
16396         to align data in streams and keep stream aligned. Add support for
16397         exception support in method headers.
16398
16399 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
16400
16401         * unicode.c: make iconv_convert () return the number of bytess written
16402         in the output buffer.
16403
16404 2002-01-15  Dick Porter  <dick@ximian.com>
16405         * threads.c: Make the runtime's idea of infinite timeouts coincide
16406         with the class library's
16407
16408         Fix a particularly egregious bug in mono_thread_cleanup(). That
16409         code was so utterly bogus it must have been written on a Monday.
16410
16411 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
16412
16413         * reflection.h: add subtypes field to TypeBuilder.
16414         * reflection.c: encode constants for literal fields.
16415         Handle subtypes. Fix user string token (and add a zero byte)
16416         at the end.
16417         
16418 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
16419
16420         * class.c (mono_class_init): bug fix: assign slot numbers for
16421         abstract methods.
16422
16423 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
16424
16425         * reflection.c: don't try to output a code RVA for abstract methods.
16426         Small fixes for method header format. Output parameter info to the
16427         ParamDef table. Save method overriding info to MethodImpl table.
16428         Fix property support. Allow typedef.extends to be a type in the
16429         building assembly.
16430         * verify.c: fix off-by-one error.
16431
16432 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
16433
16434         * class.c: fix mono_class_from_mono_type () for szarray types.
16435         Remove unused cache check in mono_class_from_type_spec().
16436         * icall.c: *type_from_name () functions handle simple arrays and byref.
16437         * reflection.c: handle byref and szarray types. Handle methods without
16438         body (gets P/Invoke compilation working). Handle types and fields in
16439         get_token ().
16440         * reflection.h: add rank to MonoTypeInfo.
16441
16442 2002-01-10  Dick Porter  <dick@ximian.com>
16443
16444         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
16445         internal calls
16446
16447 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
16448
16449         * icall.c: initialize class in type_from_handle ().
16450         Loop also in parent classes for get_method ().
16451         * reflection.c: properly encode class and valuetype types.
16452         Start on encoding TypeBuilder types. Handle fieldrefs.
16453         Use correct length when registering a user string.
16454         Handle ConstructorBuilder and MonoMethod in get_token ().
16455         Make mono_type_get_object () aware of cached types.
16456         * object.c: back out change to mono_string_new ().
16457
16458 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
16459         * object.c: mono_string_new should return a NULL when the string 
16460         passed in is NULL -- not try to deference it.
16461         
16462 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
16463
16464         * icall.c: hack to make IsSubType work for TypeBuilders.
16465         * reflection.c: emit constructors before methods.
16466         Retrieve param names in mono_param_get_objects().
16467
16468 2002/01/05  Nick Drochak  <ndrochak@gol.com>
16469
16470         * Makefile.am: fix list of headers and sources so automake 1.5
16471         doesn't complain. Removed \# at end of list.
16472
16473 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
16474
16475         * reflection.c: get token for a method ref. Set return type of
16476         constructor to void.
16477         * loader.c: debug message.
16478         * class.c: typo fix.
16479
16480 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
16481
16482         * icall.c: fix array init with rank > 1. FindMembers
16483         loops in parent class as well.
16484         * image.c: do not insert nested types in name cache.
16485         * reflection.c: warning fix.
16486         * reflection.h: add override method (for interface impl).
16487
16488 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
16489
16490         * metadata.c: fix customattr decoding.
16491
16492 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
16493
16494         * rawbuffer.cs: Added native Win32 implementation, avoids using
16495         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
16496
16497 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
16498
16499         * class.c: make the low-level routines handle the cache.
16500
16501 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
16502
16503         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
16504
16505 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
16506
16507         * class.c: fix mono_array_element_size() for objects.
16508         * class.h, class.c: add properties to MonoClass and load them
16509         at init time.
16510         * icall.c: check with isinst() when assigning a value to an array
16511         instead of requiring the classes to match exactly.
16512         Implemented icall for System.Type::GetType().
16513         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
16514         enums. Handle bindingflags when looking for methods and fields.
16515         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
16516         and mono_metadata_methods_from_property().
16517         * reflection.h, reflection.c: added structures for propreties,
16518         parameters and enums. Implemented mono_property_get_object() and
16519         mono_param_get_objects().
16520
16521 2001-12-18  Dick Porter  <dick@ximian.com>
16522
16523         * file-io.c: Use mono_string_to_utf16() instead of
16524         mono_string_chars()
16525
16526         * object.c: Added mono_string_to_utf16(), which copies the non
16527         NULL-terminated MonoString into a new double-null-terminated
16528         buffer.
16529
16530 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
16531
16532         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
16533
16534 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
16535
16536         * file-io.c: raise exceptions if handle is invalid.
16537
16538 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
16539
16540         * assembly.c: yet another check for mscorlib.
16541         * class.c, class.h: load nesting info for classes.
16542         * icall.c: many new functions to support the Reflection classes.
16543         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
16544         * reflection.h, reflection.c: mono_image_create_token(),
16545         mono_assembly_get_object(), mono_type_get_object(),
16546         mono_method_get_object(), mono_field_get_object(): methods to return
16547         objects that parallel the C representation of assemblies, types,
16548         methods, fields.
16549
16550 2001-12-11  Dick Porter  <dick@ximian.com>
16551
16552         * icall.c:
16553         * file-io.c: Internal calls for file IO.
16554
16555 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
16556
16557         * tabledefs.h: missing FileAttributes.
16558         * verify.h, verify.c: use is_valid_string () to simplify and check for
16559         valid strings more correctly. Fix warnings and speeling.
16560         Check more tables: Filed, File, ModuleRef, StandAloneSig.
16561         Check code: branches, maxstack, method calls.
16562
16563 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
16564
16565         * object.c (mono_object_allocate): removed static, so that the jit
16566         can allocate value types.
16567
16568         * icall.c (ves_icall_System_DateTime_GetNow): impl.
16569
16570 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
16571
16572         * class.c: init enum types right away and register the
16573         token->MonoClass map in mono_class_create_from_typedef ().
16574         * verify.h, verify.c: first cut of the verifier.
16575         * pedump.c: add --verify switch to verify metadata tables.
16576         * tabledefs.h: add some missing enums.
16577
16578 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
16579
16580         * class.c (mono_install_runtime_class_init): impl.
16581         (mono_class_init): renamed mono_class_metadata_init to
16582         mono_class_init, also removed the metadata_inited flag
16583
16584         * object.c (mono_object_isinst): use faster algorithm
16585
16586 2001-11-30  Radek Doulik  <rodo@ximian.com>
16587
16588         * mono-endian.h: reverted last change
16589         added function prototypes
16590
16591         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
16592         add mono-endian.c back
16593
16594         * mono-endian.c: returned back, as Paolo pointed out, it's needed
16595         for unaligned access, I've mistaked it with endianess. I am
16596         sorry.
16597         (mono_read16): fix reverted endianess
16598         (mono_read64): ditto
16599         (mono_read32): ditto
16600
16601 2001-11-30  Dick Porter  <dick@ximian.com>
16602
16603         * exception.c: Implement mono_exception_from_name()
16604
16605 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
16606
16607         * metadata.h, metadata.c: remove params_size and locals_size and their
16608         calculation from the metadata code: they are only usefult to the
16609         interp.
16610
16611 2001-11-29  Radek Doulik  <rodo@ximian.com>
16612
16613         * object.c (mono_ldstr): swap bytes here, it's probably not the
16614         best place, but works for me now, I'll redo it once I know mono
16615         better, also note that I add PROT_WRITE and don't reset back, also
16616         note that it's only affects big endians, so x86 should be OK
16617
16618         * mono-endian.h (read16): use just glib macros for both endians
16619
16620         * mono-endian.c: removed as glib macros are used in in
16621         mono-endian.h so we don't need to care about endianess for read
16622         macros as glib does that for us already
16623
16624 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
16625
16626         * class.h, class.h: take minimum alignment into consideration so
16627         that the fields of a class remain aligned also when in an array.
16628
16629 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
16630
16631         * loader.h, loader.c: add mono_method_get_param_names().
16632         * class.c: 0-init class fields.
16633
16634 2001-11-26  Dick Porter  <dick@ximian.com>
16635
16636         * icall.c:
16637         * threads-types.h:
16638         * threads.c: New file that handles System.Threading on all platforms
16639
16640         * object.c: 
16641         * object.h: Remove the synchronisation struct from MonoObject,
16642         replace it with a pointer that gets initialised on demand
16643
16644         * Makefile.am: Replace all the system-specific threading code with
16645         a single file that uses the new wrapper library
16646
16647 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
16648
16649         * class.c, class.h: add mono_install_trampoline() so that the runtime
16650         can register a function to create a trampoline: removes the ugly
16651         requirement that a runtime needed to export arch_create_jit_trampoline.
16652         * object.h, object.c: added mono_install_handler() so that the runtime
16653         can install an handler for exceptions generated in C code (with
16654         mono_raise_exception()). Added C struct for System.Delegate.
16655         * pedump.c: removed arch_create_jit_trampoline.
16656         * reflection.c: some cleanups to allow registering user strings and
16657         later getting a token for methodrefs and fieldrefs before the assembly
16658         is built.
16659         * row-indexes.h: updates and fixes from the new ECMA specs.
16660
16661 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
16662
16663         * class.h, class.c: add enum_basetype field to MonoClass.
16664         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
16665         to get index in the constant table reated to a field, param or
16666         property.
16667         * reflection.h, reflection.c: handle constructors. Set public-key and
16668         version number of the built assembly to 0.
16669         * row-indexes.h: update from new ECMA spec.
16670
16671 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
16672
16673         * class.h, class.c: add a max_interface_id to MonoClass.
16674         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
16675         since it's used to do that. Added mono_type_type_from_obj().
16676         Make GetType() return NULL instead of segfaulting if the type was not
16677         found. Handle simple arrays in assQualifiedName.
16678         * object.h: add a struct to represent an Exception.
16679         * reflection.c: output call convention in method signature.
16680         Add code to support P/Invoke methods and fixed offsets for fields.
16681
16682 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
16683
16684         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
16685         the value.
16686         * icall.c: use mono_array_addr instead of array->vector: fixes the
16687         reflection image writing.
16688         * reflection.c: init call convention byte to 0 in method signature.
16689         Encode the property signature. Don't output property-related methods
16690         twice. Really process the properties for a type (don't cast a field to
16691         a property, my mom always told me that).
16692         Fix 64 bit issues in pointer alignment in a different and more
16693         readable way.
16694
16695 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
16696
16697         * loader.h: Removed type class from MonoDefaults, added monotype
16698
16699         * loader.c: Loaded MonoType, removed loading of Type
16700
16701         * icall.c (my_mono_new_object): Now returns a System.MonoType,
16702         and fills in System.Type._impl with a RuntimeTypeHandle rather
16703         than the actual MonoClass *
16704
16705         (ves_icall_type_from_handle): change from type_class to
16706         monotype_class
16707
16708         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
16709         implemented
16710
16711         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
16712         implemented
16713
16714         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
16715
16716         (ves_icall_System_Reflection_Assembly_GetType): implemented
16717
16718         (ves_icall_System_MonoType_assQualifiedName): implemented
16719
16720         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
16721
16722 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
16723
16724         * assembly.c (mono_assembly_open): Implement a cache for the
16725         assemblies. 
16726
16727         (mono_assembly_close): only destroy the assembly when the last
16728         reference is gone.
16729         
16730 2001-11-09  Dick Porter  <dick@ximian.com>
16731
16732         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
16733
16734 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
16735
16736         * class.c (mono_class_metadata_init): bug fix: compute the right slot
16737
16738 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
16739
16740         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
16741         from Martin Weindel.
16742         * object.h: add mono_string_chars ().
16743
16744 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
16745
16746         * reflection.c (build_compressed_metadata): Eliminates warnings
16747         and uses 64-bit clean code.
16748
16749         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
16750         (mono_type_equal): Change signature to eliminate warnings.
16751
16752 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
16753
16754         * icall.c, loader.c: remove the internalcall array constructors.
16755         Changes to match the new MonoArray structure.
16756         * object.h, object.c: an array object doesn't allocate an extra
16757         vector. Add mono_array_new_full () to create jagged arrays easily.
16758
16759 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
16760
16761         * metadata.h, metadata.c: add mono_metadata_field_info () to
16762         retreive all the info about a field from vairous tables.
16763         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
16764         * class.h, class.c: augment MonoClassField with more info.
16765         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
16766         policy and load a field's RVA if needed.
16767
16768 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
16769
16770         * class.c (mono_class_metadata_init): create a trampoline for all
16771         virtual functions instead of actually compiling them.
16772
16773 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
16774
16775         * class.h, class.c: include name in MonoClassField.
16776         * class.c: fix fundamental type of System.Object and System.String.
16777         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
16778         tokens in ldtoken.
16779         * icall.c: remove internalcalls for the Reflection stuff that is now
16780         done in C# code.
16781         * loader.c: mono_field_from_memberref () implementation.
16782         * mono-endian.c: thinko (s/struct/union/g).
16783         * object.c, object.h: make the mono_string_* prototypes actually use
16784         MonoString instead of MonoObject.
16785         * reflection.c, reflection.h: updates for changes in the reflection
16786         code in corlib: we use C structures that map to the actual C# classes.
16787         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
16788         fat method header if needed and use the info from the ILGenerator for
16789         methods. Handle fields in types. Misc fixes.
16790
16791 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
16792
16793         * class.c (mono_class_metadata_init): bug fix: always allocate
16794         space for static class data
16795
16796 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
16797
16798         * class.c (mono_compute_relative_numbering): use relative
16799         numbering to support fast runtime type checks.
16800
16801 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
16802
16803         * class.c (mono_class_create_from_typeref): added debugging output
16804         to print class name when MonoDummy is returned instead of real class
16805
16806 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
16807
16808         * class.c (mono_class_metadata_init): interface offset table now
16809         contains pointers into the vtable - this is more efficient for the jit
16810
16811 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
16812
16813         * class.c (mono_class_metadata_init): use a temporary vtable (the
16814         old algorithm only worked for the interpreter, but not for the jit)
16815
16816 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
16817
16818         * loader.c (method_from_memberref): use mono_class_get to get the
16819         class of an array instead of using System.Array directly.
16820         (mono_get_method): also add MEMBERREF methods to the method cache
16821         which usefull for arrays.
16822
16823 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
16824
16825         * pedump.c (arch_compile_method): added to compute vtable entry
16826
16827         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
16828         number of interfaces.
16829         
16830         * class.h: merged MonoArrayClass into MonoClass
16831
16832         * class.c (mono_class_create_from_typedef): compute the vtable size and
16833         allocate space to include the vtable inside MonoClass
16834         (mono_class_metadata_init): initialize the vtable
16835
16836 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
16837
16838         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
16839         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
16840         * image.c: endian fixes by Laurent Rioux.
16841         * object.h, object.c: rename MonoStringObject to MonoString and
16842         MonoArrayObject to MonoArray. Change some function names to conform to
16843         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
16844         guint16* as first argument, so don't use char*.
16845         Provide macros to do the interesting things on arrays in a portable way.
16846         * threads-pthread.c: updates for the API changes and #include <sched.h>
16847         (required for sched_yield()).
16848         * icall.c: updates for the API changes above.
16849         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
16850         platforms that need them.
16851
16852 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
16853
16854         * class.c: set the correct type for all the fundamental
16855         type when loading the class.
16856
16857 2001-10-05  Dick Porter  <dick@ximian.com>
16858
16859         * threads-pthread.c (pthread_mutex_timedlock): Simple
16860         compatibility version for C libraries that lack this call.
16861
16862 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16863
16864         * class.c: MonoTypes stored in MonoClass are stored as
16865         fundamental MonoTypes when the class represents a
16866         fundamental type (System.Int32, ...).
16867         The TypeHandle return by ldtoken is a MonoType*.
16868         * icall.c: ves_icall_get_data_chunk () write out all the
16869         PE/COFF stuff. Implement ves_icall_define_method (),
16870         ves_icall_set_method_body (), ves_icall_type_from_handle ().
16871         * image.c: properly skip unknown streams.
16872         * loader.h, loader.c: add type_class to mono_defaults.
16873         * metadata.c, metadata.h: export compute_size () as
16874         mono_metadata_compute_size () with a better interface.
16875         Typo and C&P fixes.
16876         * pedump.c: don't try to print the entry point RVA if there is no entry point.
16877         * reflection.c, reflection.h: many cleanups, fixes, output method
16878         signatures and headers, typedef and typeref info, compress the metadata
16879         tables, output all the heap streams, cli header etc.
16880         * row-indexes.h: typo fixes.
16881
16882 2001-10-04  Dick Porter  <dick@ximian.com>
16883
16884         * object.h: Add a synchronisation mutex struct to MonoObject
16885
16886         * object.c (mono_new_object): Initialise the object
16887         synchronisation mutexes
16888
16889         * icall.c: System.Threading.Monitor internal calls
16890         
16891         * threads-pthread.h:
16892         * threads-pthread.c: System.Threading.Monitor internal calls
16893
16894         * threads-types.h: New file, includes the system-specific thread
16895         structures
16896         
16897         * threads-pthread-types.h:
16898         * threads-pthread-types.c: New files, handle pthread-specific
16899         synchronisation types
16900
16901         * threads-dummy-types.h: 
16902         * threads-dummy-types.c: New files of dummy support for
16903         thread-specific types
16904
16905         * metadata.c:
16906         * image.c:
16907         * pedump.c: include mono-endian.h not endian.h
16908         
16909         * Makefile.am: More threads files.
16910         Name mono-endian.h not endian.h
16911
16912 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
16913
16914         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
16915         stuff and implement a few more bits.
16916         * icall.c: a field needs to be dereferenced twice. Do not use the same
16917         name for two variables in the same scope.
16918         * image.c, image.h: cleanups.
16919
16920 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
16921
16922         * class.c (mono_class_metadata_init): bug fix: compute the right size
16923
16924 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
16925
16926         * icall.c: implemented some of the Reflection internalcalls.
16927         * image.c, image.h: start writing out the PE/COFF image.
16928         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
16929         that does the reverse than decode_blob_size ().
16930         * object.c: use mono_metadata_encode_value (). Move here
16931         temporary implementation of mono_string_to_utf8 ().
16932         * rawbuffer.c: make malloc_map static.
16933
16934 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
16935
16936         * metadata.c: fix type comparison for arrays.
16937         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
16938         Added a couple of new classes to monodefaults.
16939         * icall.c: added a couple of Reflection-related internalcalls.
16940         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
16941         Added a byval_arg MonoType to MonoClass.
16942
16943 2001-09-28  Dick Porter  <dick@ximian.com>
16944
16945         * icall.c:
16946         * threads-pthread.h: 
16947         * threads-pthread.c: Implemented internal calls for
16948         LocalDataStoreSlot operations.  Applied mutexes around all shared
16949         data.  Reworked the thread creation and Start() operations to
16950         avoid a race condition.
16951         
16952         * threads-dummy.h:
16953         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
16954
16955 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
16956
16957         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
16958
16959 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
16960
16961         * class.c, loader.c: warn and return NULL instead of erroring out.
16962         * icall.c: added System.AppDomain::getCurDomain().
16963         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
16964
16965 2001-09-25  Dick Porter  <dick@ximian.com>
16966
16967         * threads-pthread.h:
16968         * threads-pthread.c: Implemented timed thread joining and added
16969         System.Threading.Thread::Join_internal internal call
16970
16971         * icall.c: Added System.Threading.Thread::Join_internal internal call
16972
16973         * threads-dummy.h:
16974         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
16975
16976 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
16977
16978         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
16979         mono_string_intern () to implement the semantics of the ldstr opcode
16980         and the interning of System.Strings.
16981         * icall.c: provide hooks to make String::IsIntern and String::Intern
16982         internalcalls.
16983
16984 2001-09-23  Dick Porter  <dick@ximian.com>
16985
16986         * threads-dummy.c: 
16987         * threads-dummy.h: New files of dummy threading routines
16988
16989         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
16990         support code based on system specifics
16991
16992         Rename PTHREAD_LIBS to THREAD_LIBS
16993         
16994 2001-09-23  Dick Porter  <dick@ximian.com>
16995
16996         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
16997         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
16998         internal calls.
16999         (mono_thread_init): Set up a Thread object instance to return when
17000         the main thread calls Thread.CurrentThread
17001         (mono_thread_cleanup): Wait for all subthreads to exit
17002
17003         * icall.c: New internal calls for System.Threading.Thread::Sleep
17004         (including Schedule) and CurrentThread
17005
17006         * threads.h: New file, to insulate thread-specific stuff from the
17007         rest of the code
17008
17009 2001-09-21  Dick Porter  <dick@ximian.com>
17010
17011         * threads-pthread.h: 
17012         * threads-pthread.c: New file, for handling pthreads-style
17013         threading support.  Start() now starts a new thread and executes
17014         the ThreadStart delegate instance.
17015
17016         * icall.c: Added the internalcall for
17017         System.Threading.Thread::Start_internal
17018
17019         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
17020
17021 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
17022
17023         * loader.c: work around the different signatures for delegates
17024         constructors csc generates in compiled code vs the ones compiled in mscorlib.
17025
17026 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17027
17028         * class.h, class.c: add mono_class_get_field_from_name ().
17029         * *: Fix C comments and other ANSI C issues.
17030
17031 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
17032
17033         * endian.h, assembly.c: fix some endianness issues.
17034
17035 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
17036
17037         * loader.h, load.c: add delegate_class to mono_defaults.
17038         Handle runtime provided methods in mono_get_method ().
17039
17040 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
17041
17042         * loader.c (mono_get_method): use pinvoke for internal call
17043
17044         * icall.c: use pinvoke for internal call
17045
17046         * loader.c (method_from_memberref): set the method name
17047
17048 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
17049
17050         * metadata.c: help the compiler generate better code for
17051         mono_class_from_mono_type ().
17052
17053 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
17054
17055         * class.c (mono_class_metadata_init): delayed computing of the
17056         class size to mono_class_metadata_init ()
17057
17058 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
17059
17060         * class.c, class.h: add an interfaces member to MonoClass.
17061         * image.c, image.h: add assembly_name field to MonoImage
17062         from the assembly table.
17063         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
17064
17065 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17066
17067         * class.c: Handle Array in mono_class_from_mono_type ().
17068         * metadata.c, pedump.c: some endian fixes.
17069
17070 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
17071
17072         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
17073         * metadata.c: fix small problem introduced with the latest commit.
17074
17075 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
17076
17077         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
17078         We don't need a MonoMetadata pointer anymore to compare signatures in
17079         mono_metadata_signature_equal (), update callers.
17080         Reduced memory usage an number of allocations for MonoMethodHeader and
17081         MonoMethodSignature.
17082
17083 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
17084
17085         * metadata.c: added compare for szarray.
17086
17087 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
17088
17089         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
17090         and add a couple more types to it and mono_defaults. Give an hint on
17091         classes that need implementing in our corlib and are referenced
17092         in mscorlib.
17093
17094 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
17095
17096         * class.h, class.c: keep track if a class is also an Enum.
17097         * loader.c: Implement a couple more types for use in libffi
17098         marshalling. Gives better diagnostics when failing to dlopen
17099         a library. Set method->klass for P/Invoke methods, too.
17100
17101 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
17102
17103         * class.c, class.h: add a MonoType this_arg to MonoClass that
17104         represents a pointer to an object of the class' type that
17105         can be used by the interpreter and later the type cache.
17106         Add best guess alignment info for valuetype objects.
17107
17108 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
17109
17110         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
17111         into MonoType: one less level of indirection and allocation and
17112         simplifies quite a bit of code. Added cache for MonoTypes that are
17113         used frequently, so that we don't need to allocate them all the time.
17114
17115 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
17116
17117         * class.c (mono_class_create_from_typedef): System.Enum is also a
17118         value type, although it does not derive from System.ValueType
17119         (maybe a bug in the ms compiler?)
17120
17121         * metadata.c (mono_type_size): return the right size for value types
17122
17123         * loader.c (mono_get_method): only initialize method header if not abstract
17124
17125         * class.c (mono_class_from_mono_type): use mono_default values. 
17126
17127 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
17128
17129         * *: use MonoClass pointers instead of <type_tokens>
17130         
17131         * class.h: new flag: metadata_inited.
17132
17133         * class.c (mono_class_metadata_init): impl.
17134         (mono_class_instance_size): impl.
17135         (mono_class_data_size): impl.
17136
17137 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
17138
17139         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
17140         MonoClass now has the name and name_space fields. 
17141         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
17142         mono_get_method () takes and optional MonoClass as argument.
17143         Removed mono_typedef_from_name() and added mono_class_token_from_name()
17144         instead that takes advantage of a map from class names to typedef
17145         tokens in MonoImage.
17146
17147 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
17148
17149         * metadata.c: zero is not a valid alignment boundary.
17150         Merge MONO_TYPE_VOID in default decoding code.
17151
17152 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
17153
17154         * image.h: merged MonoMetadata into MonoImage
17155
17156         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
17157         identify the type of elements.
17158
17159 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
17160
17161         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
17162         * cil-coff.h: split MonoMSDOSHeader and add size info.
17163         * image.c: add some consistency checks.
17164         * metadata.c: fix row size computation: one programmer
17165         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
17166         add explanation for the locator routine.
17167         Fix decoding of size in method header.
17168         
17169 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
17170
17171         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
17172         (g_concat_dir_and_file): Bring g_concat_dir_and_file
17173         function from gnome-libs.  This uses the right path separator
17174         based on the OS, and also works around a bug in some systems where
17175         a double slash is not allowed. 
17176         (default_assembly_name_resolver): Use g_concat_dir_and_file
17177         (mono_assembly_open): ditto.
17178
17179 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
17180
17181         * metadata.c (mono_metadata_signature_equal): impl.
17182
17183         * *: void is now a realy MonoType (instead of using NULL)
17184         
17185         * metadata.c (do_mono_metadata_parse_type): use
17186         mono_metadata_parse_type to parse void value.
17187
17188 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
17189
17190         * metadata.c, metadata.h: in the signature and method header store
17191         only the space required for holding the loca vars and incoming arguments.
17192
17193 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
17194
17195         * metadata.c (do_mono_metadata_parse_type): treat void like any
17196         other type (instead of assigning NULL);
17197
17198 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
17199
17200         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
17201
17202 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
17203
17204         * image.c (do_mono_image_open): added a cache for arrays.
17205
17206 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17207
17208         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
17209         decode a single column from a row in a metadata table and changes
17210         to take advantage of it in the typedef locator (gives a nice speed up).
17211         Store offset info for function params.
17212
17213 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
17214
17215         * image.h (MONO_IMAGE_IS_CORLIB): removed 
17216
17217 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
17218
17219         * assembly.c: how could mono_assembly_close () had ever worked?
17220         * metadata.c, metadata.h: provide offset info for local vars.
17221         Implement mono_type_size () to take care of alignment as well
17222         as size (it was mono_field_type_size in cli/class.c before).
17223
17224 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
17225
17226         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
17227
17228         * assembly.h (CORLIB_NAME): set to corlib.dll
17229
17230         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
17231
17232 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
17233
17234         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
17235         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
17236         tokentype.h: massive namespace cleanup.
17237
17238 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
17239
17240         * metadata.h, metadata.c: decode exception clauses when parsing method header.
17241
17242 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
17243
17244         * metadata.c (mono_metadata_free_type): added check for type !=
17245         NULL (void) before calling mono_metadata_free_type()
17246
17247 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
17248
17249         * metadata.h, row_indexes.h: added header with enumerations to use
17250         to index in the columns from tables in metadata and to decode coded
17251         tokens: we should start using this instead of embedding magic numbers
17252         all over the code.
17253
17254 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
17255
17256         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
17257         Move metadata_t info from cli_image_info_t to MonoImage, where
17258         it's easily accessible. Changed all the uses accordingly.
17259         Added the method and class caches to MonoImage.
17260         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
17261         and mono_metadata_decode_value () signature to be more consistent
17262         with the other parse functions (and simplify code). Taken advantage
17263         of zero-length array allocation with GCC. Removed reduntant (and
17264         wrong) MonoFieldType struct and use MonoParam instead. Changed
17265         mono_metadata_parse_field_type () to use common code for parsing.
17266         Added mono_metadata_typedef_from_field () and
17267         mono_metadata_typedef_from_method () to lookup a typedef index from a
17268         field or method token.
17269         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
17270
17271 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
17272
17273         * metadata.c (mono_metadata_parse_field_type): Implement. 
17274         (do_mono_metadata_parse_type): Split engine from
17275         mono_metadata_parse_type, so that we can create smaller structures
17276         for things that just have one pointer to the MonoType (look at
17277         the MonoFieldType)
17278
17279 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
17280
17281         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
17282         as Jan Gray found out, it is incorrect. 
17283
17284 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
17285
17286         * assembly.c: Implement asssembly loading.  This loads an image
17287         and loads all the referenced assemblies.  Come to think of it, we
17288         could always do lazy loading of the assemblies. 
17289
17290         * image.c (mono_image_open): Keep loaded images in a hashtable.
17291
17292         * image.h (MonoImage): Add reference count.
17293
17294 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
17295
17296         * assembly.c (mono_assembly_open): Keep track of the file name in
17297         case the assembly has no ASSEMBLY table.
17298
17299         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
17300         from get.c here.
17301
17302 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
17303
17304         * metadata.c, metadata.h: decode local vars in method header
17305         parse function. Change callers accordingly.
17306
17307 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
17308
17309         * metadata.h, cil-coff.h: protect against multiple inclusion.
17310         Added some new structures to hold information decoded from metadata:
17311         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
17312         and relevant decoding/free functions.
17313         * metadata.c: implement decoding functions. Add warning for out of bounds
17314         index in mono_metadata_locate(). Implement mono_get_method () to retreive
17315         all the info about a method signature and invocation. Remove check on
17316         uninitialized local var in parse_mh() and fix memory leak.
17317
17318 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
17319
17320         * metadata.h: More macros.
17321
17322         * tokentype.h: New file.
17323
17324 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
17325
17326         * assembly.c: added a consistency check and initialize
17327         some structures with g_new0().
17328         * metadata.c: fixed a couple more bugs in table size computation
17329         and add other checks for out-of bound access to metadata.
17330
17331 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
17332
17333         * metatada.c: fix bugs computing table sizes. Spew a
17334         warning when index in string heap is out of bounds.
17335
17336 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
17337
17338         * metadata.h: Add a couple of macros to manipulate tokens. 
17339
17340 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
17341
17342         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
17343         cli_section_tables).
17344
17345 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
17346
17347         * metadata.c (mono_metadata_user_string): New function, provides
17348         access to the UserString heap. 
17349
17350 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
17351
17352         * metadata.c: Add inline documentation.
17353
17354 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
17355
17356         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
17357         files. 
17358
17359 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
17360
17361         * typeattr.h: New file, TypeAttribute flags. 
17362
17363 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
17364
17365         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
17366         mono_assembly_ensure_section): Section loading code.
17367         (load_section_tables): Load the sections.
17368
17369         * mono/metadata/metadata.c (mono_metadata_locate_token,
17370         mono_metadata_locate): Functions to locate the information
17371         definition given a token or a table and an index.
17372         (mono_metadata_compute_table_bases): New.
17373         (compute_size): New function to compute the sizes of the various
17374         tables.
17375
17376         * mono/metadata/metadata.h: Finish listing the different index
17377         types. 
17378
17379         * mono/metadata/pedump.c: Improve to dump new information.
17380
17381 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
17382
17383         * mono/metadata/metadata.c: Entered all the tables matching
17384         Beta2. 
17385
17386         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
17387
17388