8e8d5fee180711b7e8d84411416244f75c6b0475
[mono.git] / mono / metadata / ChangeLog
1 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * verify.c (verify_class_fields): Check for duplicate fields.
4
5 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
6
7         * metadata-verify.c: Verify the typeref table for duplicates.
8
9 2009-09-01  Rodrigo Kumpera  <rkumpera@novell.com>
10
11         This reverts r140936 and properly handles interfaces with static methods. The
12         right fix is to ensure vtables without bubles which is an easier to verify
13         constraint. We should avoid such special cases as of the reverted patch as those
14         only make the runtime more brittle.
15
16         * class.c (mono_class_setup_vtable_general): Revert previous change that handle
17         static methods on interfaces.
18
19         * class.c (setup_interface_offsets): Use the number of virtual methods when
20         calculating interface offsets instead of the number of methods. This way we
21         avoid bubles on the layout.
22
23 2009-08-31  Rodrigo Kumpera  <rkumpera@novell.com>
24
25         * metadata-verify.c (verify_metadata_header): Some very smart
26         obfuscators like to add extra stream headers. Ignore them.
27
28 2009-08-30  Zoltan Varga  <vargaz@gmail.com>
29
30         * class.c (mono_class_setup_vtable_general): Verify interfaces with static
31         methods correctly.
32
33 2009-08-29  Rodrigo Kumpera  <rkumpera@novell.com>
34
35         * metadata-verify.c: Verify for duplicated types.
36
37 2009-08-28  Rodrigo Kumpera  <rkumpera@novell.com>
38
39         * metadata-verify.c (verify_typedef_table): Verify for nested types
40         without an entry on the nested class table.
41
42 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
43
44         * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
45         <tom_hindle@sil.org>. Add locking around hash table accesses.
46
47 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
48
49         * verify.c (mono_verifier_verify_class): Verify all interface if
50         really are interfaces. Fixes #534184.
51
52 2009-08-27  Rodrigo Kumpera  <rkumpera@novell.com>
53
54         * pedump.c: Initialize all types during metadata validation so we report
55         errors only detected as part of class initialization.
56
57 2009-08-26  Rodrigo Kumpera  <rkumpera@novell.com>
58
59         * metadata-verify.c (verify_method_table): PInvoke requires method to
60         be static. Fixes #534189
61
62 2009-08-26  Zoltan Varga  <vargaz@gmail.com>
63
64         * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
65         being NULL.
66
67 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
68
69         * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
70         for holes or bad methods. Fixes #525314.
71
72 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
73
74         * class.c (setup_interface_offsets): Don't allocate slot
75         for the same interface multiple times. This creates bubbles
76         that waster space and make vtable verification harder.
77
78         The same interface get a slot multiple times since we need
79         to get the closure of all implemented interfaces, which means
80         the same interface is reported multiple times.
81
82 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
83
84         * verify.c (mono_verifier_verify_class): Don't check the fields
85         of generic instances since the context on which they got expanded
86         might lead to false positives.
87
88         Such thing happens when a generic type is inflated in the context
89         of a generic method and the inflated type of a field turns into a
90         generic method argument, which causes the checking code to think
91         it's an invalid class when it's not.
92
93 2009-08-25  Rodrigo Kumpera  <rkumpera@novell.com>
94
95         * verify.c (mono_type_is_valid_in_context): Verify if type
96         is NULL and remove duplicate test.
97
98 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
99
100         * verify.c (mono_verifier_verify_class): Check fields for
101         invalid generic arguments.
102
103 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
104
105         * class.c (verify_class_overrides): Verify if for static
106         and non virtual methods.
107
108 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
109
110         * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
111         Check for errors after retrieving the vtable.
112
113 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
114
115         * class.c (mono_class_setup_vtable_general): Verify
116         if method overrides are valid before processing them.
117
118 2009-08-24  Rodrigo Kumpera  <rkumpera@novell.com>
119
120         * marshal.c (mono_array_to_lparray): Fix minimal build with
121         cominterop disabled.
122
123         * marshal.c (mono_free_lparray): Same.
124
125 2009-08-21  Mark Probst  <mark.probst@gmail.com>
126
127         * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
128         the hash function for the ares_htable.
129
130 2009-08-20  Rodrigo Kumpera  <rkumpera@novell.com>
131
132         * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
133         bit for assembly flags. MS is ok with it but there is no spec anywhere
134         on its mean
135
136 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
137
138         * class.c (mono_class_create_from_typedef): Emit profiler events
139         in all cases.
140
141 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
142
143         * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
144         Release memory on failure.
145
146 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
147
148         * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
149         to the internal API.
150
151         * metadata.c (get_constraints): Use a single-linked table as we don't
152         traverse it backward. Fail and return FALSE if only of the contraint types
153         is not found.
154
155         * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
156         to mono_metadata_load_generic_param_constraints except for having a return value.
157         This has to be done since the later is part of the public API.
158
159         * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
160         and fail the type.
161
162         * loader.c (mono_get_method_from_token): Properly check the loading of constraints
163         and fail the method.
164
165 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
166
167         * metadata-verify.c (is_valid_method_header): Add work-around to deal
168         with MS broken behavior of emmitting EH section sizes without the
169         header size added.
170
171 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
172
173         * metadata.c (mono_type_create_from_typespec): Don't allocate image
174         memory until we're sure that we'll need it. This avoids leaking for
175         broken types or duplicated instantiation.
176
177 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
178
179         * metadata-verify.c (is_valid_method_header): Fix stupid formating
180         mistake.
181
182 2009-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
183
184         * metadata-verify.c (is_valid_method_header): Fix number of clauses
185         and expected size calculation.
186
187 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
188
189         * class.c (mono_class_get_field_idx): Add fixme for broken
190         behavior for types with multiple fields with the same name.
191         I would rather fix it, but have no idea on how to generate
192         such artifact for testing.
193
194 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
195
196         * verify.c (verifier_load_field): We should allow references to
197         fields to be made using the generic type definition. It's up to
198         the loader system to fail invalid ops.
199
200         * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
201         are invalid.
202
203 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
204
205         * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
206
207         * metadata-internals.h: Fix declaration of 
208         mono_metadata_interfaces_from_typedef_full.
209
210         * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
211         heap_alloc_result parameter that controls if the result should be
212         g_malloc'd.
213
214         * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
215         array be g_malloc'd and properly document this public API function.
216
217 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
218
219         * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
220         remove METHOD_HEADER_TINY_FORMAT1.
221
222         * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
223
224         * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
225
226         Both spec and MS uses only 2 bits to enumerate the kind of header.
227         So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
228         is superfluous, only used for tiny headers with odd code lengths.
229
230         This change also make sure that mono doesn't wronly interpret bit 2
231         of fat header flags, which is currently reserved.
232
233 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
234
235         * metadata.c (do_mono_metadata_parse_type): Do error
236         checking for element types. Don't abort if presented
237         with a broken type kind.
238
239 2009-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
240
241         * metadata.c (mono_metadata_parse_method_signature_full):
242         Gracefully fail bad vararg signatures.
243
244 2009-08-18  Christian Hergert  <chris@dronelabs.com>
245
246         * profiler.c:
247         * class.c: Fix warnings for uninitialized variables.
248
249 2009-08-18  Christian Hergert  <chris@dronelabs.com>
250
251         * icall.c: Fix _NSGetEnviron method declaration warning.
252
253 2009-08-18  Christian Hergert  <chris@dronelabs.com>
254
255         * icall.c:
256         * reflection.c: Make bitwise checks explicit.
257
258 2009-08-18  Christian Hergert  <chris@dronelabs.com>
259
260         * debug-helpers.c:
261         * marshal.c: Fix printf warnings.
262
263 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
264
265         * reflection.c (encode_cattr_value): Fix a warning.
266
267 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
268
269         * metadata.c (mono_metadata_parse_array_full): Fix memory leak
270         of array bounds.
271
272 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
273
274         * loader.c (mono_method_signature): Don't assert on broken
275         signature. Print a more useful error message.
276
277 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
278
279         * loader.c (mono_method_get_marshal_info): Assert if
280         signature is invalid. Bounds check stores to the
281         mspecs array;
282
283 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
284
285         * loader.c (field_from_memberref): Fix warning.
286
287 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
288
289         * loader.c (mono_method_get_param_names): Check if signature
290         is null. Don't store beyond the size of the name array.
291
292 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
293
294         * loader.c (mono_get_method_constrained): Check if signature
295         is null.
296
297 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
298
299         * loader.c (mono_loader_set_error_bad_image): Improve
300         error messages.
301
302 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
303
304         * loader.c (mono_get_method_full): Convert an assertion
305         into a loader error.
306
307 2009-08-17  Rodrigo Kumpera  <rkumpera@novell.com>
308
309         * class-internals.h, class.c: Better naming and documentation.
310
311 2009-08-17  Zoltan Varga  <vargaz@gmail.com>
312
313         * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
314         obj is NULL.
315
316 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
317
318         * loader.c (mono_method_get_signature_full): Fail gracefully if signature
319         parsing fails.
320
321 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
322
323         * loader.c (mono_loader_error_prepare_exception): Handle missing field
324         errors with no class set.
325
326         * loader.c (field_from_memberref): If the field signature is of the wrong
327         type fail with a MissingFieldException instead of a BadImageException as
328         this is the behavior observed on MS. 
329
330 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
331
332         * loader.c (field_from_memberref): Don't crash if either the field
333         signature or the typespec class are invalid.
334
335 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
336
337         * verify.c (verifier_load_field): Don't allow field related
338         ops to reference fields on generic type definition.
339
340 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
341
342         * metadata-verify.c: Add new warning level for errors specified
343         by ECMA 335 but that MS ignores.
344
345         * metadata-verify.c (verify_method_table): Make compiler controled
346         visibility + (rt)specialname error a warning as MS ignores this. Ignoring
347         this check is safe because the end result will only be some visibility
348         exceptions been thrown.
349
350 2009-08-14  Rodrigo Kumpera  <rkumpera@novell.com>
351
352         * verify.c (get_boxable_mono_type): Don't allow the
353         use of the generic type definition on boxed type positions.
354
355         Fixes #531237.
356
357 2009-08-14  Mark Probst  <mark.probst@gmail.com>
358
359         * threadpool.c: Make sure no cross-domain references remain in
360         ares_htable or the arrays that are thrown away when resizing.
361
362 2009-08-14  Mark Probst  <mark.probst@gmail.com>
363
364         * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
365         list of classes for which we have to unregister reflection_info
366         with the GC and which are not in the namespace cache.
367
368         * reflection.c (mono_reflection_initialize_generic_parameter): Add
369         the class to the list.
370
371 2009-08-14  Mark Probst  <mark.probst@gmail.com>
372
373         * domain.c (mono_domain_free): Unregister the GC roots in
374         MonoDomain.
375
376 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
377
378         * reflection.c (mono_reflection_type_get_handle): Fix typo.
379
380 2009-08-12  Rodrigo Kumpera  <rkumpera@novell.com>
381
382         * class.c: Add mono_class_get_field_from_name_full which does
383         the same as mono_class_get_field_from_name but does check field
384         signature as well.
385
386         * class-internals.h: Export mono_class_get_field_from_name_full as
387         part of the internal API.
388
389         * loader.c (field_from_memberref): Search fields by name and signature
390         as it's valid to have two fields with same name but different types.
391
392         Fixes #528055.
393
394 2009-08-10  Rodrigo Kumpera  <rkumpera@novell.com>
395
396         * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
397
398         * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
399
400         * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
401         System.Type.
402
403 2009-08-13  Zoltan Varga  <vargaz@gmail.com>
404
405         * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
406
407         * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
408
409 2009-08-12  Mark Probst  <mark.probst@gmail.com>
410
411         * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
412         to sgen-scan-object.h, which can be included and parameterized via
413         macros.
414
415         * Makefile.am: sgen-scan-object.h added.
416
417 2009-08-12  Mark Probst  <mark.probst@gmail.com>
418
419         * gc.c: #define GC_dont_gc if we're compiling with SGen.
420
421 2009-08-12  Mark Probst  <mark.probst@gmail.com>
422
423         * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
424         before clearing a domain in the GC.
425
426 2009-08-12  Mark Probst  <mark.probst@gmail.com>
427
428         * exception.c (mono_exception_from_name_domain): Actually create
429         the exception in the specified domain.
430
431         * appdomain.c (mono_domain_create_appdomain_internal): Create the
432         OutOfMemoryException a bit later so that the domain is inialized
433         "enough" that it works.
434
435 2009-08-12  Mark Probst  <mark.probst@gmail.com>
436
437         * threads.c (thread_cleanup): Clean up the cached_culture_info
438         array to prevent cross-domain references.
439
440 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
441
442         * metadata.c: more documentation for MonoType accessors.
443
444 2009-08-11  Raja R Harinath  <harinath@hurrynot.org>
445
446         Fix incorrect size definitions where the tail array isn't a list
447         of pointers
448         * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
449         define size.
450         * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
451         * metadata.h (MONO_SIZEOF_TYPE): Likewise.
452         * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
453
454 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
455
456         * reflection.h:
457         * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
458
459 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
460
461         * metadata.c:
462         * loader.c:
463         * metadata-internals.h:
464         * method-builder.c:
465         * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
466
467 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
468
469         * cominterop.c:
470         * metadata.c:
471         * metadata.h:
472         * loader.c:
473         * marshal.c:
474         * reflection.c: #define for sizeof in MonoType and
475         MonoMethodSignature.
476
477 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
478
479         * domain.c:
480         * domain-internals.h: add and use #define's instead of sizeof()
481         for MonoJitInfo and MonoJitInfoTable.
482
483 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
484
485         * object.c:
486         * class.h: use #define instead of sizeof() for MonoRemoteClass.
487
488 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
489
490         * metadata.c:
491         * metadata.h:
492         * object.c:
493         * class-internals.h:
494         * generic-sharing.c:
495         * marshal.c: use a #define instead of sizeof() for a few
496         structures that use a zero-length array.
497
498 2009-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
499
500         * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
501         to handle inflated generic methods.
502
503         * appdomain.c: Bump corlib version.
504
505         * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
506         instances.
507
508         * reflection.c (fixup_method): Same
509
510         * reflection.c (resolve_object): Same.
511
512         * reflection.c (inflate_method): Replace a g_assert_not_reached with a
513         g_error and a decent message.
514
515 2009-08-06  Massimiliano Mantione  <massi@ximian.com>
516
517         * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
518         from the object because it could not yet be available globally
519         (it happens if the profiler tries to create a gchandle on the
520         MonoThread object of a thread that is still registering itself
521         with the runtime).
522
523 2009-08-04  Rodrigo Kumpera  <rkumpera@novell.com>
524
525         * reflection.c (mono_generic_class_get_object): Initialized the
526         managed type arguments array.
527
528         * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
529
530         * appdomain.c: Bump corlib version.
531
532 2009-08-04  Zoltan Varga  <vargaz@gmail.com>
533
534         * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
535         #527902.
536
537 2009-08-03  Zoltan Varga  <vargaz@gmail.com>
538
539         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
540         Avoid a crash if synch_cs is not set.
541         
542         * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal): 
543         Handle the case when the handle is 0.
544
545         * appdomain.c: Bump corlib version.
546
547 2009-08-02  Zoltan Varga  <vargaz@gmail.com>
548
549         * reflection.c (mono_type_get_object): Fix a warning.
550
551 2009-08-01  Mark Probst  <mark.probst@gmail.com>
552
553         * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
554         descriptor here.  We assume it's already been computed.
555
556         * generic-sharing.c (instantiate_other_info): Compute the GC
557         descriptor for info type MONO_RGCTX_INFO_KLASS.
558
559 2009-08-01  Mark Probst  <mark.probst@gmail.com>
560
561         * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
562         type, so don't use MONO_OBJECT_SETREF to set a field.
563
564 2009-08-01  Mark Probst  <mark.probst@gmail.com>
565
566         * gc.c: We were missing one case where invoking a finalizer would
567         not reset the domain.  Also, in the finalizer thread loop, assert
568         that we're in the root domain.
569
570 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
571
572         * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
573         if the type is not an array.
574
575 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
576
577         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
578         method bound to the declaring type of the method. Raise an exception
579         if the type is not a generic param.
580
581 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
582
583         * class.c (print_unimplemented_interface_method_info): Print the
584         full type name.
585
586         * class.c (mono_class_setup_vtable_general): When dealing with a
587         generic instance first check if the generic type definition is
588         not broken.
589
590 2009-02-11 Tom Hindke <tom_hindle@sil.org>
591
592         * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
593
594         * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
595
596         * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
597
598         * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
599
600         * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
601
602         Code is contributed under MIT/X11 license
603
604 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
605
606         * verify.c: Fix naming of stelem and ldelem.
607
608 2009-07-30  Mark Probst  <mark.probst@gmail.com>
609
610         * generic-sharing.c: Replace the templates lock with the loader
611         lock because of very hard to resolve deadlock issues.
612
613 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
614
615         * icall.c (ves_icall_Type_GetMethodsByName): Use 
616         mono_class_get_vtable_size () instead of accessing klass->vtable_size
617         directly. Fixes #525338.
618
619         * class.c (mono_class_get_vtable_size): New helper function.
620
621         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
622         the field belongs to the type. Fixes #525733.
623
624 2009-07-30  Mark Probst  <mark.probst@gmail.com>
625
626         * sgen-gc.c: When we stop a thread and its stack top is not within
627         its allocated stack (because it's in an altstack signal handler),
628         restart it and stop it again, until it is.
629
630 2009-07-30  Mark Probst  <mark.probst@gmail.com>
631
632         * sgen-gc.c: Take a thread's stack top and registers from the
633         sigcontext in the suspend signal handler.
634
635         * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
636         stuff to sgen-archdep.h.
637
638         * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
639         caller, because have code in sgen-archdep.h to acquire that data.
640
641 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
642
643         * profiler.c, profiler.h, profiler-private.h:
644         Added support for keeping track of code chunks and buffers.
645
646 2009-07-29 Rodrigo Kumpera  <rkumpera@novell.com>
647
648         * metadata-verify.c: Fix endianness problems on decoding functions.
649         Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
650
651 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
652
653         * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
654         schema for vectors and one dimension SZARRAY.
655
656 2009-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
657
658         * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
659         schema for vectors and one dimension SZARRAY.
660
661 2009-07-27  Mark Probst  <mark.probst@gmail.com>
662
663         * icall-def.h, thread-types.h, threads.c: New separate icalls for
664         Interlocked.(Compare)Exchange with object arguments, which invoke
665         write barriers.
666
667 2009-07-26  Miguel de Icaza  <miguel@novell.com>
668
669         * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
670         passed invalid arguments.   Fixes another crasher in the
671         Silverlight test suite.
672
673         * class.c (mono_class_array_element_size): Return 0 for the size
674         of the class;  This fixes the crasher exposed by :
675
676         typeof (void).MakeArrayType ();
677
678         * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
679         if there is no method to dereference.    Put all the code that
680         depends on this inside the if (method) block.
681
682         This fixes the crasher exposed by Microsoft's Silvelright CLR test
683         suite  ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
684
685         With this change, we pass the test.
686         
687         * reflection.c (mono_reflection_sighelper_get_signature_local):
688         Only dereference the assembly if it has been set.    Fixes a
689         crasher exposed by #525328
690
691 2009-07-25  Mark Probst  <mark.probst@gmail.com>
692
693         * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
694         don't perform the store in mono_gc_wbarrier_generic_nostore().
695         Remove the second argument (value), which is not needed.
696
697 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
698
699         * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
700         the build.
701
702         * boehm-gc.c: Ditto.
703         
704 2009-07-24  Mark Probst  <mark.probst@gmail.com>
705
706         * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
707         not perform the store itself.  Introduce
708         mono_gc_wbarrier_generic_nostore(), which is the same as
709         mono_gc_wbarrier_generic_store(), except it doesn't perform the
710         store.
711
712 2009-07-24  Mark Probst  <mark.probst@gmail.com>
713
714         * icall.c (ves_icall_System_Array_SetGenericValueImpl):
715         mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
716         we still need the memcpy().
717
718 2009-07-22  Mark Probst  <mark.probst@gmail.com>
719
720         * sgen-gc.c: Align array bounds calculation to mono_array_size_t
721         so that big arrays are handled correctly.  Always use
722         safe_object_get_size() to calculate array object sizes, which
723         takes bounds into account.
724
725 2009-07-22  Mark Probst  <mark.probst@gmail.com>
726
727         * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
728         GC descriptor is computed before we use it.
729
730 2009-07-22  Mark Probst  <mark.probst@gmail.com>
731
732         * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
733         write barrier if necessary.
734
735 2009-07-22  Mark Probst  <mark.probst@gmail.com>
736
737         * icall-def.h, icall.c, thread-types.h: New separate icall for
738         VolatileWrite(object&,object) that uses a write barrier.
739
740         * console-unix.c, file-io.c, icall.c, threads.c: Use write
741         barriers in icalls which write to "ref" or "out" arguments.
742
743 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
744
745         * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
746         handler in a separate icall, to reduce the size of the wrappers.
747
748 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
749
750         * metadata-verify.c (is_valid_typespec_blob): Fix error message.
751
752 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
753
754         * metadata-verify.c (parse_field): Allow byref field.
755
756         * metadata-verify.c (parse_locals_signature): Allow byref locals.
757
758         * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
759
760 2009-07-20 Rodrigo Kumpera  <rkumpera@novell.com>
761
762         * verify.c (do_cast): Fail for any non reference type that isn't boxed.
763         Fixes #522784.
764
765 2009-07-20  Robert Jordan  <robertj@gmx.net>
766
767         * cominterop.c (cominterop_get_managed_wrapper_adjusted):
768         Fix invalid IL in valuetype handling (STOBJ must push the
769         corresponding class). Fixes bug #523149.
770
771         Code is contributed under MIT/X11 license.
772
773 2009-07-20  Geoff Norton  <gnorton@novell.com>
774
775         * gc.c: Use proper semaphores where available on posix and darwin.
776
777 2009-07-19  Geoff Norton  <gnorton@novell.com>
778
779         * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
780
781 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
782
783         * refletion.c (is_sre_usertype): Change name to is_usertype and
784         invert it's result so it returns true if the type is an user type
785         and not the opposite.
786
787         * reflection.c (is_*_type): Change all of those to use new macro
788         check_corlib_type_cached that cached the type lookup so we don't
789         need to do string comparisons all the type. Changed the signature
790         to take a MonoClass instead.
791
792         * reflection.c: Change mono_image_create_token and resolve_object
793         to use is_sre_* functions.
794
795 2009-07-18  Mark Probst  <mark.probst@gmail.com>
796
797         * sgen-gc.c: Check for writes to the stack in the managed
798         wbarrier as well.
799
800 2009-07-18  Mark Probst  <mark.probst@gmail.com>
801
802         * sgen-gc.c: When a thread is unregistered, don't free its remsets
803         but put them on a list which is processed with the other thread's
804         remsets.
805
806 2009-07-18  Mark Probst  <mark.probst@gmail.com>
807
808         * sgen-gc.c: Fix and enable the internal allocator instead of
809         using malloc/free (which causes deadlocks).
810
811 2009-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
812
813         * refletion.c: Fix builds with SRE disabled by adding a minimal
814         implementation of mono_reflection_type_get_handle.
815
816 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
817
818         * refletion.c: Make mono_reflection_type_get_handle non static.
819
820         * object-internals.h: Export mono_reflection_type_get_handle.
821
822         * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
823         unmanaged handle using mono_reflection_type_get_handle.
824
825 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
826
827         * refletion.c: Replace all reads of MonoReflectionType::type with
828         calls to mono_reflection_type_get_handle. Only the functions that
829         deal with constructing TypeBuilder::type have not been changed
830         because they have to deal with NULL values.
831
832         This is a first step into supporting reflection types that don't
833         map directly into their unmanaged counterpart.
834
835 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
836
837         * metadata-verify.c (parse_locals_signature): Don't complain
838         on signature with zero locals since MS generates it and doesn't
839         bother with.
840
841 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
842
843         * reflection.c (mono_image_get_array_token): Resolve return
844         type using mono_reflection_type_get_handle.
845
846         * reflection.c (mono_image_get_array_token): Resolve array method
847         parent type using mono_reflection_type_get_handle.
848
849 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
850
851         * reflection.c (mono_image_basic_init): Applied patch from
852         <Dax@daxxfiles.net>. Set the public key token from the assembly
853         builder. Fixes #518909.
854
855         * appdomain.c: Bump corlib version.
856
857 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
858
859         * class.c (mono_class_needs_cctor_run): Make this return false if
860         the class has no cctor.
861
862 2009-07-13  Mark Probst  <mark.probst@gmail.com>
863
864         * sgen-gc.c: When the minor GC needs to allocate a new section,
865         invoke the major GC afterwards.
866
867 2009-07-14  Bill Holmes  <billholmes54@gmail.com>
868
869         * process.c  (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
870           Applying the window_style field to the SHELLEXECUTEINFO struct.
871
872         Code is contributed under MIT/X11 license.
873
874 2009-07-13  Mark Probst  <mark.probst@gmail.com>
875
876         * sgen-gc.c: Fix the race condition in the unmanaged allocator by
877         locking earlier.  Fix it in the managed allocator by making sure
878         that no thread is stopped there before the GC runs.  If we do stop
879         a thread there, we restart it and let it run a but, until it stops
880         somewhere else.
881
882         * gc-internal.h, gc.c: Function for getting the IP from a signal
883         context via a function registered by mini.
884
885 2009-07-11  Zoltan Varga  <vargaz@gmail.com>
886
887         * object-internals.h (MonoIntPtr): New structure describing a boxed
888         IntPtr.
889
890         * object.c (mono_runtime_invoke_array): Handle ptr arguments and
891         returns. Fixes #519953.
892
893         * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
894
895 2009-07-09  Mark Probst  <mark.probst@gmail.com>
896
897         * class-internals.h, generic-sharing.c: New RGCTX info type for
898         getting a remoting invoke with check wrapper.
899
900 2009-07-07  Geoff Norton  <gnorton@novell.com>
901
902         * icall-def.h: Fix the enable-minimal build.
903
904 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
905
906         * object-internals.h: Add MonoReflectionDerivedType.
907
908         * reflection.c: Implement support for PointerType.
909         Fixed tons of warnings.
910
911 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
912
913         * object-internals.h: Add MonoReflectionByRefType.
914
915         * reflection.c: Implement support for ByRefType.
916
917 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
918
919         * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
920
921         * object-internals.h: Add MonoReflectionArrayType and
922         mono_reflection_create_unmanaged_type.
923
924         * reflection.c: Implement support for ArrayType.
925
926 2009-07-07 Rodrigo Kumpera  <rkumpera@novell.com>
927
928         * metadata-verify.c (is_valid_method_header): Parse EH block
929         flags correctly.
930
931 2009-07-03  Mark Probst  <mark.probst@gmail.com>
932
933         * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
934         processing the disappearing links, and process disappearing links
935         in a loop until no new objects are copied.
936
937 2009-07-03  Mark Probst  <mark.probst@gmail.com>
938
939         * object.c (handle_enum): Invoke the write barrier when copying
940         value type instances.
941
942         * sgen-gc.c: Register remsets for unmanaged write barriers only
943         when the address written to is actually on the heap.  This makes
944         set_value() in object.c work without requiring that the result be
945         on the heap.
946
947 2009-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
948
949         The runtime wrappers are all bound to a given type that must
950         exist in the same image. For regular images we use the <Module>
951         type, which is required to exist for all images.
952
953         The <Module> type can't be used for dynamic images because it
954         might not exist at the time the wrapper is required, so we create
955         a synthetic type to use instead.
956
957         The current code works because of the 2 stage setup of MonoClass,
958         but once this is gone it will no longer work.
959
960         * icall-def.h: Add ModuleBuilder::set_wrappers_type.
961
962         * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
963
964         * object-internals.h: Export mono_image_set_wrappers_type icall
965         as part of the internal API.
966
967         * marshal.c (get_wrapper_target_class): If the image is dynamic,
968         use MonoDynamicImage::wrappers_type instead of the <Module> type.
969
970         reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
971         image wrappers_type to the provided value.
972
973 2009-07-01 Rodrigo Kumpera  <rkumpera@novell.com>
974
975         * appdomain.c (deregister_reflection_info_roots): No need
976         to use the image lock here.
977
978 2009-07-02  Mark Probst  <mark.probst@gmail.com>
979
980         * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
981
982 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
983
984         * threads.c: Store the thread start argument in a hash table instead of
985         registering it as a root, as libgc doesn't support unregistering roots
986         under windows, leading to 'too many root sets' errors when many threads
987         are created.
988
989         * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
990         shutdown, they can still be referenced by the other dying objects.
991         Fixes #514506.
992
993 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
994
995         * socket-io.c: DontLinger does not allow LingerOptions.
996
997 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
998
999         * metadata-verify.c: The spec doesn't mention that it's possible to add
1000         custom attribute to a generic parameter. Fixed.
1001
1002 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1003
1004         * class.c (inflate_generic_type): Don't crash while trying to output a message
1005         on why we're aborting.
1006
1007 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
1008
1009         * socket-io.c: DontLinger can take an int or a boolean too.
1010
1011 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
1012
1013         * gc.c: check for a null argument to SuppressFinalize () and
1014         ReRegisterForFinalize ().
1015
1016 2009-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
1017
1018         * loader.c (method_from_methodspec): Call into the verifier to check
1019         the signature.
1020
1021         * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
1022
1023         * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
1024         part of the internal API.
1025
1026 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1027
1028         * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
1029         the signature.
1030
1031         * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
1032
1033         * verify-internals.h: Export mono_verifier_verify_typespec_signature as
1034         part of the internal API.
1035
1036 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1037
1038         * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
1039         the signature.
1040
1041         * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
1042         blob verification.
1043
1044         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1045         part of the internal API.
1046
1047 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1048
1049         * metadata-verify.c: Use is_valid_blob_object to verify blob validity
1050         when doing basic verification. 
1051
1052         This check must be done since the runtime peeks into signatures in much
1053         more places than it does decoding so it makes sense to ensure that all
1054         pointers to blob objects are well formed.
1055
1056 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1057
1058         * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
1059         Use proper overflow dectection. Fix usage of it.
1060
1061 2009-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
1062
1063         * loader.c (field_from_memberref): Call into the verifier to check
1064         the signature.
1065
1066         * loader.c (mono_method_get_signature_full): Same.
1067
1068         * loader.c (method_from_memberref): Same.
1069
1070         * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
1071
1072         * verify-internals.h: Export mono_verifier_verify_memberref_signature as
1073         part of the internal API.
1074
1075 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1076
1077         * threadpool.c (mono_thread_pool_add): If the domain is unloading
1078         or unloaded, still return an AsyncResult, but don't add it to the
1079         threadpool.
1080
1081 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
1082
1083         * threads.c: fix missing colon when DEBUG is defined.
1084
1085 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1086
1087         * threadpool.c: Don't add new calls to a threadpool if the domain
1088         of the call is unloading or unloaded.  When dequeuing a job, null
1089         the reference in the queue.
1090
1091 2009-06-25  Mark Probst  <mark.probst@gmail.com>
1092
1093         * sgen-gc.c (null_link_in_range): Add the dislink for the old
1094         generation if an object was moved.
1095
1096 2009-06-25  Sylvain Dupont <duposyl@gmail.com>
1097
1098         * cominterop.h cominterop.c marshal.c: Added support for marshalling out 
1099           parameters of type SAFEARRAY[VARIANT].
1100
1101         * reflection.c (encode_marshal_blob): Properly generate element type
1102           (SafeArraySubType marshal attribute option).
1103
1104         Code is contributed under MIT/X11 license.
1105
1106 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
1107
1108         * reflection.c: in mono_method_clear_object () really ensure all the
1109         objects are removed.
1110
1111 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1112
1113         * loader.c (mono_method_signature): Call into the verifier to check
1114         the method signature.
1115
1116         * metadata-verify.c (verify_method_table): Move signature verification
1117         to verify_method_table_full.
1118
1119         * metadata-verify.c: Add mono_verifier_verify_method_signature.
1120
1121         * verify-internals.h: Export mono_verifier_verify_method_signature as
1122         part of the internal API.
1123
1124 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1125
1126         * loader.c (mono_method_get_header): Call into the verifier to
1127         check the method header.
1128
1129         * metadata-verify.c: Add mono_verifier_verify_method_header.
1130
1131         * verify-internals.h: Export mono_verifier_verify_method_header as
1132         part of the internal API.
1133
1134 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1135
1136         * class.c (mono_class_find_enum_basetype): Call into the verifier to
1137         check the field signature. Replace an assert with an explicit check.
1138
1139         * class.c (mono_class_setup_fields): Call into the verifier to check
1140         the field signature.
1141
1142         * metadata-verify.c: Add mono_verifier_verify_field_signature.
1143
1144         * verify-internals.h: Export mono_verifier_verify_field_signature as
1145         part of the internal API.
1146
1147 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1148
1149         * class.c (mono_class_find_enum_basetype): Simplify this function
1150         by moving code outside of the loop and not decoding static fields.
1151
1152 2009-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
1153
1154         * metadata-verify.c (verify_typedef_table): Check the extends
1155         token here. Move to here a flags check from verify_typedef_table_full.
1156
1157 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1158
1159         * metadata-verify.c (is_valid_method_header): Fix a warning.
1160
1161         * metadata-internals.h (MonoImage): Remove the unused 
1162         static_rgctx_invoke_wrapper_cache.
1163
1164         * image.c marshal.c: Ditto.
1165
1166 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
1167
1168         * image.c (do_mono_image_load): Enable table data verification.
1169
1170 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
1171
1172         * metadata-verify.c (is_valid_constant): Fix nullref check.
1173
1174 2009-06-23 Rodrigo Kumpera  <rkumpera@novell.com>
1175
1176         * metadata-verify.c (is_valid_constant): Fix string bounds check.
1177
1178 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1179
1180         * sgen-gc.c: Managed allocation with pthreads TLS.
1181
1182         * threads.c, threads-types.h: Functions for the JIT to tell the
1183         runtime whether it supports the MONO_TLS opcode.
1184
1185 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1186
1187         * metadata-verify.c (verify_param_table): Fix a crash for assemblies
1188         without methods.
1189
1190 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1191
1192         * metadata-verify.c (is_valid_constant): Fix the string length check.
1193         Use safe overflow checking. Add decent error messages.
1194
1195 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1196
1197         * metadata-verify.c: Move remaininh blob checks to the offline
1198         verification path.
1199
1200 2009-06-22 Rodrigo Kumpera  <rkumpera@novell.com>
1201
1202         * metadata-verify.c: Move more blob checks to the offline verification
1203         path.
1204
1205 2009-06-22  Bill Holmes  <billholmes54@gmail.com>
1206
1207         * object-internals.h : Adding interrupt_on_stop field.
1208
1209         * threads.c (mono_thread_request_interruption) : On Windows exit the
1210           thread if interrupt_on_stop is set.
1211
1212         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
1213          Removing old interrupt logic and setting the interrupt_on_stop for the
1214          thread when calling accept.
1215
1216         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
1217          setting the interrupt_on_stop for the thread when calling accept.
1218
1219         Contributed under MIT/X11 license.
1220
1221 2009-06-20  Martin Baulig  <martin@ximian.com>
1222
1223         * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
1224
1225 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
1226
1227         * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
1228         running in no-exec mode.
1229
1230 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1231
1232         * metadata-verify.c (verify_method_table): Move header
1233         checking to verify_method_table_full.
1234
1235         * metata-verify.c (mono_verifier_verify_full_table_data):
1236         Call verify_method_table_full.
1237
1238 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1239
1240         * metadata-verify.c (verify_field_table): Move signature
1241         checking to verify_field_table_full.
1242
1243         * metata-verify.c (mono_verifier_verify_full_table_data):
1244         Call verify_field_table_full.
1245
1246 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1247
1248         * metadata-verify.c (verify_typedef_table): Move remaining
1249         stuff to verify_typedef_table_full.
1250
1251 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1252
1253         * metadata-verify.c: Kill is_corlib from VerifyContext.
1254         It is only used by the offline mode.
1255         So we better remove it from the runtime path.
1256
1257 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1258
1259         * metadata-verify.c: Add new mono_verifier_verify_full_table_data
1260         function that perform the offline metadata verification steps.
1261
1262         * metadata-verify.c (verify_typedef_table): Move some checks to
1263         verify_typedef_table_full and make it been called by new function
1264         mono_verifier_verify_full_table_data.
1265
1266         * pedump.c: Call mono_verifier_verify_full_table_data.
1267
1268         * verify-internals.h: Export mono_verifier_verify_full_table_data as
1269         part of the internal API.
1270
1271 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1272
1273         * metadata-verify.c (typedef_is_system_object): Fix System.Object
1274         check.
1275
1276         * metadata-verify.c (verify_implmap_table): Fix implmap invalid
1277         flags bits. SupportLastError was confused as bit 7 instead of 6.
1278
1279         * metadata-verify.c (verify_implmap_table): Fix import scope verification
1280         to check against the module ref table instead of module.
1281
1282         * metadata-verify.c (verify_implmap_table): Fix corlib check.
1283
1284         * pedump.c: Call mono_image_load_names.
1285
1286 2009-06-19 Rodrigo Kumpera  <rkumpera@novell.com>
1287
1288         * image.c: Extract mono_image_load_names from do_mono_image_load.
1289
1290         * metadata-internals.h: Export mono_image_load_names as part of
1291         the internal API.
1292         
1293 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
1294
1295         * metadata.c (mono_metadata_cleanup): Free the generic method cache
1296         first, as it could reference data in the other caches.
1297
1298 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
1299
1300         * metadata-verify.c: Finished with method header verification.
1301
1302 2009-06-18 Rodrigo Kumpera  <rkumpera@novell.com>
1303
1304         * metadata-verify.c: Added more header verification code.
1305         Now only EH clauses are missing.
1306
1307 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
1308
1309         * marshal.c (get_runtime_invoke_type): Don't share primitive types
1310         for return values.
1311
1312 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
1313
1314         * metadata-verify.c: Initial method header verification.
1315
1316 2009-06-16 Rodrigo Kumpera  <rkumpera@novell.com>
1317
1318         * metadata-verify.c (verify_import_table): The IAT contents
1319         might end been patched by the windows DL when running with
1320         coree enabled.
1321
1322 2009-06-15 Rodrigo Kumpera  <rkumpera@novell.com>
1323
1324         * class.c (mono_class_from_typeref): If the enclosing type is not
1325         found return null instead of crashing. Fixes #508487.
1326
1327 2009-06-15  Atsushi Enomoto  <atsushi@ximian.com>
1328
1329         * normalization-tables.h : updated to the latest unicode charcter
1330           data.
1331         * appdomain.c : bump corlib version.
1332
1333 2009-06-14  Zoltan Varga  <vargaz@gmail.com>
1334
1335         * class.c (mono_class_from_name): Fix support for assembly references
1336         in the EXPORTEDTYPE table. Fixes #511704.
1337
1338 2009-06-13  Geoff Norton  <gnorton@novell.com>
1339
1340         * domain.c: Ensure that mono_domain_assembly_open actually opens the
1341         assembly in the target domain.
1342
1343 2009-06-12  Robert Jordan  <robertj@gmx.net>
1344
1345         * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
1346         because "this" of the managed signature has become an
1347         ordinary parameter in the unmanaged signature.
1348
1349 2009-06-12  Zoltan Varga  <vargaz@gmail.com>
1350
1351         * class-internals.h (struct _MonoGenericContainer): Add an 'image'
1352         field for owner-less generic containers.
1353
1354         * reflection.c (mono_reflection_initialize_generic_parameter): Set the
1355         image field of the owner-less generic containers created here.
1356
1357         * metadata.c (mono_metadata_load_generic_params): Ditto, the
1358         contain is ownerless until the caller sets its owner.
1359
1360         * metadata.c (type_in_image): Handle owner-less generic containers
1361         correctly.
1362         
1363 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
1364
1365         * image.c (mono_image_close): Support debug_assembly_unload for
1366         dynamic images too.
1367
1368 2009-06-11 Andrés G. Aragoneses  <aaragoneses@novell.com>
1369
1370         * class.c: Fix some typos in comments.
1371
1372 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
1373
1374         * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
1375
1376         * threads.c (mono_thread_execute_interruption): Avoid creating the
1377         abort exception object while holding the synch_cs lock.
1378
1379 2009-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
1380
1381         * metadata-verify.c: Verify basic cattr content.
1382
1383 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1384
1385         * reflection.c (add_exported_type): Don't set the FORWARDER flag on
1386         nested types.
1387         
1388         * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
1389         support for nested types. Fixes #511704.
1390
1391 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
1392
1393         * metadata-verify.c: Verify methodspec signatures.
1394
1395 2009-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
1396
1397         * metadata-verify.c: Verify typespec signatures.
1398
1399 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
1400
1401         * metadata.c (free_inflated_method): Call 
1402         mono_marshal_free_inflated_wrappers (), which was missed earlier.
1403
1404 2009-06-08  Miguel de Icaza  <miguel@novell.com>
1405
1406         * mono-config.c: Small change to report the PPC64/ILP32 model.
1407
1408 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1409
1410         * metadata-verify.c (parse_type): Check szarray.
1411
1412 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1413
1414         * metadata-verify.c (parse_type): Check fnptr.
1415
1416 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1417
1418         * metadata-verify.c (parse_type): Check generic instances.
1419
1420 2009-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
1421
1422         * metadata-verify.c (parse_type): Check array shape.
1423
1424 2009-06-05  Robert Jordan  <robertj@gmx.net>
1425
1426         * class.c (mono_class_create_from_typedef): Check only for
1427         mscorlib's System.Array.
1428
1429 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
1430
1431         * metadata-verify.c (parse_type): Check pointer, class/valuetype
1432         and generic params. 
1433
1434         * metadata-verify.c (parse_field): Check the signature.
1435
1436 2009-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
1437
1438         * metadata-verify.c: Implement locals signature check.
1439
1440 2009-06-04  Marek Safar  <marek.safar@gmail.com>
1441
1442         * domain.c: Add .NET 4.0 Beta 1 version.
1443
1444 2009-06-04  Bill Holmes  <billholmes54@gmail.com>
1445
1446         * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
1447           For QueryInterface on CCWs consider the base class
1448           interfaces as well.
1449
1450         Code is contributed under MIT/X11 license.
1451
1452 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1453
1454         * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
1455
1456         * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
1457         used.
1458
1459         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
1460         adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
1461
1462         * generic-sharing.c (inflate_other_data): Ditto.
1463         
1464 2009-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
1465
1466         * metadata-verify.c: Implement property signature check.
1467
1468 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1469
1470         * sgen-gc.h: Register saving support for PPC.
1471
1472 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1473
1474         * sgen-gc.c: Fixed a pthread TLS screwup.
1475
1476 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1477
1478         * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
1479         supported.
1480
1481 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1482
1483         * sgen-gc.c: Disable TLA and managed allocation if the __thread
1484         keyword is not supported.
1485
1486 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1487
1488         * marshal.c metadata.c: Applied patch from Ulrich Weigand 
1489         <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
1490         the inflated method is freed. Fixes #508389.
1491
1492         The code is contributed under the MIT/X11 license.
1493         
1494 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
1495
1496         * marshal.c (get_wrapper_target_class): New helper function.
1497         (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
1498         the <Module> class of the image. Fixes #509049.
1499
1500 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1501
1502         * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
1503         Check if the thread was interrupted and proccess it straight away.
1504         Makes abortion much more responsive.
1505
1506 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1507
1508         * threads.c (mono_thread_execute_interruption): Use atomic cas with
1509         MonoThread::interruption_requested to match it's counterpart.
1510
1511         Fixes a hang in abort-stress-1 on a 2 core x86.
1512
1513         * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
1514         Fix warning.
1515
1516 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1517
1518         Change MonoImage::name_cache to be protected by the image lock
1519         instead of the loader lock.
1520
1521         * appdomain.c (deregister_reflection_info_roots): Protect access
1522         to name_cache.
1523
1524         * class.c (mono_image_init_name_cache): Change from the loader lock
1525         to the image lock. Check if the cache wasn't already created.
1526
1527         * class.c: Change from the loader to the image lock.
1528
1529         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
1530         the code to hold the image lock while iterating over name_cache and
1531         not go into mono_array_new holding it.
1532
1533         * metadata-internals.h: Add a comment about this change.
1534
1535 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1536
1537         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
1538         Under the 2.0 profile raise the loader error.
1539
1540         Fixes #508532.
1541
1542 2009-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
1543
1544         * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
1545         of ldind opcode for generic instances so we don't fail for direct wrappers.
1546         This only affect direct calls.
1547
1548 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1549
1550         * reflection.c (create_dynamic_mono_image): Fix warnings.
1551
1552         * generic-sharing.c (other_info_equal): Ditto.
1553         
1554 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
1555
1556         * metadata-verify.c: Implement field signature check.
1557
1558 2009-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
1559
1560         * metadata-verify.c: Implement standalone signature check.
1561
1562 2009-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
1563
1564         * metadata-verify.c: Implement methodref signature check.
1565
1566 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
1567
1568         * object-internals.h (MonoRuntimeCallbacks): New structure containing
1569         callbacks supplied by the runtime.
1570
1571         * object.c (mono_install_callbacks): New internal function to install
1572         the callbacks.
1573
1574         * object.c (mono_create_ftnptr): Move the implementation of this to
1575         mini/.
1576
1577         * object.c (mono_get_addr_from_ftnptr): Ditto.  
1578
1579 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
1580
1581         * metadata-verify.c (parse_return_type): Proper byref check.
1582         * metadata-verify.c (is_valid_method_signature): Check for zero arity
1583         generic signatures and method params.
1584
1585 2009-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
1586
1587         * metadata-verify.c (decode_signature_header): Fix bounds check.
1588
1589         * metadata-verify.c (parse_custom_mods): Check custom mods.
1590
1591         * metadata-verify.c (parse_type): Do initial basic verification
1592         of valid values.
1593         
1594         * metadata-verify.c (is_valid_method_signature): Parse the generic
1595         param count.
1596
1597 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
1598
1599         * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
1600         discarded based on their most specific definition so we set the method_slots
1601         array before checking if the method is acceptable or not.
1602
1603         Fixes #506757.
1604
1605 2009-05-26  Mark Probst  <mark.probst@gmail.com>
1606
1607         * icall.c: Free the old array when resizing a mono_ptr_array.
1608
1609 2009-05-26  Mark Probst  <mark.probst@gmail.com>
1610
1611         * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
1612         for the hashes whose keys are managed objects.
1613
1614 2009-05-26  Mark Probst  <mark.probst@gmail.com>
1615
1616         * object-internals.h, threads.c: Set the execution context on
1617         thread start here, not in corlib.
1618
1619         * appdomain.c: Bump corlib version.
1620
1621 2009-05-27  Martin Baulig  <martin@ximian.com>
1622
1623         * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
1624         if `_mono_debug_using_mono_debugger' is set to make things work
1625         properly when embedding Mono.
1626
1627 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1628
1629         * class.c (mono_class_setup_fields): Don't mark simd types as having
1630         16 bytes alignment as the whole runtime doesn't support.
1631
1632 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1633
1634         * metadata-verify.c (safe_read): Use endian safe read macros.
1635
1636 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
1637
1638         * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
1639         it is read-only when using full aot.
1640
1641 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
1642
1643         * metadata-verify.c (is_valid_method_signature): Verify parts
1644         of the return type. Provide an error message in case of failure.
1645
1646 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
1647
1648         * metadata-verify.c (is_valid_method_signature): Verify the call conv.
1649
1650 2009-05-22 Rodrigo Kumpera  <rkumpera@novell.com>
1651
1652         * metadata-verify.c: Include the size prefix in the bounds check.
1653
1654 2009-05-22  Miguel de Icaza  <miguel@novell.com>
1655
1656         * icall.c: Remove warnings.
1657
1658         * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
1659         prevent auto-detection based on GCC defines.
1660
1661         Add PS3
1662
1663         * metadata-verify.c: Do not include signal.h
1664
1665         * generic-sharing.c, marshal.c: Add returns to avoid some warning
1666         messages.  Not sure why the g_assert_not_reached is not enough to
1667         quiet the compiler.
1668         
1669
1670         * appdomain.c: Remove code that is not used when
1671         DISABLE_SHADOW_COPY is set.
1672
1673         * image.c: use g_getenv
1674
1675 2009-05-21  Miguel de Icaza  <miguel@novell.com>
1676
1677         * reflection.c: Remove code that it not used with
1678         DISABLE_REFLECTION_EMIT is defined.
1679
1680 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1681
1682         * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
1683         invoke wrappers.
1684
1685 2009-05-20  Miguel de Icaza  <miguel@novell.com>
1686
1687         * socket-io.c
1688         (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
1689         the ifdef here and instead put that on io-layer
1690
1691 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
1692
1693         * metadata-verify.c: Verify the generic param constraint table.
1694
1695 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
1696
1697         * metadata-verify.c (verify_generic_param_table): Fix
1698         thinko on the valid flags bits for generic params.
1699
1700 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
1701
1702         * metadata-verify.c: Verify the methodspec table.
1703
1704 2009-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
1705
1706         * metadata-verify.c: Verify the generic param table.
1707
1708 2009-05-19  Mark Probst  <mark.probst@gmail.com>
1709
1710         * sgen-gc.c: Store and use the count with REMSET_VTYPE.
1711
1712 2009-05-19  Mark Probst  <mark.probst@gmail.com>
1713
1714         * sgen-gc.c: Use generation enum more consistently and use the
1715         correct generation in mono_gc_register_for_finalization().
1716
1717 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
1718
1719         * metadata-verify.c: Verify the nested class table.
1720
1721 2009-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
1722
1723         * metadata-verify.c: Verify the manifest resource table.
1724
1725 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
1726
1727         * debug-helpers.c (dis_one): Add little-endian support for ldstr.
1728
1729 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
1730
1731         * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
1732         wrappers, this is now done in the JIT.
1733         
1734         * class.c (mono_set_generic_sharing_supported): New internal function.
1735         (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
1736
1737 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
1738
1739         * metadata-verify.c: Verify the exported type table.
1740
1741 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
1742
1743         * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
1744
1745 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
1746
1747         * metadata-verify.c: Verify the file table.
1748
1749 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
1750
1751         * metadata-verify.c (verify_assembly_table): Fix an error message.
1752
1753         * metadata-verify.c: Verify the assemblyref table.
1754
1755 2009-05-15 Rodrigo Kumpera  <rkumpera@novell.com>
1756
1757         * metadata-verify.c (verify_assembly_table): Fix the valid
1758         bits mask for flags.
1759
1760 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1761
1762         * debug-helpers.c (mono_method_full_name): Print generic parameters of
1763         generic methods as well.
1764
1765 2009-05-15  Geoff Norton  <gnorton@novell.com>
1766
1767         * gc.c: MachO/Darwin supports and uses semaphores fine for this 
1768         use-case and is significantly more performant than the wapi layer.
1769
1770 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
1771
1772         * metadata-verify.c: Verify the assembly table.
1773
1774 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
1775
1776         * metadata-verify.c: Fix rows limit check.
1777
1778 2009-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
1779
1780         * metadata-verify.c: Verify the fieldrva table.
1781
1782 2009-05-13  Mark Probst  <mark.probst@gmail.com>
1783
1784         * sgen.c: Speed up weak links and finalizers by grouping them by
1785         generation.
1786
1787 2009-05-13  Mark Probst  <mark.probst@gmail.com>
1788
1789         * marshal.c (delegate_hash_table_add): When overwriting an entry,
1790         free the old GCHandle (only applies to SGen).
1791
1792 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
1793
1794         * loader.c (mono_get_method_from_token): Avoid the expensive call to
1795         mono_metadata_load_generic_params () for non-generic methods.
1796
1797 2009-05-12  Mark Probst  <mark.probst@gmail.com>
1798
1799         * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
1800         New function for returning a monitor's weak link if it has one.
1801
1802         * sgen-gc.c: Remove an object's monitor's weak link (if it has
1803         one) when clearing a domain.  These can still be around because
1804         the object might not have been collected.
1805
1806 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
1807
1808         * gc.c: Fix a warning.
1809
1810 2009-05-12  Kornél Pál  <kornelpal@gmail.com>
1811
1812         * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
1813         prevous wait that resulted in a deadlock on Windows when initializing
1814         the runtime form DllMain. Also results in improved startup time.
1815         (finalizer_thread): Get rid of thread_started_event.
1816         * threads.c, threads-types.h (mono_thread_create_internal): Return the
1817         resulting MonoThread.
1818
1819         Contributed under MIT/X11 license.
1820
1821 2009-05-11 Rodrigo Kumpera  <rkumpera@novell.com>
1822
1823         * metadata-verify.c: Verify the implmap table.
1824         Don't require that #US and #Strings be present.
1825
1826 2009-05-11  Sebastien Pouliot  <sebastien@ximian.com>
1827
1828         * security-core-clr.c: Delegate checks are done at creation time,
1829         not a invocation time. Fix exception for Telerik Silverlight demo
1830
1831 2009-05-11  Mark Probst  <mark.probst@gmail.com>
1832
1833         * sgen-gc.c (need_remove_object_for_domain): Remove the special
1834         case for the Thread class.
1835
1836         * threads.c: Do clean-up of abort exception/state in
1837         thread_cleanup() instead of Thread.free_internal().  Also clean up
1838         current_appcontext.  The reason we have to do that is because
1839         those references might point into another domain and if that
1840         domain is unloaded before the thread is finalized, they point to
1841         invalid data.
1842
1843 2009-05-10  Andreas Faerber  <andreas.faerber@web.de>
1844
1845         * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
1846         stub signatures.
1847         
1848         Contributed unter MIT/X11 license.
1849
1850 2009-05-09  Miguel de Icaza  <miguel@novell.com>
1851
1852         * verify.c, metadata-verifier.c: Add support for disabling the
1853         verifier in some builds.
1854
1855         [ Sorry, my previous commit accidentally commited some work in
1856         progress ]
1857
1858 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1859
1860         * class.c (mono_class_setup_fields): Set class->field.first for
1861         generic instances.
1862
1863 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
1864
1865         * metadata-verify.c: Verify the typespec table.
1866
1867 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
1868
1869         * metadata-verify.c: Verify the module table.
1870
1871 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
1872
1873         * metadata-verify.c: Verify the methodimpl table.
1874
1875 2009-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
1876
1877         * metadata-verify.c: Verify the property table.
1878
1879 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1880
1881         * debug-helpers.c (mono_method_desc_match): Add support for generic
1882         glob patterns.
1883
1884 2009-05-05 Rodrigo Kumpera  <rkumpera@novell.com>
1885
1886         * metadata-verify.c: Verify the propertymap table.
1887
1888 2009-05-04 Rodrigo Kumpera  <rkumpera@novell.com>
1889
1890         * metadata-verify.c: Verify the event table.
1891
1892         * metadata-verify.c (search_sorted_table): Fix offset
1893         calculation.
1894
1895 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
1896
1897         * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
1898
1899 2009-05-01  Mark Probst  <mark.probst@gmail.com>
1900
1901         * gc.c (mono_gc_run_finalize): Don't set the domain too late,
1902         because mono_delegate_free_ftnptr() needs it.
1903
1904 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1905
1906         * metadata-verify.c: Verify the eventmap table.
1907
1908 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1909
1910         * metadata-verify.c: Verify the standalonesig table.
1911
1912 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1913
1914         * metadata-verify.c: Verify the field layout table.
1915
1916 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1917
1918         * class.c (mono_type_get_name_recurse): Don't crash
1919         for ownerless generic params.
1920
1921         * debug-helpers.c (mono_type_get_desc): Correct the format
1922         for ownerless generic params.
1923
1924 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1925
1926         * metadata-verify.c: Verify the class layout table.
1927
1928 2009-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
1929
1930         * metadata-verify.c: Verify the decl security table.
1931
1932 2009-04-30  Mark Probst  <mark.probst@gmail.com>
1933
1934         * domain.c (mono_domain_set_internal_with_options): Don't do
1935         anything if the old domain is the same as the old one.  Fixes
1936         #499326.
1937
1938 2009-04-30  Mark Probst  <mark.probst@gmail.com>
1939
1940         * appdomain.c: Deregister the reflection_info roots when unloading
1941         a domain.
1942
1943         * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
1944         memory allocated by a domain and frees its disappearing links.
1945
1946         * boehm-gc.c, null-gc.c: Empty implementation of
1947         mono_gc_clear_domain().
1948
1949 2009-04-30  Mark Probst  <mark.probst@gmail.com>
1950
1951         * appdomain.c (clear_cached_vtable): Free the static fields memory
1952         block.
1953
1954 2009-04-30  Mark Probst  <mark.probst@gmail.com>
1955
1956         * gc.c: Set the correct domain when invoking finalizers.
1957
1958         * appdomain.c: Set the correct domain when creating threads.
1959
1960 2009-04-30  Mark Probst  <mark.probst@gmail.com>
1961
1962         * sgen-gc.c: Fix skip size for vectors.
1963
1964 2009-05-03  Martin Baulig  <martin@ximian.com>
1965
1966         * mono-debug-debugger.c
1967         (mono_debugger_check_breakpoints): Check class init handlers even
1968         if we don't have any method load handers.
1969
1970 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
1971
1972         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid 
1973         returning refonly assemblies if refonly is FALSE. Fixes #499013.
1974
1975 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
1976
1977         * metadata-verify.c: Verify the field marshal table.
1978
1979 2009-04-29 Rodrigo Kumpera  <rkumpera@novell.com>
1980
1981         * metadata-verify.c: Verify the custom attribute table.
1982
1983 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
1984
1985         * metadata-verify.c: Verify the constant table.
1986
1987 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
1988
1989         * metadata-verify.c: Verify the memberef table.
1990
1991 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
1992
1993         * metadata-verify.c (get_coded_index_token): Remove
1994         dead argument.
1995
1996 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
1997
1998         * metadata-verify.c: Verify the interfaceimpl table.
1999
2000 2009-04-28 Rodrigo Kumpera  <rkumpera@novell.com>
2001
2002         * verify.c: Improve error message.
2003
2004         * debug-helpers.c (mono_type_get_desc): Harden the code that
2005         deals with VAR and MVAR.
2006
2007 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
2008
2009         * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes 
2010         part of #498692.
2011
2012 2009-04-23 Tom Hindle <tom_hindle@sil.org>
2013
2014         * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
2015         changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
2016
2017 2009-04-28  Sebastien Pouliot  <sebastien@ximian.com>
2018
2019         * security-core-clr.c: Avoid redundant checks for platform code, 
2020         e.g. check for method and for class (very common) and check
2021         for class and outer class (less common)...
2022
2023 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
2024
2025         * reflection.c: Avoid returning random cattrs for synthetic methods.
2026         Fixes #498545.
2027
2028 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2029
2030         * assembly.c: assemblies in the GAC should never be shadow-copied.
2031
2032 2009-04-26  Mark Probst  <mark.probst@gmail.com>
2033
2034         * domain.c, domain-internals.h: Disable
2035         track_resurrection_{objects,handles}_hash in MonoDomain if using
2036         SGen.
2037
2038 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2039
2040         * metadata-verify.c: Verify the param table.
2041
2042 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2043
2044         * metadata-verify.c (verify_typedef_table): Range check FieldList and
2045         MethodList.
2046
2047         * metadata-verify.c (verify_method_table): Proper check the ParamList
2048         field.
2049
2050 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2051
2052         * metadata-verify.c (verify_method_table): Check for runtime
2053         implemented functions such as delegate .ctors. Remove spurious
2054         printf.
2055         
2056 2009-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
2057
2058         * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
2059
2060 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2061
2062         Don't allocate MonoGenericInfo for ownerless generic params.
2063         * class-internals.h (MonoGenericParam::info): Move field to ...
2064         (MonoGenericParamFull): ... this.  New struct.
2065         (MonoGenericContainer::type_params): Change type to
2066         MonoGenericParamFull.
2067         (MonoGenericParam, MonoGenericContainer): Update accessors.
2068         * metadata.c (mono_metadata_parse_generic_param): Don't initialize
2069         'info' field for ownerless generic param.
2070         (mono_metadata_load_generic_params): Update to changes.
2071         * reflection.c (mono_reflection_create_generic_class): Likewise.
2072         (reflection_methodbuilder_to_mono_method): Likewise.
2073         (mono_reflection_initialize_generic_parameter): Likewise.
2074
2075 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2076
2077         Don't use MonoGenericParamInfo for ownerless generic params.
2078         * class.c (get_anon_gparam_class, set_anon_gparam_class): New.  Don't
2079         use ParamInfo class at all.
2080         (mono_class_from_generic_parameter): Use them.
2081         (make_generic_param_class): Fix a couple of instances where 'pinfo
2082         == NULL' wasn't handle.
2083
2084 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2085
2086         * class.c (make_generic_param_class): Carve out of ...
2087         (mono_class_from_generic_parameter): ... here.
2088
2089 2009-04-24  Raja R Harinath  <harinath@hurrynot.org>
2090
2091         Simplify mono_class_from_generic_parameter
2092         * class-internals.h (MonoGenericParamInfo::token): New field.
2093         * metadata.c (mono_metadata_load_generic_params): Initialize it
2094         from metadata.
2095         * class.c (mono_class_from_generic_parameter): Use it instead of
2096         searching through metadata.
2097
2098 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2099
2100         * metadata-verify.c: Add verification of the method table.
2101
2102 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2103
2104         * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
2105         Delegate::Invoke optimization.
2106
2107 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2108
2109         * appdomain.c (mono_domain_create_appdomain_internal): Free the
2110         string returned by get_shadow_assembly_location_base.
2111
2112         * appdomain.c (get_shadow_assembly_location_base): Add a comment
2113         about caller's ownership.
2114
2115 2009-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
2116
2117         * reflection.c: Add mono_reflection_cleanup_domain to cleanup
2118         reflection memory on domain unload.
2119
2120         * domain.c (mono_domain_free): Don't free refobject_hash, let the
2121         reflection cleanup code do it.
2122
2123         * domain-internals.h: Add mono_reflection_cleanup_domain.
2124
2125         This fixes a memory leak for managed mirrors of reflection objects
2126         on domain unload. 
2127
2128 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
2129
2130         * metadata-verify.c: Implement more verification of the field table.
2131
2132 2009-04-22 Rodrigo Kumpera  <rkumpera@novell.com>
2133
2134         * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
2135         doesn't try to parse the input assembly, which can be broken.
2136
2137 2009-04-23  Mark Probst  <mark.probst@gmail.com>
2138
2139         * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
2140         sgen-gc.c: Implement track resurrection in weak GC handles in SGen
2141         by using the lowest bit in the link to store whether the link is
2142         tracked.  Move the track_resurrection hashes into boehm-gc.c.
2143
2144 2009-04-22  Miguel de Icaza  <miguel@novell.com>
2145
2146         * Makefile.am: Split the console support in platform specific code
2147         and put together a framework for making this easy in the future so
2148         that we can start splitting code instead of having a mess of PLATFORM_WIN32
2149
2150 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
2151
2152         * pedump.c: Fix a warning.
2153
2154 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
2155
2156         * verify.c (mono_delegate_type_equal): Compare valuetypes using
2157         mono_class_from_mono_type to avoid bad interactions with the dual representation
2158         of the generic type definition.
2159
2160 2009-04-21 Rodrigo Kumpera  <rkumpera@novell.com>
2161
2162         * verify.c (do_invoke_method): Use mono_class_from_mono_type to
2163         get the MonoClass for the call context type as it might be a generic
2164         instance.
2165
2166         Fixes #491483.
2167
2168 2009-04-21  Mark Probst  <mark.probst@gmail.com>
2169
2170         * object-internals.h: The Thread object has no execution_context
2171         member anymore.
2172
2173         * threads.c, threadpool.c, threads-types.h: Accessor functions for
2174         the execution context.
2175
2176         * appdomain.c: Bump corlib version.
2177
2178 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2179
2180         * verify.c (do_newobj): Improve error message.
2181
2182 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2183
2184         * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
2185         is nested in the filter block.
2186
2187         * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
2188         block is not fully nested.
2189
2190         Fixes #495656.
2191
2192 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2193
2194         * verify.c (verify_type_compatibility_full): Compare MonoClass and
2195         not MonoType to check for equality of valuetypes as the generic type
2196         definition allows for two different encodings: the generic type definition
2197         class or a generic instance over the GTD arguments.
2198
2199         Fixes #496175.
2200
2201 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2202
2203         * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
2204
2205         * verify.c (do_initobj): Improve error message.
2206
2207 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2208
2209         * metadata-verify.c: Enable pe verification as the issue with #496453
2210         is that the authenticode data directory have a different unspecified
2211         format. Ignore it for now.
2212
2213         * pedump.c: Run the metadata verifier together with the IL verifier.
2214
2215         Fixes ##496453.
2216
2217 2009-04-20  Rolf Bjarne Kvinge  <RKvinge@novell.com>
2218
2219         * metadata-verify.c: Temporarily disable pe verification due to #496453.
2220
2221 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
2222
2223         * class.c (can_access_type): Check visibility against
2224         the element type for pointers and arrays.
2225
2226         Fixes #496150.
2227
2228 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
2229
2230         * metadata-verify.c: Fix cli and table verification to use information
2231         from the MonoImage. A lot of duplicated code got killed.
2232
2233 2009-04-17 Rodrigo Kumpera  <rkumpera@novell.com>
2234
2235
2236         This patch starts to integrate the metadata verifier with the runtime code.
2237
2238         This patch causes major regression in functionality for the metadata verifier
2239         as cli and table verification are disabled since they require to be ported to
2240         use MonoImage information.
2241
2242         * image.c (do_mono_image_load): Split the code in this function
2243         into mono_image_load_pe_data and mono_image_load_cli_data.
2244         Add     care_about_pecoff parameter to not load pecoff data.
2245         Call into the metadata verifier for pecoff and cli verification.
2246
2247         * image.c (mono_image_open_raw): New function that doesn't perform
2248         any parsing of the image contents.
2249         
2250         The reason for the 3 new functions is to give pedump better control
2251         into the interaction with the verifier.
2252
2253         * metadata-internals.h: Add new functions from image.c as part of the
2254         internal mono API.
2255
2256         * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
2257         mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
2258         to make those functions work together with the runtime.
2259
2260         * verify.c: Add mono_verifier_is_enabled_for_image function that returns
2261         true if the image needs to be verified.
2262
2263         * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
2264
2265         * pedump.c: Use new metadata verifier API.
2266
2267 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
2268
2269         * object.c (mono_install_vtable_trampoline): Make this receive a
2270         trampoline creation function instead of trampoline, allowing the JIT
2271         to use a different trampoline for each vtable.
2272
2273 2009-04-18  Mark Probst  <mark.probst@gmail.com>
2274
2275         * object.c (mono_raise_exception): Don't reset the thread abort
2276         exception state here.
2277
2278 2009-04-18  Mark Probst  <mark.probst@gmail.com>
2279
2280         * icall-def.h: New icall for getting the thread abort exception
2281         state for a thread.
2282
2283         * object.c, thread.c, object-internals.h: A thread's abort
2284         exception state is now a GC handle.  To get the object it stands
2285         for, we must move it into the current app domain, if it's
2286         different than the one where it originated from.
2287
2288         * appdomain.c: Bump corlib version.
2289
2290         * domain.c, domain-internals.h: New function for setting the
2291         domain and migrate the thread abort exception or not.
2292
2293 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2294
2295         * metadata-verify.c: Add initial verification of the
2296         field table.
2297
2298 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2299
2300         * metadata-verify.c: Add a macro to conditionally enable
2301         dumping of verification information. Add  make_coded_token
2302         and search_sorted_table to enable search sorted tables
2303         by a given coded token.
2304
2305 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2306
2307         * metadata-verify.c: Add array mapping from table index
2308         to description offset. Add get_col_offset and get_col_size
2309         functions.
2310
2311 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2312
2313         * metadata-verify.c: Add remaining table descriptions offsets.
2314         Add remaining coded index descriptions.
2315
2316 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2317
2318         * metadata-verify.c: Fixed constant table description.
2319         Fixed calculation of HasCustomAttribute coded index size.
2320         Fixed calculation of size for many table indexes. 
2321
2322 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2323
2324         * pedump.c (dump_metadata): Dump table offset instead
2325         of useless pointer in memory.
2326
2327 2009-04-16 Rodrigo Kumpera  <rkumpera@novell.com>
2328
2329         * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
2330
2331 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2332
2333         * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
2334         a missing of for interface types.
2335
2336 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2337
2338         * metadata-verify.c (verify_pe_optional_header): Add comment of why
2339         the code is commented.
2340
2341         * metadata-verify.c (verify_resources_table): Remove spurious printf
2342         and don't fail if there are unmanaged resources. Gmcs generates a useless
2343         one     for all assemblies - I bet it's some MS compatibility junk.
2344
2345 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2346
2347         * metadata-verify.c (verify_typedef_table): Verify the extends field.
2348
2349         * metadata-verify.c (mono_image_verify): Add a is_corlib.
2350
2351         * verify-internals.h: Same.
2352
2353         * pedump.c: Fix for mono_image_verify new signature.
2354
2355 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2356
2357         * metadata-verify.c (verify_typedef_table): Verify for some invalid
2358         flags combinations.
2359
2360 2009-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
2361
2362         * metadata-verify.c (verify_module_table): Ignore the generation field.
2363
2364 2009-04-15  Martin Baulig  <martin@ximian.com>
2365
2366         * debug-mono-symfile.c
2367         (mono_debug_symfile_lookup_location): Don't print a warning for
2368         unknown extended opcodes if they're within 0x40 and 0x7f.
2369
2370 2009-04-15  Zoltan Varga  <vargaz@gmail.com>
2371
2372         * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
2373         invoke signatures returning an enum. Fixes #494847.
2374
2375 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
2376
2377         * metadata-verify.c: Initial code to verify the typedef table.
2378
2379 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
2380
2381         * verify.c (mono_method_verify): Don't fail if an unconditional branch
2382         with non empty stack happens before the beginning of a try block.
2383
2384         Fixes #494812.
2385
2386 2009-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
2387
2388         * metadata-verify.c: Verify typename and typenamespace fields of
2389         the typeref table.
2390
2391 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
2392
2393         * metadata-verify.c: Initial code to verify the typeref table.
2394
2395 2009-04-13 Rodrigo Kumpera  <rkumpera@novell.com>
2396
2397         * verify.c (verify_delegate_compatibility): Fix error message.
2398
2399 2009-04-14  Sebastien Pouliot  <sebastien@ximian.com>
2400
2401         * security-core-clr.c: Fix typo
2402
2403 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2404
2405         * marshal.c (delegate_hash_table_add): Make delegate_target_locations 
2406         a MonoGHashTable to keep its values alive.
2407         (emit_marshal_boolean): Fix a warning.
2408
2409 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2410
2411         * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
2412         not have any interface configured for IPv4/IPv6.
2413
2414 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
2415
2416         * assembly.c: fix typo in error message.
2417
2418 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2419
2420         * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
2421         allocating the location holding the this argument to prevent
2422         'too many root sets' errors.
2423
2424         * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
2425         to mark fields as special static.
2426         (mono_field_static_get_value): Handle special static fields.
2427         (mono_field_static_set_value): Ditto.
2428
2429         * class-internals.h (struct _MonoClassField): Document this.
2430
2431 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
2432
2433         * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
2434           the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
2435           case.  This will handle when managed code returns null to native code.
2436
2437         Code is contributed under MIT/X11 license.
2438
2439 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
2440
2441         * object.c (build_imt_slots): Changing a free to a g_free to match
2442           the g_malloc0 in add_imt_builder_entry that allocated this memory.
2443
2444         Code is contributed under MIT/X11 license.
2445
2446 2009-04-13  Bill Holmes  <billholmes54@gmail.com>
2447
2448         * marshal.c (emit_marshal_boolean): Adding code to ensure that
2449           the correct TRUE value is passed through the marshaling layer.
2450
2451         Code is contributed under MIT/X11 license.
2452
2453 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
2454
2455         * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
2456         correctly. Fixes #492330.
2457         
2458         * marshal.c: Fix the embedding of object pointers into JITted code in
2459         the native-to-managed wrappers by allocating some GC tracked memory, and
2460         embedding the address of that.
2461
2462 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
2463
2464         * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
2465         pointers into the vtable.
2466
2467 2009-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
2468
2469         * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
2470
2471         * verify.c (verify_ldftn_delegate): Improve error message.
2472
2473 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
2474
2475         * reflection.c (my_mono_class_from_mono_type): Remove.
2476
2477 2009-04-09  Raja R Harinath  <harinath@hurrynot.org>
2478
2479         Prepare to reduce memory usage of owner-less generic parameters (1/n)
2480         * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
2481         and constraints fields into ...
2482         (MonoGenericParamInfo): ... this.
2483         (mono_generic_param_info, mono_generic_container_get_param_info):
2484         New accessors.
2485         * class.c, debug-helpers.c, icall.c: Update to changes.
2486         * metadata.c, reflection.c, verify.c: Likewise.
2487
2488 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
2489
2490         * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
2491
2492         * marshal.c (get_runtime_invoke_type): Share enums with their base types.
2493         
2494         * marshal.c (get_runtime_invoke_type): Share pointers with ints and
2495         booleans with sbytes.
2496
2497 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
2498
2499         * class.c (can_access_instantiation): Verify accesibility of element types
2500         for arrays and pointers.
2501
2502         * class.c (can_access_type): Return true if the target class is VAR or MVAR.
2503
2504         * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
2505
2506         Fixes #493068.
2507
2508 2009-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
2509
2510         * verify.c (do_invoke_method): Improve error messages.
2511
2512 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
2513
2514         * verify.c:  Fixing the MSVC build.
2515
2516         Code is contributed under MIT/X11 license.
2517
2518 2009-04-08  Sebastien Pouliot  <sebastien@ximian.com>
2519
2520         * security-core-clr.c: Simplify get_reflection_caller not to call
2521         mono_method_get_last_managed (another stack walk) and adjust the
2522         callers to handle a (should not happen) NULL return value.
2523
2524 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2525
2526         Add accessors to some MonoGenericParam fields
2527         * class-internals.h (mono_generic_param_owner): New accessor.
2528         (mono_generic_param_num): Likewise.
2529         (mono_type_get_generic_param_owner): New helper.
2530         (mono_type_get_generic_param_num): New helper.
2531         * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
2532
2533 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2534
2535         * class-internals.h (mono_generic_container_get_param): New wrapper.
2536         * class.c, icall.c, metadata.c, verify.c: Use it.
2537
2538 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2539
2540         Fix gtest-252.cs
2541         * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
2542         the standard case/loop.  In particular, don't complain about
2543         references to generic type definitions.
2544
2545 2009-04-07  Zoltan Varga  <vargaz@gmail.com>
2546
2547         * debug-helpers.c (dis_one): Decode string arguments.
2548
2549 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
2550
2551         * pedump.c (dump_verify_info): Dump type name correctly.
2552
2553 2009-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
2554
2555         * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
2556         are larger than code size.
2557
2558         This can happen in valid code if the try/catch block is not followed by any instruction
2559         and do a backward branch on the leave instruction.
2560
2561         Fixes #492494.
2562
2563 2009-04-06  Sebastien Pouliot  <sebastien@ximian.com>
2564
2565         * security-core-clr.c: Fix typo while comparing second method names
2566         in can_avoid_corlib_reflection_delegate_optimization
2567
2568 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
2569
2570         * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
2571
2572         Fixes #487738.
2573
2574 2009-04-06 Rodrigo Kumpera  <rkumpera@novell.com>
2575
2576         * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
2577         a MVAR using a class context.
2578
2579         Fixes #490335.
2580
2581 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
2582
2583         * object.c (mono_class_compute_gc_descriptor): Make this non-static.
2584
2585         * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
2586
2587         * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
2588         functions supplied by the JIT for the SGEN GC.
2589
2590         * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
2591         
2592 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
2593
2594         monitor.c (mono_monitor_try_enter_internal):
2595         Added calls to profile monitor contentions.
2596         Also duplicated a small piece of code (the "get the monitor" logic)
2597         from the fast path to the slow path, and changed the relevant goto
2598         statements, so that monitor acquisition events can be emitted from the
2599         slow path (this is by Paolo Molaro).
2600
2601 2009-04-06  Massimiliano Mantione  <massi@ximian.com>
2602
2603         * profiler.c, profiler.h, profiler-private.h:
2604         Added support for profiling monitor contentions.
2605
2606 2009-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
2607
2608         * metadata-verify.c: Verify the modules table.
2609
2610 2009-04-02 Rodrigo Kumpera  <rkumpera@novell.com>
2611
2612         * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
2613         using the context of the method been verifier and not of the method been called.
2614
2615         * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
2616         safely inflate generic types. 
2617
2618 2009-04-02  Sebastien Pouliot  <sebastien@ximian.com>
2619
2620         * security-core-clr.c: Change the strategy for checking the 
2621         "reflection using delegates optimization" to avoid unneeded 
2622         attributes in multiple class libraries.
2623
2624 2009-04-02  Mark Probst  <mark.probst@gmail.com>
2625
2626         * sgen-gc.c: Remove object element in the disappearing link struct
2627         by storing the object pointer in the link.
2628
2629 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
2630
2631         * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
2632
2633 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
2634
2635         * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
2636
2637         * verify.c (mono_method_verify): Do proper bounds checking of exception
2638         clause ranges.
2639
2640 2009-03-31 Rodrigo Kumpera  <rkumpera@novell.com>
2641
2642         * loader.c (mono_field_from_token): Don't crash if the field parent could
2643         not be decoded.
2644
2645 2009-03-31  Mark Probst  <mark.probst@gmail.com>
2646
2647         * sgen-gc.c: Execute critical finalizers after ordinary
2648         finalizers.
2649
2650         * class-internals.h, domain.c: Add CriticalFinalizerObject to
2651         mono_defaults.
2652
2653 2009-03-31 Jb Evain <jbevain@novell.com>
2654
2655         * verify.c (do_ldstr): don't check if a string is in the user strings
2656         heap if the current image is dynamic.
2657
2658 2009-03-31  Mark Probst  <mark.probst@gmail.com>
2659
2660         * sgen-gc.c: Wait until the last finalizer has executed when
2661         returning from WaitForPendingFinalizers.
2662
2663 2009-03-31  Martin Baulig  <martin@ximian.com>
2664
2665         * mono-debug-debugger.h (MonoDebuggerEvent): Add
2666         `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
2667         `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
2668         (mono_debugger_event_create_appdomain): New function.
2669         (mono_debugger_event_unload_appdomain): New function.
2670
2671         * appdomain.c (mono_domain_create_appdomain_internal): Call
2672         mono_debugger_event_create_appdomain().
2673
2674 2009-03-31  Martin Baulig  <martin@ximian.com>
2675
2676         * mono-debug-debugger.c
2677         (mono_debugger_register_class_init_callback): Also register the
2678         class init callback if the class is already initialized to make
2679         things work with shadow copied assemblies.
2680
2681 2009-03-31  Sebastien Pouliot  <sebastien@ximian.com>
2682
2683         * security-core-clr.c
2684         (mono_security_core_clr_ensure_reflection_access_field): Let 
2685         critical code access the field (just like we do for methods). Use
2686         check_field_access helper.
2687         (mono_security_core_clr_ensure_reflection_access_method): Use 
2688         check_field_access helper.
2689
2690 2009-03-31  Mark Probst  <mark.probst@gmail.com>
2691
2692         * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
2693         call the run-finalize function directly.
2694
2695         * gc.c, gc-internal.h: Make run_finalize() non-static.
2696
2697 2009-03-31  Mark Probst  <mark.probst@gmail.com>
2698
2699         * sgen-gc.c: Use a separate struct for disappearing links.
2700
2701 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2702
2703         * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
2704         * MaxIOVectorLength enabled, just ignore them.
2705         Fixes bug #349688.
2706
2707 2009-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
2708
2709         * metadata-verify.c: Fix eglib build.
2710
2711 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
2712
2713         * threads-types.h: Fix the win32 build.
2714
2715 2009-03-28  Sebastien Pouliot  <sebastien@ximian.com>
2716
2717         * class.c: move coreclr inheritance/override checks to 
2718         security-core.clr.c
2719         * security-core.clr.c|h: add code from class.c with additional
2720         documentation. Fix override check when the method is not critical.
2721
2722 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
2723
2724         * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
2725         (match_class): Ditto.
2726
2727 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
2728
2729         * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
2730
2731         * metadata-verify.c: Implement table layout row size calculation. Verify
2732         the total size of the tables.
2733
2734 2009-03-27 Rodrigo Kumpera  <rkumpera@novell.com>
2735
2736         * metadata-verify.c: Verify heap sizes and size to decode row counts. 
2737
2738 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2739
2740         * appdomain.c:
2741         * console-io.[ch]: added new mono_console_init() to make sure that
2742         file descriptors 0, 1 and 2 are opened.
2743         Bug #489019 fixed.
2744
2745 2009-03-27  Sebastien Pouliot  <sebastien@ximian.com> 
2746
2747         * appdomain.h: Export a new callback type and a new function to
2748         set this callback. This allow a mono host to provide it's own
2749         definition for "platform code".
2750         * metadata-internals.h: Add a core_clr_platform_code flag on 
2751         _MonoImage to (cache and) know if it is representing platform 
2752         code.
2753         * image.c (do_mono_image_open): Set core_clr_platform_code flag 
2754         on platform code images.
2755         * security-core-clr.c|h 
2756         (mono_security_set_core_clr_platform_callback): Allow the host
2757         to provide it's own platform check definition.
2758         (mono_security_core_clr_determine_platform_image): Detect if an 
2759         image is platform code (using the specified callback).
2760         (mono_security_core_clr_is_platform_image): Return cached value 
2761         for platform code.
2762
2763 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
2764
2765         * threads.c (mono_create_thread): New helper function to wrap CreateThread
2766         which has different parameter types for the 'tid' argument in windows and
2767         the io-layer.
2768
2769         * appdomain.c attach.c threads.c: Use the new helper.
2770
2771 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
2772
2773         * metadata-verify.c: Verify valid table bits.
2774
2775 2009-03-26 Rodrigo Kumpera  <rkumpera@novell.com>
2776
2777         * metadata-verify.c (verify_metadata_header): Store size in the size field.
2778
2779         * metadata-verify.c: Add initial table schema verification.
2780
2781 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
2782
2783         * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
2784         obtain the refclass argument needed by mono_param_get_objects (). Fixes
2785         #488383.
2786
2787         * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
2788
2789         * appdomain.c (MONO_CORLIB_VERSION): Bump this.
2790
2791 2009-03-26  Sebastien Pouliot  <sebastien@ximian.com>
2792
2793         * security-core-clr.c: Add/update documentation
2794
2795 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
2796
2797         * marshal.c (emit_marshal_object): Generate code to throw an exception
2798         instead of throwing it. Fixes #488670.
2799
2800 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com>
2801
2802         * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
2803         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
2804         an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
2805         and add a call to mono_security_core_clr_ensure_delegate_creation
2806         to do the extra checks required by CoreCLR.
2807         * security-core-clr.c|h: Add function to check delegate creation,
2808         both in the binding and accessibility, under CoreCLR.
2809
2810 2009-03-25  Sebastien Pouliot  <sebastien@ximian.com> 
2811
2812         * reflection.c (mono_reflection_create_dynamic_method): when 
2813         coreclr is enabled make sure that every resolved object are
2814         checked (e.g. field and method access).
2815         * security-core-clr.c|h: Add function to check objects resolved
2816         when a dynamic method is created.
2817
2818 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
2819
2820         * metadata-verify.c: Cache directory rva translations.
2821
2822         * metadata-verify.c: Add cli-header and streams verification.
2823
2824 2009-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
2825
2826         * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
2827         the wrong offset (8 instead of 6).
2828
2829 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
2830
2831         * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
2832         methods, return the native function address itself. Fixes
2833         #487758.
2834
2835 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2836
2837         * console-io.c: some of the values for control characters might not be
2838         present.
2839
2840 2009-03-21  Sebastien Pouliot  <sebastien@ximian.com>
2841
2842         * exception.c|h: Add helpers to create [Field|Method]AccessException
2843         * icall.c: Add required coreclr check calls for field reflection.
2844         Move the existing (method) check logic into security-core-clr.c
2845         * security-core-clr.c: Add functions to check if the access of a
2846         field or method is allowed when reflecting under coreclr. This is
2847         mostly done using a stack walk to find the "real" caller: i.e. the
2848         code that is calling the reflection
2849
2850 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
2851
2852         * gc-internal.h: Change location of gc_wrapper.h
2853
2854 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com> 
2855
2856         * class.c: Simplification to coreclr checks for overrides that
2857         makes it easier to set breakpoints.
2858
2859 2009-03-20  Sebastien Pouliot  <sebastien@ximian.com>
2860
2861         * security-core-clr.c|h: (mono_security_core_clr_class_level, 
2862         mono_security_core_clr_method_level): Avoid potential 
2863         MonoCustomAttrInfo allocation for transparent assemblies (e.g. 
2864         user/application code) and make it easier to set breakpoints
2865
2866 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
2867
2868         * metadata-verify.c: Reject cli header tables that mono don't handle.
2869
2870 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
2871
2872         * pedump.c: Fix CLI header dumping.
2873
2874 2009-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
2875
2876         * metadata-verify.c: More CLI header verification.
2877
2878 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2879
2880         * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
2881
2882 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
2883
2884         * metadata-verify.c: Initial verification of the CLI header.
2885
2886 2009-03-18 Rodrigo Kumpera  <rkumpera@novell.com>
2887
2888         * metadata-verify.c (verify_resources_table): Fix verification of zero
2889         sized resource section and id entries count.
2890
2891 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
2892
2893         * icall.c: Handle user types in many Type icalls. Fixes #486303.
2894
2895 2009-03-17  Jb Evain  <jbevain@novell.com>
2896
2897         * profiler.c: call mono_gc_base_init from mono_profiler_load.
2898
2899 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
2900
2901         * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
2902         (mono_gc_make_descr_for_array): Ditto.
2903
2904 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
2905
2906         * verify.c (mono_verifier_is_class_full_trust): Add support for
2907         CoreCLR security mode where trusted assemblies are defined as
2908         "platform code".
2909
2910 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
2911
2912         * metadata-verify.c: Add minimal PECOFF resource verification.
2913
2914 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
2915
2916         * metadata-verify.c: Be less restrictive with some coff fields.
2917
2918 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
2919
2920         * verify.c (init_stack_with_value_at_exception_boundary): Init generic
2921         params as boxed values on stack. Fixes #485706.
2922
2923 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
2924
2925         * console-io.c: the termios values may vary in different flavors of unix.
2926
2927 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
2928
2929         * console-io.[ch]: return the entire set of control characters when
2930         initializing the terminal.
2931         * appdomain.c: bump corlib version.
2932
2933 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
2934
2935         * mono-perfcounters.c: added support for in-process custom
2936         performance counters.
2937
2938 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
2939
2940         * metadata-verify.c: Small cleanup and add comment for IAT directory entry. 
2941
2942 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
2943
2944         * metadata-verify.c: Verify the data pointed by the import table. 
2945
2946 2009-03-13 Rodrigo Kumpera  <rkumpera@novell.com>
2947
2948         * metadata-verify.c (load_data_directories): Store data
2949         directory contents.
2950
2951         * metadata-verify.c: Verify the import table. 
2952
2953 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
2954
2955         * metadata-verify.c: Verify data directories.
2956
2957 2009-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
2958
2959         * metadata-verify.c: Check section header flags.
2960
2961 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
2962
2963         * appdomain.c: if the assembly name is a shadow-copied file, return
2964         TRUE from mono_is_shadow_copy_enabled but don't actually do anything
2965         in mono_make_shadow_copy.
2966         * icall.c: if the assembly name is a shadow-copied file, replace it
2967         with the original assembly path.
2968
2969         Bug #484244 fixed. NUnit tests for corlib can be run without
2970         --noshadow now.
2971
2972 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
2973
2974         * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
2975         entries when the table is reallocated.
2976
2977         * icall.c: Allocate the memory used by the mono_ptr_array macros using
2978         mono_gc_alloc_fixed () since it contains GC refs.
2979
2980 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
2981
2982         * reflection.c (ensure_complete_type): New helper function to call
2983         type resolve handlers for unfinished dynamic types.
2984         (resolve_object): Call it for MonoClassFields. Fixes #483852.
2985
2986 2009-03-09  Zoltan Varga  <vargaz@gmail.com>
2987
2988         * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
2989         #483247.
2990
2991 2009-03-08 Rodrigo Kumpera  <rkumpera@novell.com>
2992
2993         * appdomain.c (get_shadow_assembly_location): Fix memleak.
2994
2995 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
2996
2997         * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
2998         between GCHandles of type WeakTrackResurrection and the objects they
2999         point to.
3000
3001         * gc.c: Partly implement the sematics of GCHandles of type 
3002         WeakTrackResurrection: these handles should only be cleared after the
3003         finalizer of the object they are pointing to has ran.
3004
3005 2009-03-06  Mark Probst  <mark.probst@gmail.com>
3006
3007         * icall.c: Partially revert r126631 because using the jump
3008         trampolines for generic shared methods makes it superfluous.
3009
3010 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
3011
3012         * threads.c (handle_store): Create the 'threads' hash table with the proper
3013         MONO_HASH_VALUE_GC type.
3014
3015 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
3016
3017         * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
3018         FIRST_GC_TRACKED.
3019
3020         * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
3021         and LAST_GC_TRACKED as a GC root.
3022
3023         * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
3024
3025         * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
3026         the static data even if it consists of 1 reference.
3027
3028         * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
3029         if there is a GC descriptor.
3030
3031         * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
3032         instead of through the GC since they contain no object references.
3033
3034 2009-03-05  Mark Probst  <mark.probst@gmail.com>
3035
3036         * generic-sharing.c (instantiate_other_info): Always return a jump
3037         trampoline for method code.
3038
3039 2009-03-05  Marek Habersack  <mhabersack@novell.com>
3040
3041         * culture-info-tables.h: generated to include the en-tt culture.
3042
3043 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
3044
3045         * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
3046         capture the thread context.
3047
3048         * object.c (mono_async_result_new): Cache the invoke wrappers to
3049         ExecutionContext::Capture.
3050
3051 2009-03-04 Rodrigo Kumpera  <rkumpera@novell.com>
3052
3053         * marshal.h: Add a prototype for what mono_compile_method returns
3054         for invoke wrappers.
3055
3056         * gc.c: Use the new prototype declaration.
3057
3058 2009-03-04  Geoff Norton  <gnorton@novell.com>
3059
3060         * boehm-gc.c: Add some MONO_LOG tracing for the GC
3061         * gc-internal.h:
3062         * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
3063
3064 2009-03-04  Martin Baulig  <martin@ximian.com>
3065
3066         * mono-debug.h
3067         (mono_debugger_runtime_invoke): Removed.
3068
3069         * mono-debug-debugger.c
3070         (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
3071
3072 2009-03-02  Martin Baulig  <martin@ximian.com>
3073
3074         * mono-debug.h
3075         (mono_debugger_unhandled_exception): Removed.
3076         (mono_debugger_handle_exception): Removed.
3077         (mono_debugger_throw_exception): Removed.
3078
3079         * mono-debug.c
3080         (mono_debug_debugger_version): Bump to 5.
3081
3082         * mono-debug-debugger.c: Moved the exception handling code to
3083         ../mini/debug-mini.c
3084
3085 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
3086
3087         * domain-internals.h (struct _MonoDomain): Add a separate lock for the
3088         finalize_objects_hash.
3089
3090         * gc.c: Use the separate lock to access the finalize_objects_hash field.
3091         
3092         * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
3093         field.
3094
3095         * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
3096         cache.
3097
3098         * image.c (mono_image_close): Free it.
3099         
3100         * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
3101         allowing a creation of a wrapper which invokes its method using a CALLVIRT
3102         on the this argument.
3103
3104         * gc.c (run_finalize): Optimize the calling of the finalizers.
3105
3106 2009-03-03  Martin Baulig  <martin@ximian.com>
3107
3108         * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
3109         of the `MonoGenericInst' changes.
3110
3111 2009-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
3112
3113         * icall.c (ves_icall_MonoType_GetGenericArguments): Use
3114         mono_array_class_get_cached to reduce locking contention. Extract
3115         a domain var.
3116
3117         * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
3118         intermediary managed arrays. Use caching version of mono_array_new
3119         to allocate the result array.
3120
3121         * icall.c (ves_icall_Type_GetEvents_internal): Same.    
3122
3123         * icall.c (ves_icall_Type_GetNestedTypes): Same.        
3124
3125         * locales.c (create_names_array_idx):  Use mono_array_new_cached
3126         to reduce locking contention.
3127
3128 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
3129                 
3130         * object.c (mono_method_add_generic_virtual_invocation): Put back the
3131         thunk builder code for the non-interface case.
3132
3133 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
3134
3135         * object.c (get_generic_virtual_entries): New helper function to collect
3136         the virtual generic method instances which need to be added to an IMT
3137         thunk.
3138         (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
3139         Instead of creating a new IMT thunk, reset the vtable slot to the
3140         trampoline, the thunk will be created the next time the trampoline is called.
3141         (build_imt_slots): Add support for virtual generic methods in interfaces by
3142         adding to the IMT thunk all the methods registered using 
3143         mono_method_add_generic_virtual_invocation ().
3144
3145         * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
3146         (struct _MonoIMTCheckItem): Ditto.
3147
3148         * object.c (mono_method_add_generic_virtual_invocation): Take a
3149         MonoMethod argument instead of a MonoGenericInst. Fix the construction of
3150         the IMT thunk to include all items.
3151         
3152         * object.c (mono_class_create_runtime_vtable): Add a missing
3153         mono_loader_unlock ().
3154
3155 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
3156
3157         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3158
3159         * object-internals.h (MonoReflectionEvent): Add cached_add_event.
3160
3161 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
3162
3163         * object-internals.h: Rename _MonoReflectionEvent to
3164         MonoReflectionMonoEvent so it reflects the right managed type.
3165         Add a MonoReflectionEvent that correctly represents System.EventInfo.
3166
3167         * icall.c:
3168         * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
3169         type.
3170
3171 2009-03-02 Rodrigo Kumpera  <rkumpera@novell.com>
3172
3173         * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
3174         intermediary managed arrays. Use caching version of mono_array_new
3175         to allocate the result array.
3176
3177 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
3178
3179         * reflection.c: Use cached version of mono_array_new alongside
3180         the mono_reflection_get_custom_attrs_by_type call path.
3181
3182 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
3183
3184         * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
3185         intermediary managed arrays. Use caching version of mono_array_new
3186         to allocate the result array.
3187
3188         * icall.c (ves_icall_Type_GetConstructors_internal): Same.
3189
3190 2009-03-01 Rodrigo Kumpera  <rkumpera@novell.com>
3191
3192         * icall.c: Add small implementation of a growable stack bound array.
3193
3194         * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
3195
3196         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
3197         intermediary managed arrays. Use caching version of mono_array_new
3198         to allocate the result array.
3199
3200 2009-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
3201
3202         * icall.c: New icall ves_icall_System_Enum_compare_value_to that
3203         helps Enum::CompareTo to be implemented without reboxing all enums
3204         to their underlying type.
3205 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
3206
3207         * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
3208         since it acquires a global lock leading to scalability problems.
3209
3210         * profiler.c: Make the stat profiler work with multiple appdomains, this
3211         currently only works when no appdomains are unloaded.
3212
3213 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
3214
3215         * appdomain.c: make the check to avoid copying when the assembly is
3216         already shadow copied actually work.
3217
3218 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
3219
3220         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3221
3222         * object-internals.h (struct _MonoReflectionGenericClass): Sync with
3223         changes to the managed side.
3224
3225 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
3226
3227         * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
3228         classes + a separate lock for it, as it is used frequently at runtime, not
3229         just during metadata loading/JIT compilation.
3230
3231         * class.c (mono_bounded_array_class_get): Use the separate cache + lock
3232         for szarrays.
3233         
3234         * object-internals.h (mono_class_from_name_cached): New macro to cache
3235         the results of the lookup locally without having to declare a static
3236         variable to hold it.
3237         (mono_class_get_field_from_name_cached): Ditto.
3238         (mono_array_class_get_cached): Ditto.
3239
3240         * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
3241         the new macros.
3242         
3243         * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
3244         slower search in metadata.
3245
3246         * pedump.c: Fix a warning.
3247
3248 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
3249
3250         * reflection.c (encode_locals): Add checks for user types.
3251         (method_encode_clauses): Ditto.
3252         (method_encode_code): Ditto.
3253         (mono_image_create_token): Ditto.
3254
3255         * object-internals.h: Change the type of more fields from MonoReflectionType*
3256         to MonoObject*.
3257
3258 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
3259
3260         * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
3261         the a thread does not suspend within 100ms.
3262
3263         * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
3264         in addition to StopRequested as well.
3265
3266         * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
3267
3268         * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
3269         search the method_hash before inserting a new entry, to avoid crashes when
3270         the same method is inserted multiple times, causing the old 
3271         MonoDebugMethodInfo structure to be freed by the value dtor function.
3272
3273 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
3274
3275         * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
3276         SO_EXLUSIVEADDRUSE where available.
3277
3278 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
3279
3280         * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
3281         runtime invoke wrappers, this time it is string ctor wrappers, which
3282         pass a dummy string as 'this' instead of their obj argument. Fixes
3283         #478473.
3284
3285 2009-02-21  Jb Evain  <jbevain@novell.com>
3286
3287         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3288         only get create_culture once.
3289
3290 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
3291
3292         * reflection.c (mono_reflection_setup_internal_class): Move the user type
3293         check before the locking.
3294         
3295         * reflection.c (mono_reflection_setup_internal_class): Check for user types.
3296         (mono_reflection_create_runtime_class): Ditto.
3297         (mono_reflection_sighelper_get_signature_local): Ditto.
3298         (mono_reflection_sighelper_get_signature_field): Ditto.
3299
3300         * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
3301         is a System.MonoType object or similar.
3302         (monotype_cast): New helper function to cast a MonoObject to a 
3303         MonoReflectionType object.
3304
3305         * object-internals.h: Change MonoReflectionType* members in structures to
3306         MonoObject* members to force the usage of the monotype_cast () function.
3307
3308         * reflection.c icall.c: Use monotype_cast () for accessing Type members of
3309         structures/arrays. This causes us to assert instead of crashing when 
3310         instances of user defined subclasses of System.Type are encountered.
3311
3312 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3313
3314         * cil-coff.h:
3315         * icall-def.h:
3316         * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
3317         win32 resource loaded from a PE file.
3318
3319         * image.c: fix mono_image_lookup_resource.
3320
3321 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
3322
3323         * icall-def.h:
3324         * threads-types.h:
3325         * threads.c: added internal call for WaitHandle.SignalAndWait.
3326
3327 2009-02-19  Bill Holmes  <billholmes54@gmail.com>
3328
3329         * cominterop.c : Adding cominterop_type_from_handle and 
3330           registering it as an icall.  Replacing all references
3331           to type_from_handle.
3332
3333         Code is contributed under MIT/X11 license.
3334
3335 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3336
3337         * Makefile.am: Add lock-tracer.h and lock-trace.c.
3338
3339         * appdomain.c: Call the tracer init function.
3340
3341         * domain-internals.h: Enable the tracer for the domain locks.
3342
3343         * image.c: Enable the tracer for image locks.
3344
3345         * loader.c: Enable the trace for the loader lock.
3346
3347         * lock-tracer.h:
3348         * lock-tracer.c: Initial implementation of the lock trace utility.
3349         The tracer requires a compile time define to be enabled and a env var
3350         to be enabled at runtime.
3351
3352 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3353
3354         * domain.c (mono_domain_code_foreach): Improve documentation.
3355
3356 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3357
3358         * appdomain.c:
3359         * generic-sharing.c:
3360         * object.c:
3361         * reflection.c:  Adjust locking order to the new semantics where the loader lock
3362         comes first.
3363
3364 2009-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
3365
3366         * domain.c: Add mono_domain_code_* functions that perform locking
3367         around the domain codeman.
3368
3369         * domain-internals.h: Export those functions.
3370
3371         * object.c: Use new functions instead of acquiring the domain lock.
3372
3373 2009-02-19  Zoltan Varga  <vargaz@gmail.com>
3374
3375         * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
3376         delegate. Fixes #477396.
3377
3378 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
3379
3380         * reflection.c (create_custom_attr): Get rid of alloca.
3381
3382 2009-02-18  Bill Holmes  <billholmes54@gmail.com>
3383
3384         * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
3385           Adding exception handling for all CCW calls.
3386
3387         Code is contributed under MIT/X11 license.
3388
3389 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
3390
3391         * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
3392
3393         * marshal.c (emit_marshal_boolean): Add null checks to the new 
3394         native->managed marshalling code. Fixes #476247.
3395
3396 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3397
3398         * class.c (mono_class_get_vtable_entry): Move the addition of
3399         static rgctx invoke wrappers for vtable methods here, this simplifies
3400         a lot of code and causes fewer rgctx wrappers to be created.
3401
3402         * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
3403         name of the statistics to begin with an uppercase.
3404
3405 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
3406
3407         * reflection.c: Revert previous change as it breaks the build.
3408         
3409 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
3410
3411         * verify.c: Properly handle SZARRAY element type.
3412
3413         Fixes #474271.
3414
3415 2009-02-17 Rodrigo Kumpera  <rkumpera@novell.com>
3416
3417         * reflection.c (mono_image_create_method_token): Correctly encode
3418         MethodDef MemberRefParent token.
3419
3420         Fixes #472845.
3421
3422 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3423
3424         * image.c (mono_image_close): Delete the critical section before
3425         freeing the memory holding it.
3426
3427 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3428
3429         * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
3430         Fixes #476257.
3431
3432 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3433
3434         * pedump.c (main): Call mono_marshal_init so pedump
3435         doesn't crash.
3436
3437 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3438
3439         * loader.c (method_from_memberref): Properly fix #474271 and
3440         don't break the runtime bad.
3441
3442 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3443
3444         * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
3445         (mono_domain_alloc0): Ditto.
3446
3447 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3448
3449         * loader.c (method_from_memberref): Don't abort if the array
3450         method is not found. A regular loader failure is more informative
3451         and correct.
3452
3453         Fixes #474271.
3454
3455 2009-02-16 Rodrigo Kumpera  <rkumpera@novell.com>
3456
3457         *loader.c: Guard MonoImage::method_cache/methodref_cache
3458         using the image lock instead of the loader lock.
3459
3460         * metadata.h: Add comments about which fields are protected by
3461         the image lock.
3462
3463 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3464
3465         * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
3466
3467         * generic-sharing.c (mono_method_construct_object_context): Remove the
3468         wrapper_type == NONE assert, it is not needed.
3469
3470 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
3471
3472         * reflection.c (clear_cached_object): New helper function.
3473         (mono_method_clear_object): New function to clear the cached reflection
3474         objects for a dynamic method.
3475
3476         * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
3477         Partly fixes # 463323.
3478         
3479 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
3480
3481         * class.c:
3482         * loader.c:
3483         * reflection.c: Remove all explicit uses of MonoImage::property_hash.
3484
3485 2009-02-14 Rodrigo Kumpera  <rkumpera@novell.com>
3486
3487         * image.c: Add mono_image_property_(lookup,insert,remove) functions that
3488         take the image lock instead of the loader lock.
3489
3490         * metadata-internals.h: Export new functions.
3491
3492 2009-02-12  Miguel de Icaza  <miguel@novell.com>
3493
3494         * domain.c (app_config_parse): Remove another use of stat that is
3495         not necessary as g_file_get_contents already does the presence
3496         check. 
3497
3498 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
3499
3500         * cominterop.c icall-def.h: Fix the DISABLE_COM build.
3501
3502         * marshal.c: Move the bstr handling code to cominterop.c.
3503
3504         * marshal.c: Remove some COM interop code missed previously.
3505
3506 2009-02-12  Miguel de Icaza  <miguel@novell.com>
3507
3508         More Paolo patches from the Wii port:
3509         
3510         * security.c: Remove ves_icall_System_Environment_get_UserName
3511         from here.
3512
3513         * icall.c: And put ves_icall_System_Environment_get_UserName
3514         here. 
3515
3516         * appdomain.c (mono_set_private_bin_path_from_config): Remove
3517         redundant call to stat that was only used to test for the file
3518         existence.   Patch from Paolo.
3519
3520         * gc.c (run_finalize): If COM is disabled, do not link in
3521         mono_marshal_free_ccw.
3522
3523         * generic-sharing.c: Use alloca.h here as well.
3524
3525 2009-02-13 Rodrigo Kumpera  <rkumpera@novell.com>
3526
3527         * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
3528
3529 2009-02-13  Zoltan Varga  <vargaz@gmail.com>
3530
3531         * cominterop.c cominterop.h: New files.
3532
3533         * marshal.c: Move the COM interop related code to cominterop.c. Make a few
3534         function/typedefs which are needed by cominterop.c global.
3535
3536 2009-02-12  Mark Probst  <mark.probst@gmail.com>
3537
3538         * generic-sharing.c: Don't take the loader lock to guard image
3539         mempool allocs.
3540
3541 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3542
3543         * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
3544         called without the loader lock which is required to guard MonoImage:tokens.
3545
3546 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3547
3548         * class.c:
3549         * metadata.c:
3550         * method-builder.c:
3551         * marshal.c:
3552         * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
3553
3554 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3555
3556         * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3557         Rework the code to use regular mono_image_alloc/0.
3558
3559         * loader.c: Rework the code to use regular mono_image_alloc/0.
3560
3561         * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
3562
3563 2009-02-12  Bill Holmes  <billholmes54@gmail.com>
3564
3565         * object-internals.h : Fixing a typo in the 
3566           MonoReflectionComVisibleAttribute struct.
3567
3568         * marshal.c (cominterop_com_visible): Check the implemented 
3569           interfaces for ComImport.
3570
3571         * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls 
3572           assume that bools should be treated as VARIANTBOOLs.
3573
3574         * marshal.c (emit_marshal_boolean): Adding cases for 
3575           MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
3576
3577         * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to 
3578           emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
3579
3580         * marshal.c (cominterop_get_ccw): For COM calls assume that bools
3581           should be treated as VARIANTBOOLs.    
3582
3583         Code is contributed under MIT/X11 license.
3584
3585 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3586
3587         * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
3588         allocation with the image lock.
3589
3590 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3591
3592         This patch is the last of a series to remove explicit reference of MonoImage::mempool
3593         and use mono_image_alloc set of functions instead. This time we finish with reflection.c
3594
3595         * object.c: Add mono_string_to_utf8_image.
3596
3597         * object-internals.h: Export mono_string_to_utf8_image.
3598
3599         * reflection.c: Rework all explicit references to the the image mempool to go thought
3600         the mono_image_alloc set of functions.
3601
3602 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3603
3604         This patch is the third of a series to remove explicit reference of MonoImage::mempool
3605         and use mono_image_alloc set of functions instead. This time we finish with marshal.c
3606         and generics-sharing.c.
3607
3608         * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
3609         as first argument. Note that this function remains broken as it doesn't perform locking around the
3610         mempool allocation.
3611
3612         * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
3613
3614         * image.c: Add g_slist_append_image.
3615
3616         * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
3617         the supplied image for allocation. Move code into mono_metadata_field_info_full.
3618
3619         * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
3620         Fix all related code to do the same.
3621
3622         * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
3623
3624         * metadata-internals.h: Fix the signatures.
3625
3626 2009-02-12 Rodrigo Kumpera  <rkumpera@novell.com>
3627
3628         This patch is the second of a series to remove explicit reference of MonoImage::mempool
3629         and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
3630         and similar to work using MonoImage.
3631
3632         * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
3633         MonoMemPool.
3634
3635         * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
3636
3637         * class.c (mono_metadata_signature_deep_dup): Same.
3638
3639         * class.c (inflate_generic_type): Same.
3640
3641         * class.c (mono_class_inflate_generic_type_with_mempool): Same.
3642
3643         * metadata.c (mono_metadata_signature_dup_full): Same.
3644
3645         * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from 
3646         mono_metadata_signature_dup_full.
3647
3648         * metadata.c (mono_metadata_type_dup): Same.
3649
3650         * marshal.c: Pass the image to calls to mono_metadata_type_dup.
3651
3652         * reflection.c: Same.
3653
3654         * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
3655
3656         * metadata-internals.h: Fix the signatures.
3657
3658         * class-internals.h: Same.
3659
3660 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
3661
3662         This patch is the first of a series to remove explicit reference of MonoImage::mempool
3663         and use mono_image_alloc set of functions instead. 
3664
3665         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
3666         Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
3667         of a MonoMemPool.
3668
3669         * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
3670
3671         * class.c (g_list_prepend_mempool): Removed.
3672
3673         * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
3674
3675         * image.c: Add g_list_prepend_image.
3676
3677         * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
3678
3679         * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
3680
3681
3682 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
3683
3684         * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
3685         mono_image_unlock.
3686
3687         * image.c (mono_image_init): Init the lock field.
3688  
3689         * image.c (mono_image_init): Cleanup the lock field.
3690
3691         * image.c: Add mono_image_(un)lock functions.
3692
3693 2009-02-11  Mark Probst  <mark.probst@gmail.com>
3694
3695         * class.c, class-internals.h: mono_method_get_context_general()
3696         combines the functionality of mono_method_get_context() and
3697         mini_method_get_context().
3698
3699         * generic-sharing.c, domain-internals.h:
3700         mono_method_construct_object_context() and
3701         mono_domain_lookup_shared_generic() moved from mini.
3702
3703         * icall.c (ves_icall_InternalInvoke): Handle the case where the
3704         method doesn't have the correct instantiation because it's shared
3705         generic code.  Fixes #473999.
3706
3707 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
3708
3709         * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
3710
3711         * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
3712         
3713 2009-02-11 Rodrigo Kumpera  <rkumpera@novell.com>
3714
3715         * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
3716
3717         * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
3718
3719         * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
3720         and recheck the cache for dups after it.
3721
3722         * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
3723
3724         Fixes one of the deadlocks found in #473150.
3725
3726 2009-02-11  Bill Holmes  <billholmes54@gmail.com>
3727
3728         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
3729           For Win32, add additional break conditions for accept.
3730
3731         Code is contributed under MIT/X11 license.
3732
3733 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3734
3735         * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
3736         lazily initialize the native wrapper cache.
3737         (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
3738         cache, since they are different from the normal wrappers.
3739
3740         * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
3741
3742         * metadata-internals.h (struct _MonoImage): Add a new wrapper for
3743         AOT compiled native wrappers.
3744
3745 2009-02-09  Geoff Norton  <gnorton@novell.com>
3746
3747         * appdomain.h:
3748         * security-core-clr.c: Allow enabling core-clr from the embedding
3749         API.
3750
3751 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3752
3753         * socket-io.c: when requesting all the local ips, if there are no
3754         interfaces up and running, MS returns 127.0.0.1.
3755
3756 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3757
3758         * mono-perfcounters-def.h: processor time is an inverse time.
3759         Fixes bug #468625.
3760
3761 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
3762
3763         * socket-io.c: an empty host name returns the list of local IPs.
3764         Fixes bug #386637 part 1/2.
3765
3766 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3767
3768         * verify.c (mono_class_interface_implements_interface): Call
3769         mono_class_setup_interfaces ().
3770         (merge_stacks): Ditto.
3771
3772 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
3773
3774         * class.c (mono_class_setup_interfaces): New function to lazily initalize
3775         klass->interfaces.
3776         (mono_generic_class_get_class): Don't initalize klass->interfaces.
3777         (mono_generic_class_get_class): Ditto.
3778
3779 2009-02-06  U-QUACK\miguel  <miguel@quack>
3780
3781         * icall-defs.h: Include also the Encrypt/Decrypt string methods as
3782         they live in security.c
3783
3784         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
3785         another bit from Paolo's code.
3786
3787 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
3788
3789         * object.c (build_imt_slots): Add a small optimization to avoid inflating
3790         methods which will be discarded by add_imt_builder_entry ().
3791
3792         * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
3793         need to be boxed.
3794
3795         * loader.c: Add a statistics for the size of the memberref signature cache.
3796         
3797         * loader.c (find_cached_memberref_sig): New helper function.
3798         (cache_memberref_sig): Ditto.
3799
3800         * loader.c: Cache the result of parsing memberref signatures, since otherwise
3801         they will be parsed again for every generic instantiation, leading to unbounded
3802         memory growth.
3803
3804 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3805
3806         * loader.c (mono_get_method_from_token): Avoid creating class for the generic
3807         parameters of generic methods.
3808
3809         * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
3810         after the original method is copied to the inflated method.
3811         (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
3812
3813         * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
3814         field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
3815
3816         * class.c metadata.c: Update after the changes above.
3817
3818 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
3819
3820         * metadata-verify.c: Simplified error handling and added
3821         section table validation.
3822
3823 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3824
3825         * class-internals.h (MonoClassExt): New structure containing rarely used
3826         fields of MonoClass.
3827         (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
3828         through a new 'ext' field.
3829
3830         * class.c (mono_class_alloc_ext): New helper function to allocate 
3831         class->ext.
3832
3833         * class.c metadata.c reflection.c: Update after MonoClass structure changes.
3834
3835 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3836
3837         * object.c (mono_object_get_virtual_method): Properly inflate
3838         generic methods.  Fixes #472692.
3839
3840 2009-02-05 Rodrigo Kumpera  <rkumpera@novell.com>
3841
3842         * class.c (mono_class_create_from_typedef): The CLR supports SystemF
3843         recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
3844         for the parent type, the created type must be ready to be used on a generic
3845         instantiation.
3846         We fill this_arg/byval_arg if the parent is a generic instance to make sure
3847         we won't have duplicated entries in generic_inst_cache.
3848
3849         Fixes #469553.
3850
3851 2009-02-05  Miguel De Icaza  <miguel@novell.com>
3852
3853         * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
3854         replace with plain BSD per the comments on the bug MONO77637.
3855
3856 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3857
3858         * class.c (mono_class_get_generic_class): New accessor function.
3859         (mono_class_get_generic_container): Ditto.
3860
3861         * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
3862         fields, similar to the ones in MonoMethod.
3863
3864         * class.c (mono_generic_class_get_class): Set klass->is_inflated.
3865         (mono_class_create_from_typedef): Set klass->is_generic if needed.
3866
3867         * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
3868         
3869         * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
3870         the same information as element_class->byval_arg.
3871
3872         * class.c reflection.c: Remove references to class->byval_arg.
3873
3874         * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing 
3875         klass->enum_basetype directly.
3876
3877         * verify.c metadata.c object.c icall.c reflection.c: Use 
3878         mono_class_enum_basetype () instead of accessing klass->enum_basetype 
3879         directly.
3880
3881 2009-02-04  Miguel de Icaza  <miguel@novell.com>
3882
3883         * icall-def.h: Remove internal calls for sockets when
3884         DISABLE_SOCKET is defined, file system writing features when the
3885         OS only support reading and not writing data and Policy support if
3886         the Policy is disabled.
3887         
3888         * image.c (do_mono_image_open): Apply Paolo's patches for using
3889         mono_file_map_ APIs here.
3890
3891         * assembly.c: Add support for platforms to avoid prefix
3892         auto-detection. 
3893
3894 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3895
3896         * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
3897         warning.
3898
3899         * class.c (mono_class_inflate_generic_class): New helper function.
3900
3901         * class.c: Use mono_class_inflate_generic_class in a few places. Add
3902         statistics for inflated methods/classes.
3903
3904         * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
3905
3906         * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
3907         the call is made from Delegate.CreateDelegate () for the invoke method of
3908         a delegate.
3909
3910         * loader.c: Add a statistics for the memory occupied by inflated signatures.
3911
3912         * metadata.c (mono_metadata_signature_size): New helper function.
3913
3914         * class.c (mono_class_get_method_from_name_flags): Add an optimization for
3915         generic instances.
3916
3917         * metadata.c (inflated_method_in_image): Avoid calling 
3918         mono_method_signature () if the method does not already have a signature.
3919
3920 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
3921
3922         * verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
3923         valuetype is compatible with target type, check by inheritance as a
3924         VT is not really compatible with System.ValueType, for example.
3925
3926         * verify.c (do_invoke_method): Improve error message.
3927
3928         * verify.c (do_box_value): If boxing a nullable, use the type argument
3929         on stack instead.
3930
3931         * verify.c (do_newobj): Improve error message.  
3932
3933         Fixes #469549.
3934
3935 2009-02-03  Miguel de Icaza  <miguel@novell.com>
3936
3937         * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
3938
3939 2009-02-03  Mark Probst  <mark.probst@gmail.com>
3940
3941         * generic-sharing.c: Don't hold domain lock when calling
3942         instantiate_other_info().  Fixes #471958.
3943
3944         * domain-internals.h, loader.c: Describe locking policy of domain
3945         lock vs loader lock.
3946
3947 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
3948
3949         * verify.c (mono_delegate_signature_equal): Make it possible to check
3950         first-arg-bound delegates to static method.
3951
3952         * verify.c (verify_delegate_compatibility): Correctly verify delegates to
3953         static methods with the first arg bound.
3954
3955         Fixes #469529.
3956
3957 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
3958
3959         * verify.c: Added stack_slot_full_name to provide decent and more meanfull
3960         errors.
3961
3962         * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
3963         under strict mode. Any type, when boxed can be seen as a reference type.
3964
3965         Fixes #469528.
3966
3967 2009-02-03 Rodrigo Kumpera  <rkumpera@novell.com>
3968
3969         * object.h: The lower bound of an array is a signed integer value.
3970         Introduce mono_array_lower_bound_t typedef. It should be used instead of
3971         gint32 as under MONO_BIG_ARRAYS it will be a gint64.
3972
3973         * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
3974         calculate the upper bound.
3975         
3976         Fixes #471252.
3977
3978 2009-02-02  Miguel de Icaza  <miguel@novell.com>
3979
3980         From Paolo's work, refactored, cleared up:
3981         
3982         * threadpool.c, icall.c: ifdef code that requires a working socket
3983         stack.
3984
3985         * metadata.c (mono_metadata_field_info): Do not attempt to return
3986         a value from a function declared as void.
3987
3988         * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
3989         from the console stack.
3990
3991         * assembly.c: use strrchr instead of rindex.
3992
3993         * class.c, object.c, marshal.c, icall.c, reflection.c: include
3994         alloca.h on systems that have it.
3995
3996         * environment.c: Avoid code that uses stuff from
3997         HAVE_SYS_UTSNAME_H
3998         
3999         * appdomain.c: Include sys/time.h.
4000
4001         * console-io.c: include sys/ioctl.h if it is available.
4002
4003 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
4004
4005         * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
4006
4007         * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
4008         the method builder.
4009
4010         * marshal.c: Set mb->skip_visibility instead of setting it on the method
4011         after it was created and cached, as the later is not thread safe.
4012         
4013 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
4014
4015         * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
4016         called while the debugging module is not initialized. Fixes #471669.
4017
4018 2009-02-02 Rodrigo Kumpera  <rkumpera@novell.com>
4019
4020         * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
4021
4022         Fixes #471255.
4023
4024 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4025
4026         * generic-sharing.c (lookup_or_register_other_info): Make sure the
4027         loader lock is not taken while the templates lock is held.  Fixes
4028         #471089.
4029
4030 2009-02-02  Mark Probst  <mark.probst@gmail.com>
4031
4032         * metadata.c (type_in_image): Added a check to fix a monodis
4033         crash.
4034
4035 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
4036
4037         * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
4038         nullable arguments.
4039
4040         * object.c (mono_runtime_invoke_array): Ditto.
4041         
4042         * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
4043         freeing wrappers of dynamic methods.
4044
4045         * loader.c (mono_free_method): Call it. Fixes #463323.
4046         
4047         * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
4048         methods taking vtype/byref arguments, to fix yet another bug caused by
4049         the sharing of runtime invoke wrappers. Partly fixes #471259.
4050
4051 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
4052
4053         * debug-mono-symfile.c (check_line): Return NULL instead of returning
4054         <first file in file table>:1 when the IL offset does not have an associated
4055         line number.
4056
4057 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
4058
4059         * mono-debug.c (mono_debug_lookup_locals): New function to return local
4060         variable info for a method.
4061
4062         * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
4063         
4064 2009-01-30  Jb Evain  <jbevain@novell.com>
4065
4066         * pedump.c: reuse code from monodis to make sure pedump honors
4067         MONO_PATH, which is needed to verify net_2_1 assemblies.
4068
4069 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
4070
4071         * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
4072         there is no line number info.
4073
4074 2009-01-29  Raja R Harinath  <harinath@hurrynot.org>
4075
4076         Avoid some MonoType allocations
4077         * reflection.c (mono_reflection_initialize_generic_parameter):
4078         Reuse MonoType from param->pklass rather than allocating one.
4079         (mono_dynamic_image_free): Update to changes.
4080
4081 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
4082
4083         Rearrange some code to improve consistency
4084         * reflection.c (mono_reflection_setup_generic_class): Move body ...
4085         (mono_reflection_initialize_generic_parameter): ... here.
4086
4087 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
4088
4089         * generic-sharing.c (has_constraints): Enable gshared for methods/classes
4090         with type constraints as an experiment.
4091
4092         * boehm-gc.c (on_gc_notification): Update mono_stats.
4093
4094 2009-01-28  Raja R Harinath  <harinath@hurrynot.org>
4095
4096         Avoid some allocations
4097         * class-internals.h (_MonoGenericInst::type_argv): Convert from
4098         pointer to tail array to avoid extra allocation.
4099         * metadata.c (free_generic_inst): Update to changes.
4100         (mono_metadata_get_generic_inst): Likewise.  Use alloca instead of
4101         on-stack struct.
4102
4103 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
4104
4105         * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
4106         return TRUE if the two type objects are the same.
4107
4108 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
4109
4110         * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
4111         (mono_class_native_size): Use klass->marshal_info->min_align instead of
4112         klass->min_align, since klass->min_align contains the managed alignment,
4113         while the native alignment can be different, like for longs on x86.
4114         Fixes #469135.
4115
4116         * class-internals.h (MonoMarshalType): Add a min_align field.
4117
4118 2009-01-26 Rodrigo Kumpera  <rkumpera@novell.com>
4119
4120         * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
4121         the 1.0 format.
4122
4123 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
4124
4125         * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
4126         some comments about the usage of the used_regs field.
4127
4128         * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
4129         Fixes #469217.
4130
4131 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
4132
4133         * appdomain.c: return NULL instead of throwing FileNotFoundException
4134         when LoadAssembly() fails.
4135
4136 2009-01-23  Mark Probst  <mark.probst@gmail.com>
4137
4138         * metadata.c (mono_metadata_generic_param_equal): Only compare the
4139         image if the owner is NULL.  Fixes the AOT failures.
4140
4141 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
4142
4143         * metadata.c (mono_metadata_load_generic_params): Initialize the 
4144         MonoGenericParam structure using memset so the image field is initialized
4145         as well.
4146
4147 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
4148
4149         * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
4150         a plain store.
4151
4152 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
4153
4154         * class.c (mono_class_setup_vtable_general): In the generic instance
4155         optimization, set method->slot for abstract virtual methods. Fixes part of
4156         #467834.
4157
4158 2009-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
4159
4160         * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
4161         which signals that the unloading has started but all appdomain services must
4162         remain operational.
4163
4164         * appdomain.c (mono_domain_unload): The initial state for unloading now
4165         is unloading_start and we switch to unloading after the managed call to
4166         AppDomain::DomainUnload has finished.
4167
4168         The new unloading state has to be created because managed code in the
4169         DomainUnload event can depend on things like the threadpool still working.
4170         The domain must remain fully functional while the event executes.
4171
4172         This shown as an issue due to Process::WaitForExit, which waits for
4173         async reads of stdout and stderr to complete. Since those are processed
4174         in the threadpool the code deadlocks because the DomainUnload callback 
4175         waits for the async read finished event, which should have been set by a
4176         threadpool job but has been discarded due to the domain been in unload
4177         state.
4178
4179 2009-01-21  Mark Probst  <mark.probst@gmail.com>
4180
4181         * metadata.c (mono_metadata_generic_param_equal): Owner as well as
4182         image must match.
4183
4184 2009-01-21  Mark Probst  <mark.probst@gmail.com>
4185
4186         * reflection.c (resolve_object): For fields, inflate the class and
4187         then get the field in the inflated class.
4188
4189 2009-01-20  Mark Probst  <mark.probst@gmail.com>
4190
4191         * object-internals.h (struct _MonoException): Added a comment
4192         explaining the new use of trace_ips.
4193
4194 2009-01-20  Mark Probst  <mark.probst@gmail.com>
4195
4196         * generic-sharing.c (inflate_other_data): Inflate array methods
4197         correctly.
4198
4199         * loader.c, class-internals.h: Rename search_in_array_class() to
4200         mono_method_search_in_array_class() and make it non-static.
4201
4202 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
4203
4204         * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
4205         Hopefully fixes #458168.
4206
4207 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
4208
4209         * object.c (mono_raise_exception): Remove call to InterlockedIncrement
4210         as it is performed elsewhere.
4211
4212         Code is contributed under MIT/X11 license
4213
4214 2009-01-19  Christian Hergert  <christian.hergert@gmail.com>
4215
4216         * mono-perfcounters-def.h: Add counters for asp.net requests total and
4217         requests queued.
4218         * object.c (mono_raise_exception): Increment the exceptions total
4219         counter when an exception is thrown.
4220         * class-internals.h: Add a location for storing the total number of
4221         asp.net requests served.
4222         * mono-perfcounters.c: Implement update support for asp.net counters
4223         from the class libraries. Implement read support for asp.net counters
4224         and exceptions total counter.
4225
4226 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
4227
4228         * loader.c (search_in_array_class): Call mono_class_setup_methods () before
4229         accessing klass->methods. Fixes #467385.
4230
4231 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
4232
4233         * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
4234         for byval arguments without an [Out] attribute. Fixes #467212.
4235
4236         * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com). 
4237         Fix compilation under android.
4238         
4239         * sgen-gc.c: Instead of scanning gray objects after all roots have been 
4240         processed, scan them directly after they are copied, to achieve better locality
4241         and cache usage.
4242
4243         * socket-io.c: Applied patch from Koushik Dutta
4244         (koush@koushikdutta.com). Disable IPV6 when running under android.
4245
4246 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
4247
4248         * icall.c (ves_icall_InternalExecute): Add write barriers.
4249
4250         * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
4251         the GC code.
4252
4253         * sgen-gc.c: Implement write barriers in IL code.
4254
4255 2009-01-17  Geoff Norton  <gnorton@novell.com>
4256
4257         * image.c: Avoid trying to walk the reference table of dynamic assemblies.
4258
4259 2009-01-17  Geoff Norton  <gnorton@novell.com>
4260
4261         * image.c: When unloading the image->references table, there can be gaps
4262         in it.  Ensure that we iterate every entry to avoid leaking assembly references
4263         when unloading an appdomain.
4264
4265 2009-01-16  Zoltan Varga  <vargaz@gmail.com>
4266
4267         * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
4268         speed up ptr-in-nursery checks.
4269
4270         * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
4271         threads_lock () to prevent deadlocks.
4272
4273         * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
4274         does not need to be scanned during minor collections, since writes to it
4275         must use write barriers.
4276
4277 2009-01-15 Rodrigo Kumpera  <rkumpera@novell.com>
4278
4279         * metadata-verify.c: Add pe nt header verification.
4280         
4281 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
4282
4283         * gc.c: Fix a few warnings when using SGEN.
4284
4285 2009-01-14 Rodrigo Kumpera  <rkumpera@novell.com>
4286
4287         * metadata-verify.c: Add pe optional header verification.
4288
4289 2009-01-15  Zoltan Varga  <vargaz@gmail.com>
4290
4291         * sgen-gc.c: Add support for user defined marker functions, used by
4292         MonoGHashTable to avoid registering a GC root for every hash node.
4293
4294 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
4295
4296         * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
4297         non-pinned roots into separate hashes to avoid having to traverse them
4298         in functions which are only interested in one kind.
4299
4300 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
4301
4302         * metadata-verify.c: Add pe header machine field verification.
4303         
4304 2009-01-13 Rodrigo Kumpera  <rkumpera@novell.com>
4305
4306         * metadata-verify.c: Add pe header size verification.
4307
4308 2009-01-14  Zoltan Varga  <vargaz@gmail.com>
4309
4310         * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
4311         using the GC, they don't contain references.
4312
4313         * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
4314
4315 2009-01-13  Geoff Norton  <gnorton@novell.com>
4316
4317         * appdomain.c|h: Expose mono_domain_unload to the embedding api so that 
4318         AppDomains created on the native side can be cleaned up on the native side.
4319
4320 2009-01-13  Geoff Norton  <gnorton@novell.com>
4321
4322         * appdomain.c: Ensure that we call mono_context_init for the embedding api
4323         as well as the managed api.
4324
4325 2009-01-13  Geoff Norton  <gnorton@novell.com>
4326
4327         * appdomain.h|c: New API for creating a MonoDomain in the embedding api
4328         with a MonoAppDomain initialized against it.
4329
4330 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
4331
4332         * reflection.c (MOVING_GC_REGISTER): Fix a warning.
4333         
4334         * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
4335
4336         * marshal.c: Avoid setting the exception clauses after a method has been entered 
4337         into the wrapper caches. Fixes #465700.
4338
4339         * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
4340         method builder.
4341         (mono_mb_create_method): Set the clauses from the method builder.
4342
4343 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
4344
4345         * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
4346         Patch from Makoto Kishimoto.
4347
4348 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
4349
4350         * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by 
4351         encoding them as ROOT_DESC_COMPLEX.
4352         (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
4353
4354 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
4355
4356         * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
4357         no longer point to the nursery.
4358
4359         * sgen-gc.c: Add a few comments/FIXMEs.
4360         
4361         * sgen-gc.c: Implement scanning of the alloc_pinned objects.
4362
4363         * marshal.c (mono_marshal_get_synchronized_wrapper): Make the 
4364         initialization of the various _method variables thread safe. Fixes
4365         #465377.
4366
4367 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4368
4369         * domain.c, domain-internals.h: Remove the shared_generics_hash
4370         and its lookup functions.
4371
4372 2009-01-12  Bill Holmes  <billholmes54@gmail.com>
4373
4374         * socket-io.c:  Fixing the MSVC build. 
4375
4376         Code is contributed under MIT/X11 license.
4377
4378 2009-01-12 Rodrigo Kumpera  <rkumpera@novell.com>
4379
4380         * metadata-verify.c: Add pe header watermark verification.
4381
4382 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
4383
4384         * metadata-verify.c: Add lfanew verification.
4385
4386 2009-01-12  Jb Evain  <jbevain@novell.com>
4387
4388         * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
4389         METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
4390
4391 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
4392
4393         * socket-io.c: Fix the build.
4394
4395         * environment.c: Fix an #ifdef.
4396
4397 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4398
4399         * threadpool.c (async_invoke_thread): Handle the wait function returning
4400         WAIT_IO_COMPLETION as well.
4401         (async_invoke_io_thread): Ditto.
4402
4403 2009-01-09  Bill Holmes  <billholmes54@gmail.com>
4404
4405         * threads.c: Fixing the Windows build.
4406
4407         Code is contributed under MIT/X11 license.
4408
4409 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4410  
4411         * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
4412         interrupt a wait.
4413         (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
4414         the thread to wait again.
4415
4416 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
4417
4418         * metadata-verify.c: Initial skeleton of the metadata verifier.
4419
4420         * pedump.c: Add support for the metadata verifier.
4421
4422         * verify-internal.h: Export the whole assembly metadata verifier function.
4423
4424 2009-01-09 Rodrigo Kumpera  <rkumpera@novell.com>
4425
4426         * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
4427
4428 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4429
4430         * Makefile.am: Upgrade dtrace-prelink.sh location.
4431
4432 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
4433
4434         * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
4435         well. Otherwise the shutdown deadlock that happens on unix will can happen
4436         as well.
4437         If the main thread code finishes too fast it's possible that the finalizer
4438         thread won't have executed yet, won't record itself as the finalizer thread
4439         and the shutdown sequence will wait on it forever.
4440
4441 2009-01-08 Rodrigo Kumpera  <rkumpera@novell.com>
4442
4443         * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
4444         with MSVC.
4445
4446 2009-01-08  Miguel de Icaza  <miguel@novell.com>
4447
4448         * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
4449         Robert Jordan for pointing this out.
4450
4451 2009-01-08  Christian Prochnow  <cproch@seculogix.de>
4452
4453         * icall.c
4454         * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
4455         ves_icall_System_IO_DriveInfo_GetDriveType.
4456
4457 2009-01-07  Miguel de Icaza  <miguel@novell.com>
4458
4459         * icall.c: Wrap calls to mono_strtod in CriticalSection
4460         invocations when using eglib, to work around #464316.
4461
4462 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
4463
4464         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
4465         return value of GetCurrentDirectory to never access unitialized memory.
4466
4467 2009-01-07 Rodrigo Kumpera  <rkumpera@novell.com>
4468
4469         * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
4470         return value of GetCurrentDirectory and expand the buffer if needed.
4471
4472         Fixes #459094.
4473
4474 2009-10-07 Tom Hindle  <tom_hindle@sil.org>
4475
4476         * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) : 
4477           Adding a call to mono_init_com_types.
4478
4479         Code is contributed under MIT/X11 license.
4480
4481 2009-01-07  Geoff Norton  <gnorton@novell.com>
4482
4483         * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on 
4484         darwin.  Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
4485         ai_canonname can be null in some cases on darwin, where the runtime assumes it will 
4486         be the value of the ip buffer.
4487
4488 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4489
4490         * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
4491         interfaces_packed here.
4492
4493         Fixes part of #463294.
4494
4495 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4496
4497         * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
4498
4499         Fixes part of #463294.
4500
4501 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4502
4503         * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
4504         is a boxed complex as well.
4505
4506         Fixes part of #463294.
4507
4508 2009-01-06 Rodrigo Kumpera  <rkumpera@novell.com>
4509
4510         * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
4511         control if a methodspec should be created for the generic method definition from external assemblies.
4512         Caching of methodspec is done using the handleref hash table.
4513
4514         Fixes #462592.
4515
4516 2009-01-05 Rodrigo Kumpera  <rkumpera@novell.com>
4517
4518         * loader.c (find_method): When searching the interfaces of a class
4519         check the transitive closure of implemented interfaces.
4520
4521         Fixes #463303.
4522
4523 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
4524
4525         * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
4526         
4527 2009-01-03 Rodrigo Kumpera  <rkumpera@novell.com>
4528
4529         * class.c (get_implicit_generic_array_interfaces): Extract valuetype
4530         interfaces calculation to fill_valuetype_array_derived_types.
4531
4532         * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
4533         ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
4534         for example.
4535
4536         * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
4537         interfaces for valuetypes if needed.    
4538
4539         * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
4540         for their basetype as well. Types are array expanded if rank is > 0.
4541
4542         Fixes #400716.
4543
4544 2008-12-30  Bill Holmes  <billholmes54@gmail.com>
4545
4546         * socket-io.h : Changing the signature of
4547           ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
4548           the blocking state.
4549
4550         * icall-def.h :  Changing the signature of
4551           System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
4552
4553         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4554           For Windows only.  Avoid blocking when calling accept by
4555           querying for a connection via select.  The loop also queries
4556           the thread state every 1000 micro seconds for the thread
4557           stop state.  This will avoid the process hanging on shutdown
4558           when using a TcpChannel that is never connected to.
4559
4560         Code is contributed under MIT/X11 license.
4561
4562 2008-12-30  Marek Safar  <marek.safar@gmail.com>
4563
4564         * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
4565
4566 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
4567
4568         * class.c (get_implicit_generic_array_interfaces): Extract common
4569         code to a helper function making it a lot easier on the eyes.
4570
4571 2008-12-26 Rodrigo Kumpera  <rkumpera@novell.com>
4572
4573         * class.c (get_implicit_generic_array_interfaces): If the internal
4574         enumerator is an interface inflate System.Object instead of itself.
4575
4576         Fixes #461261.
4577
4578 2008-12-24 Rodrigo Kumpera  <rkumpera@novell.com>
4579
4580         * object.c (mono_runtime_invoke_array): Don't assert with
4581         byref nullable types.
4582
4583         * marshal.c (mono_marshal_get_runtime_invoke): To handle
4584         byref nullables we unbox the object and store it on the
4585         stack. 
4586         We can't use the boxed object since it is the T of Nullable<T>
4587         and the boxed representation of a nullable it's underlying type
4588         or null.
4589         We could cheat and create a boxed nullable and use the same
4590         machinery of other byref VTs but this feels like a hack and
4591         using the stack has the bonus of reducing heap pressure.
4592
4593         Fixes #461941.
4594
4595 2008-12-23 Rodrigo Kumpera  <rkumpera@novell.com>
4596
4597         * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
4598         return value.
4599
4600         Fixes #461867.
4601
4602 2008-12-19  Bill Holmes  <billholmes54@gmail.com>
4603
4604         * icall-def.h : Adding an internal call definition for 
4605           System.Environment.internalBroadcastSettingChange.
4606
4607         * icall.c : Adding a Windows only implementation to broadcast a 
4608           WM_SETTINGCHANGE when an environment variable has changed.
4609
4610         Code is contributed under MIT/X11 license.
4611
4612 2008-12-19  Mark Probst  <mark.probst@gmail.com>
4613
4614         * class.c, class-internals.h: Made
4615         mono_class_has_parent_and_ignore_generics() non-static.
4616
4617 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
4618
4619         * image.c: deal with the mmap failing when loading an image.
4620
4621 2008-12-17  Geoff Norton  <gnorton@novell.com>
4622
4623         * threadpool.c: Ensure that the io_queue_lock is initialized
4624         in all circumstances, as we always attempt to cleanup against it.
4625
4626 2008-12-17  Miguel de Icaza  <miguel@novell.com>
4627
4628         * icall.c (ves_icall_System_Environment_get_Platform): For
4629         compatibility reasons for existing client code we will keep
4630         returning 4 for a while.   
4631
4632         For how long will depend on the documentation being updated, and
4633         for us to give client code a chance to be updated.
4634
4635         This reverts the original decison on #433108 since we did not
4636         catch roughly 33 instances of the broken code in our own source
4637         code base, we did not catch failures on the buildbots, and QA did
4638         not bring this as a problem.
4639
4640         Only today I found some customer's code breaking due to our own
4641         class libraries not being fully updated and tracked it down to
4642         this change.  I am reverting it because if we could not even get
4643         our story straight in our own code base, how can we hope that our
4644         end user code be fixed?
4645
4646         As of this morning, our Wiki page that documents how to detect
4647         Unix had not been fixed.    
4648
4649 2008-12-16  Zoltan Varga  <vargaz@gmail.com>
4650
4651         * metadata.c (inflated_method_in_image): Add a workaround for #458168.
4652
4653         * class.c (mono_class_get_fields): Handle loading errors.
4654
4655 2008-12-12 Mark Mason <mmason@upwardaccess.com>
4656
4657         * metadata.c (mono_type_stack_size_internal): If SIZEOF_REGISTER > SIZEOF_VOID_P then use SIZEOF_REGISTER as the size and alignment of the stack slots.
4658         
4659 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
4660
4661         * mono-perfcounters.c: avoid warning.
4662
4663 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
4664
4665         * reflection.c (ensure_runtime_vtable): Work on generic instances and
4666         make sure all interfaces have MonoClass::interface_id set.
4667
4668         * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
4669         method table is property set.
4670
4671 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
4672
4673         * class.c: New function mono_class_setup_interface_id that setup
4674         MonoClass::interface_id if needed.
4675
4676         * class-internals.h: Export new function.
4677
4678 2008-12-12 Rodrigo Kumpera  <rkumpera@novell.com>
4679
4680         * class.c: Add code to sanity check the vtable after setup_vtable_general
4681         has done it's work.
4682
4683 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
4684
4685         * icall.c: make Assembly.GetExecutingAssembly work properly when
4686         reflection is used to invoke the method.
4687         Bug #321781 fixed.
4688
4689 2008-12-11  Mark Probst  <mark.probst@gmail.com>
4690
4691         * metadata/generic-sharing.c: Look for constraints in all type
4692         arguments, not just the first one.
4693
4694 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
4695
4696         * appdomain.c: return the correct CodeBase for an Assembly instance
4697         that was loaded from the shadow-copy directories.
4698         Bug #458190 fixed.
4699
4700 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
4701
4702         * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
4703
4704         * sgen-gc.c (check_object): New debugging helper function.
4705
4706         * object.c: Fix calls to mono_value_copy_array ().
4707
4708 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
4709
4710         * class.c (mono_class_setup_fields): If working on an inflated class
4711         first check if the generic definition did init with success.
4712
4713         Fixes #445361.
4714
4715 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
4716
4717         pedump.c (main): Fix a warning.
4718
4719 2008-12-10  Bill Holmes  <billholmes54@gmail.com>
4720
4721         * object-internals.h : Adding a definition for 
4722           MonoReflectionComVisibleAttribute.
4723
4724         * marshal.c (cominterop_com_visible) :  Method added to check the 
4725           ComVisible attribute of a class.
4726
4727         * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :  
4728           cominterop_raise_hr_exception added to consolidate common code 
4729           to raise hr exceptions.
4730
4731         * marshal.c (cominterop_can_support_dispatch) :  Method added to determine 
4732           if a managed class should support IDispatch.
4733
4734         * marshal.c 
4735           (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :  
4736           Added additional checks for managed object when getting 
4737           an IDispatch interface.
4738
4739         Code is contributed under MIT/X11 license.
4740
4741 2008-12-10 Rodrigo Kumpera  <rkumpera@novell.com>
4742
4743         pedump.c (main): Handle mono_get_method () returning NULL. 
4744
4745 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * marshal.h: Fix a warning.
4748
4749 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
4750
4751         * marshal.c : Adding cominterop_release_all_rcws to release all
4752           runtime callable wrappers held by the runtime.
4753
4754         * marshal.h : Adding declaration for cominterop_release_all_rcws.
4755           
4756         Code is contributed under MIT/X11 license.
4757
4758 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4759
4760         * metadata.c (mono_image_alloc_lock): New helper function.
4761         (mono_image_alloc0_lock): Ditto.
4762
4763         * metadata.c: Use the alloc_lock () helper functions for allocating
4764         memory from the image mempool.
4765
4766 2008-12-08 Rodrigo Kumpera  <rkumpera@novell.com>
4767
4768         * class.c (mono_class_from_generic_parameter): Document it's
4769         locking behavior. Fix double checked locking here, we stored in
4770         param->pklass a partially initialized MonoClass and no membar was used.
4771
4772 2008-12-05  Marek Habersack  <mhabersack@novell.com>
4773
4774         * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
4775         (3) functions are present in the C library use them to do the
4776         job. If they are absent, make sure that the sum of int_part and
4777         dec_part is rounded before returning. This is necessary due to the
4778         division of dec_part by the power of 10 before the final addition
4779         is performed - if the result is not rounded in some cases it will
4780         yield invalid results.
4781
4782 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
4783
4784         * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
4785         wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR 
4786         instruction instead of a pointer constant.
4787
4788 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
4789
4790         * loader.c (mono_method_get_header): Do most of the work outside the
4791         loader lock, to avoid assembly load hook deadlocks.
4792
4793         * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
4794         (mono_metadata_parse_type_full): Ditto.
4795
4796 2008-12-02 Rodrigo Kumpera  <rkumpera@novell.com>
4797
4798         * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
4799         Make the stack depth fixed. Ensure proper argument passing to the backtrace
4800         funtions. Finally, use a lock to produce well ordered output.
4801
4802         The lock looks silly, as all calls to the corlib mempool should be guarded
4803         with the loader lock, but for some reason this fact doesn't help. 
4804
4805         * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
4806
4807 2008-12-02  Mark Probst  <mark.probst@gmail.com>
4808
4809         * socket-io.c: 64 bit big-endian fixes.
4810
4811 2008-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
4812
4813         * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
4814         targets that require strict compatibility between the types.
4815
4816         * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
4817         to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
4818         Kill the strict argument and create a new one valuetype_must_be_boxed.
4819
4820         * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
4821         state that all valuetypes must be boxed.
4822
4823         Fixes #448560.
4824
4825 2008-11-29  Kornél Pál  <kornelpal@gmail.com>
4826
4827         * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
4828         IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
4829
4830         Contributed under MIT/X11 license.
4831
4832 2008-11-28 Rodrigo Kumpera  <rkumpera@novell.com>
4833
4834         * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
4835         the inflate_generic_type machinery should handle it.
4836
4837         This avoids a crash when the field's flags is zero and it's type is
4838         a primitive.
4839         What happens is that mono_metadata_parse_type_full will see that opt_attrs
4840         is zero and will return one of the cached built-in primitive types. Since
4841         those types live in read-only memory, the code that copies it crashes.  
4842
4843 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4844
4845         * object.c: Don't put function descriptors into generalized IMT
4846         thunks.
4847
4848 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4849
4850         * class.c: Enable generic code sharing on PPC64.
4851
4852 2008-11-27  Mark Probst  <mark.probst@gmail.com>
4853
4854         * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
4855         from mini/mini.c.
4856
4857         * generic-sharing.c: Allocate the method template slists from the
4858         image mempool so it doesn't leak.
4859
4860 2008-11-27 Rodrigo Kumpera  <rkumpera@novell.com>
4861
4862         * class.c (generic_array_methods): Release the linked list.
4863
4864 2008-11-27  Mark Probst  <mark.probst@gmail.com>
4865
4866         * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
4867         invocation to g_utf16_to_utf8().
4868
4869 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4870
4871         * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
4872         arguments on big endian archs.
4873
4874 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4875
4876         * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
4877         the type name (test added in corlib).
4878
4879 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4880
4881         * pedump.c: initialize perf. counters. Fixes a segv.
4882
4883 2008-11-25  Martin Baulig  <martin@ximian.com>
4884
4885         * mono-debug-debugger.c
4886         (mono_debugger_runtime_invoke): Return the exception object if an
4887         exception was thrown.  Visual Studio displays the exception object
4888         in the locals window.
4889
4890 2008-11-24  Mark Probst  <mark.probst@gmail.com>
4891
4892         * mini-trampolines.c (mono_delegate_trampoline): Don't return a
4893         ftnptr.
4894
4895 2008-11-24  Mark Probst  <mark.probst@gmail.com>
4896
4897         * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
4898         MONO_TYPE_U are sizeof (gpointer), too.
4899
4900 2008-11-24  Mark Probst  <mark.probst@gmail.com>
4901
4902         * marshal.c (mono_type_native_stack_size): Fixed size and
4903         alignment for reference types.
4904
4905 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4906
4907         * class.c (mono_class_generic_sharing_enabled): Disable generic
4908         code sharing for PPC64.
4909
4910 2008-11-21 Rodrigo Kumpera  <rkumpera@novell.com>
4911
4912         * icall.c (mono_method_get_equivalent_method): Make sure
4913         method->klass->methods is inited before looping over it.
4914
4915 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
4916
4917         * object.c: when calling ExecuteAssembly in a newly created domain,
4918         the configuration file and application base are already set up.
4919         Bug #446353 take 2 fixed.
4920
4921 2008-11-20  Zoltan Varga  <vargaz@gmail.com>
4922
4923         * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
4924         Fixes #444715. Fix a warning.
4925
4926 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
4927
4928         * appdomain.c: write the full path of the assembly to the .ini file
4929         created when "shadow-copying"
4930         Bug #446353 fixed.
4931
4932 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
4933
4934         * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
4935         if signature==FALSE.
4936
4937 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
4938
4939         * marshal.h : Fix the cygwin build.
4940            marshal.c:12442: undefined reference to `_IID_IMarshal'
4941           
4942         Code is contributed under MIT/X11 license.
4943
4944 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
4945
4946         * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
4947           free threaded marshaler when QueryInterface is called on a COM callable
4948           wrapper requesting the IMarshal interface.
4949           
4950         Code is contributed under MIT/X11 license.
4951
4952 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
4953
4954         * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
4955
4956         * reflection.c (mono_type_get_object): Special case the very common
4957         void type.
4958
4959         * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
4960         hold typeof(void).
4961
4962 2008-11-13  Bill Holmes  <billholmes54@gmail.com>
4963
4964         * process.h : Adding method declaration for
4965           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
4966           
4967         * process.c : Adding implementation for
4968           ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
4969           
4970         * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
4971           to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
4972
4973         Code is contributed under MIT/X11 license.
4974
4975 2008-11-10  Rodrigo Kumpera  <rkumpera@novell.com>
4976
4977         * appdomain.c (unload_thread_main): Clean up threadpool by
4978         calling mono_thread_pool_remove_domain_jobs.
4979
4980         * domain-internals.h (struct _MonoDomain): Add new fields to
4981         help coordinate the cleanup of the threadpool.
4982
4983         * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
4984         that cleans up the threadpool of all jobs associated with an appdomain.
4985         It does that by cleaning up the queues and making sure all active
4986         threads are accounted.
4987
4988         * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
4989         unloaded or in the process of. Take this is such way that there is
4990         no race condition between another thread starting the unload and the
4991         current thread acknowledging it.
4992
4993         * threadpool.c (async_invoke_thread): Same.
4994
4995         * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
4996         firing the new thread.
4997
4998         * threadpool.c (start_tpthread): Same.
4999
5000         * theadpool.c (append_job): Increment threadpool_jobs before queueing.
5001
5002         * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
5003
5004 2008-11-06  Jonathan Chambers  <joncham@gmail.com>
5005
5006         * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5007         Add support for DuplicateHandle.
5008         
5009         * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5010         Add support for DuplicateHandle.
5011         
5012         * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle): 
5013         Add support for DuplicateHandle.
5014
5015         Code is contributed under MIT/X11 license.
5016
5017 2008-11-06  Mark Probst  <mark.probst@gmail.com>
5018
5019         * class-internals.h: Make min_align into a whole byte.
5020
5021         * class.c: Set min_align for SIMD types to 16.
5022
5023 2008-11-05  Geoff Norton  <gnorton@novell.com>
5024
5025         * attach.c: Default the attacher to enabled for all cases including
5026         embedded.
5027
5028 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
5029
5030         * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
5031         change r117650.
5032
5033 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5034
5035         * monitor.c, monitor.h: New function for querying offsets of
5036         members of MonoThreadsSync.
5037
5038 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5039
5040         * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
5041         to speed up this function and to avoid the boundless memory growth caused by
5042         the signature_dup () calls.
5043
5044 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
5045
5046         * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
5047         wrapper.
5048
5049         * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
5050         by 1 bit.
5051
5052         * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
5053
5054 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5055
5056         * appdomain.c:
5057         * domain-internals.h: made mono_set_private_bin_path_from_config()
5058         "internal".
5059         * object.c: call the above function after setting the configuration
5060         file path for the root domain.
5061         Fixes bug #314478.
5062
5063 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5064
5065         * assembly.c: when the assembly is loaded from an absolute path, end
5066         basedir with a directory separator.
5067         Bug #440781 fixed.
5068
5069 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5070
5071         * monitor.c (mono_monitor_get_fast_enter_method): If
5072         CompareExchange is not available, don't create the fastpath
5073         instead of asserting.  (The method is missing in the 1.1 profile.)
5074
5075 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5076
5077         * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
5078
5079         * monitor.c, monitor.h: Code for generating Monitor.Enter and
5080         Monitor.Exit IL fastpaths.
5081
5082 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5083
5084         * class.c (mono_class_create_from_typedef): Added Vector2ul.
5085
5086 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5087
5088         * class.c (mono_class_create_from_typedef): Added Vector2l.
5089
5090 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5091
5092         * class.c (mono_class_create_from_typedef): Added Vector2d.
5093
5094 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5095
5096         * appdomain.c: translate \ into / for cache_path.
5097         * domain-internals.h: new mono_is_shadow_copy_enabled().
5098         * icall.c: (fill_reflection_assembly_name) do the same path
5099         manipulations that get_code_base does.
5100         (get_code_base) use mono_is_shadow_copy_enabled.
5101
5102 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
5103
5104         * appdomain.c: shadow-copied assemblies go to CachePath +
5105         ApplicationName when both are set. DynamicBase has nothing to do with
5106         shadow copies.
5107         Bug #406877 fixed.
5108
5109 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
5110
5111         * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
5112         STANDALONESIG table.
5113
5114         * metadata-internals.h (struct _MonoDynamicImage): Add cache for
5115         standalone signatures.
5116
5117         * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature 
5118         comparison code: instead of comparing the signatures using a custom
5119         equals function, transform them to a common signature and compare that. This
5120         works better with AOT.
5121
5122 2008-10-25  Zoltan Varga  <vargaz@gmail.com>
5123
5124         * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
5125
5126         * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
5127         call for generic instances.
5128         (mono_class_setup_properties): Call setup_properties () before accessing
5129         gklass->properties.
5130
5131         * class.c (mono_class_get_virtual_methods): New helper function to iterate
5132         over the virtual methods of a class using metadata if possible, avoiding the
5133         creation of MonoMethod's for non-virtual methods.
5134         
5135         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
5136         get_virtual_methods () to iterate over the virtual methods of classes.
5137
5138 2008-10-25  Martin Baulig  <martin@ximian.com>
5139
5140         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
5141
5142 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5143
5144         * class.c (mono_class_create_from_typedef): Added Vector4i.
5145
5146 2008-10-24  Mark Probst  <mark.probst@gmail.com>
5147
5148         * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
5149         ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
5150         special-casing applies to eliminate the call completely.
5151
5152 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5153
5154         * class.c (mono_class_create_from_typedef): Added Vector8s.
5155
5156 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5157
5158         * class.c (mono_class_create_from_typedef): Added Vector16sb.
5159
5160 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5161
5162         * icall.c: get rid of annoying warning.
5163
5164 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5165
5166         * threadpool.c: in 1.x, if you change the background status of the
5167         threadpool thread, it's not reset.
5168         Remove unnecessary calls to SetState.
5169
5170 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5171
5172         * threadpool.c: asynchronously create a set of idle threads upon first
5173         use of the threadpool. SetMinThreads will now start the appropriate
5174         number of idle threads if they are not already running. The default is
5175         1 threadpool thread per CPU. Increased the maximum number of threads
5176         per CPU to 10.
5177
5178 2008-10-22  Martin Baulig  <martin@ximian.com>
5179
5180         Revert r116521 from Zoltan, it breaks the debugger:
5181
5182         * class.c (mono_class_get_virtual_methods): New helper function to iterate
5183         over the virtual methods of a class using metadata if possible, avoiding the
5184         creation of MonoMethod's for non-virtual methods.
5185         
5186         * class.c (mono_class_setup_vtable_general): Rewrite this to use 
5187         get_virtual_methods () to iterate over the virtual methods of classes.
5188
5189 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5190
5191         * threads.c: when creating a threadpool thread, set its state to
5192         'background'.
5193         * threadpool.c: reset the background state of a threadpool thread
5194         after finishing each work item
5195         Bug #437888 fixed.
5196
5197 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
5198
5199         * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
5200         
5201         * class.c (mono_class_setup_vtable_general): Add an optimized version for
5202         generic instances which works by inflating the methods in the container
5203         class's vtable.
5204
5205         * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
5206         variant which doesn't make a copy if no inflation was done.
5207         (mono_class_setup_fields): Use it.
5208
5209         * metadata.c (mono_metadata_get_shared_type): New helper function to
5210         return a shared instance of a given MonoType.
5211
5212         * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
5213         a copy of most non-generic types.
5214
5215 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
5216
5217         * threadpool.c: remove one more GetSystemInfo () call.
5218
5219 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
5220
5221         * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
5222         use the code in mono-proclib.h to get processor information.
5223
5224 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
5225
5226         * appdomain.c: fixed the logic that determines whether assemblies in a
5227         directory are "shadow-copied" or not. Bug #433483 fixed.
5228
5229 2008-10-22  Zoltan Varga  <vargaz@gmail.com>
5230
5231         * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
5232         warning.
5233
5234 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5235
5236         * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
5237         returning a vtype.
5238
5239         * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
5240         reflection.c: Use mono_field_get_name () for accessing a field's name.
5241
5242         * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
5243         class.c
5244
5245         * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
5246         field.
5247
5248         * loader.c (find_method_in_class): Reenable the metadata optimization by
5249         not using it for generic instances.
5250
5251         * class-internals.h (MonoFieldDefaultValue): Extract the rarely used 
5252         data/def_type fields from MonoClassField into a separate structure.
5253         (struct MonoClassField): Remove data/def_type fields.
5254         (struct _MonoClass): Add a 'field_def_values' array to store the default
5255         values/RVA for fields.
5256
5257         * class.c reflection.c: Update after the changes.
5258         
5259         * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
5260         for accessing field->data.
5261
5262         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
5263
5264         * loader.c (find_method_in_class): Revert the last change for now as
5265         it breaks Mono.C5 unit tests.
5266
5267         * class-internals.h (struct _MonoDynamicGenericClass): Add fields
5268         'field_generic_types' and 'field_objects' which contain the information
5269         previously stored in MonoInflatedField.
5270         (MonoInflatedField): Delete.
5271         (struct _MonoClassField): Delete 'generic_info' field.
5272
5273         * reflection.c: Store the information which was previously in 
5274         field->generic_info in MonoDynamicGenericClass instead.
5275
5276         * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
5277         MonoClassField changes.
5278
5279 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
5280
5281         * marshal.c, method-builder.c: get rid of wrapper_hash and instead
5282         store the value inside the data array of the MonoMethodWrapper.
5283         This saves memory, is faster and fixes the lifetime issues (methods
5284         were never removed from the hash previously). May also fix bug#436996.
5285
5286 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5287
5288         * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic 
5289         generic instances, compute the type from the generic definition instead of
5290         looking in field->generic_info.
5291
5292         * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
5293         for inflated fields, the only user was get_fieldref_token () which no
5294         longer needs it.
5295
5296         * class.c (mono_class_init): Revert the last change as it seems to cause
5297         crashes.
5298
5299         * class-internals.h (struct _MonoClassField): Reorder fields to save 4
5300         bytes on 64 bit platforms.
5301
5302         * object.c (mono_class_create_runtime_vtable): Fix a warning.
5303         
5304         * object.c (mono_class_create_runtime_vtable): Don't initalize
5305         field->data/field->def_type here, it is done lazily by 
5306         mono_class_get_field_default_value ().
5307
5308         * icall.c (ves_icall_get_enum_info): Call 
5309         mono_class_get_field_default_value () instead of directly accessing
5310         field->data and field->def_type.
5311
5312         * object.c (get_default_field_value): Ditto.
5313
5314         * class.c (mono_field_get_data): Ditto.
5315         
5316         * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
5317         call for generic instances.
5318
5319         * loader.c (find_method_in_class): If klass != from_class, then inflate
5320         the method with the context of from_class, since the caller assumes this.
5321
5322 2008-10-20  Zoltan Varga  <vargaz@gmail.com>
5323
5324         * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
5325         for accessing method->slot.
5326
5327 2008-10-20  Cedric Vivier  <cedricv@neonux.com>
5328
5329         * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
5330
5331 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5332
5333         * class.c (mono_method_get_vtable_index): Use
5334         mono_method_get_vtable_slot () for accessing method->slot.
5335
5336         * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
5337         accessing klass->methods.
5338
5339         * class.c (mono_method_get_vtable_slot): New helper function.
5340         (mono_class_get_vtable_entry): Ditto.
5341         (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
5342         accessing method->slot.
5343
5344         * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
5345         method to get_inflated_method ().
5346
5347         * class.c (mono_class_get_inflated_method): New helper method to obtain
5348         a method of an inflated class without calling setup_methods ().
5349         (mono_class_get_cctor): Use get_inflated_method.
5350
5351         * generic-sharing.c (mono_class_get_method_generic): Ditto.
5352         
5353         * marshal.c image.c: Lazily create all the marshal caches.
5354
5355         * image.c (mono_image_init): Move initialization of runtime_invoke
5356         caches to marshal.c.
5357
5358         * marshal.c (get_cache): New helper function to lazily initialize a 
5359         wrapper cache.
5360         (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
5361
5362         * debug-helpers.c (mono_method_full_name): Include generic arguments.
5363
5364 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
5365
5366         * loader.c: fixed check for interface type.
5367
5368 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
5369
5370         * appdomain.c: check for NULL setup before it's referenced.
5371
5372 p
5373 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
5374
5375         * class.c: remove the unused old vtable setup code.
5376
5377 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
5378
5379         * class.c: don't depend on interface order in
5380         setup_interface_offsets (bug #435777).
5381         * reflection.c: sort the InterfaceImpl table (patch from
5382         Jb Evain  <jbevain@novell.com>).
5383
5384 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
5385
5386         * assembly.c (mono_assembly_open_full): Avoid loading images while holding
5387         the low level assemblies lock.
5388
5389 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
5390
5391         * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
5392         object.c, reflection.c, socket-io.c, threads.c: introduced
5393         mono_framework_version () to return the major framewrok version,
5394         changed the code that was using more complex patterns to use it.
5395         Return the correct value for PlatformID for OSX.
5396
5397 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
5398
5399         * icall-def.h, process.h, process.c: added an icall to get info about
5400         processes using mono-proclib.
5401
5402 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
5403
5404         * mono-perfcounters.c: use the mono-proclib functions to
5405         access process information.
5406
5407 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
5408
5409         * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
5410         monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
5411         reflection.c: remove rawbuffer usage: mmap support is more sanely
5412         provided by utils/mono-mmap.
5413
5414 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
5415
5416         * gc.c: use posix semaphores when possible so that
5417         mono_gc_finalize_notify() is signal safe.
5418
5419 2008-10-11  Zoltan Varga  <vargaz@gmail.com>
5420
5421         * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
5422         #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
5423         be #ifdef-ed out, the linker will remove the rest.
5424
5425         * marshal.c: Implement DISABLE_COM.
5426
5427         * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
5428
5429 2008-10-11  Miguel de Icaza  <miguel@novell.com>
5430
5431         * locales.c (string_invariant_compare_char): Optimization: do not
5432         call g_unichar_type unless we actually need the information.
5433
5434 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5435
5436         * object.c, class-internals.h: Also create remoting trampolines
5437         for generic methods.  Pass the domain to the remoting trampoline
5438         creation function, too.
5439
5440 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
5441
5442         * class.c (mono_class_init): Fix+re-enable the finalize optimization.
5443
5444 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5445
5446         * class.c (mono_class_create_from_typedef): Vector4u was renamed to
5447         Vector4ui.
5448
5449 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
5450
5451         * assembly.c:
5452         * locales.c: remove the use of g_strdown. Fixes bug #322313.
5453
5454 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
5455
5456         * assembly.c: in mono_assembly_load_friends() take the assemblies lock
5457         for the least possible amount of time (extending the fix in r113458).
5458
5459 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5460
5461         * class.c (mono_class_create_from_typedef): Retrofit to new type names.
5462
5463 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
5464
5465         * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
5466         as possible simd intrinsic types.
5467         Optimized the test to check for the common prefix first.
5468
5469 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
5470
5471         * class.c: back out part of a broken optimization committed on
5472         May 23th (bug #433908).
5473
5474 2008-10-09  Mark Probst  <mark.probst@gmail.com>
5475
5476         * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
5477         Win32.  Should fix #432388 for most cases until we have the new
5478         profiler on Win32.
5479
5480 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
5481
5482         * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
5483         instead of using inst->id so the hash is stable for AOT.
5484
5485 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
5486
5487         * appdomain.c:
5488         * icall.c: create a .ini file for shadow-copied assemblies that
5489         contains the location of the original assembly. Use this to return the
5490         proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
5491         Also fix the number of '/' for windows when returning the CodeBase.
5492         Fixes bug #430920.
5493
5494 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
5495
5496         * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
5497
5498         Code is contributed under MIT/X11 license.
5499
5500 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
5501
5502         * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
5503           if if the class vtable needs initialized.
5504
5505         Code is contributed under MIT/X11 license.
5506
5507 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
5508
5509         * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) : 
5510           Adding default MonoMarshalSpecs for COM methods.  OBJECT->STRUCT,
5511           STRING->BSTR, and CLASS->INTERFACE.
5512
5513         Code is contributed under MIT/X11 license.
5514
5515 2008-10-07  Marek Habersack  <mhabersack@novell.com>
5516
5517         * sysmath.h: changed the declaration of the
5518         ves_icall_System_Math_Round2 icall by adding an extra
5519         away_from_zero parameter.
5520
5521         * sysmath.c (ves_icall_System_Math_Round2): added support for
5522         away from zero rounding. The icall now takes an extra boolean
5523         parameter to signal that away from zero operation is requested.
5524
5525 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
5526
5527         * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
5528         the delegate klass so it can work with full-aot.
5529         (mono_marshal_get_delegate_end_invoke): Ditto.
5530         (mono_marshal_get_delegate_invoke): Ditto.
5531
5532 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
5533
5534         * gc.c, attach.h, attach.c: remove a bad pattern:
5535         add_finalizer_callback () is not implemented correctly, it can't
5536         without adding more overhead to the finalizer loop and it's not
5537         even needed, since we know exactly what we need to call, so there is
5538         no need to do so through an expensive function pointer.
5539
5540 2008-10-04  Zoltan Varga  <vargaz@gmail.com>
5541
5542         * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
5543         for the no-gc case.
5544         * attach.c (mono_attach_init): Remove the #ifdef.
5545
5546 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
5547
5548         * attach.c (mono_attach_init): Don't use
5549         mono_gc_add_finalizer_thread_callback when compiling without GC.
5550         Fixes #432306.
5551         
5552         Code is contributed under MIT/X11 license.
5553
5554 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
5555
5556         * class.c (mono_class_create_from_typedef): Remove the 
5557         #ifndef DISABLE_SIMD stuff.
5558
5559 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
5560
5561         * class-internals.h (MonoClass): Added simd_type bit field.
5562
5563         * class.c (mono_class_create_from_typedef): Check if type is a simd
5564         intrinsic.
5565
5566 2008-10-03  Mark Probst  <mark.probst@gmail.com>
5567
5568         * object.c (mono_method_add_generic_virtual_invocation): Only add
5569         instantiations to the thunk whose count is at least as large as
5570         the threshold.
5571
5572 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
5573
5574         * icall.c: changed the Type of the exception thrown when trying to
5575         invoke a constructor on an abstract class. Part of the fix for bug
5576         #324185.
5577
5578 2008-10-02  Mark Probst  <mark.probst@gmail.com>
5579
5580         * class.c, class-internals.h (mono_method_get_vtable_index): New
5581         function which returns the index into the vtable and properly
5582         handles inflated virtual generic methods.
5583
5584 2008-10-01  Mark Probst  <mark.probst@gmail.com>
5585
5586         * object.c, domain.c, object-internals.h, domain-internals.h:
5587         Generalize IMT thunk machinery to also handle thunks for virtual
5588         generic method invokes.  When a virtual generic method is invoked
5589         more than a number of times we insert it into the thunk so that it
5590         can be called without lookup in unmanaged code.
5591
5592         * generic-sharing.c, class-internals.h: Fetching a
5593         MonoGenericInst* for a method from an (M)RGCTX.
5594
5595 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
5596
5597         * marshal.c (emit_marshal_string): Applied a variant of a patch by
5598         tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
5599         marshalling. Fixes #431304.
5600
5601 2008-10-01  Bill Holmes  <billholmes54@gmail.com>
5602
5603         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
5604           handle when ref is specified without In or Out.
5605
5606         Code is contributed under MIT/X11 license.
5607
5608 2008-09-30  Mark Probst  <mark.probst@gmail.com>
5609
5610         * loader.c (mono_get_method_constrained): Don't expand method with
5611         the class's context, because it's already a method of that class.
5612
5613 2008-09-30  Atsushi Enomoto  <atsushi@ximian.com>
5614
5615         * attach.c : should be correct build fix.
5616
5617 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
5618
5619         * attach.c: Fix the previous change.
5620
5621 2008-09-29  Atsushi Enomoto  <atsushi@ximian.com>
5622
5623         * attach.c : quick w32 build fix.
5624
5625 2008-09-27  Miguel de Icaza  <miguel@novell.com>
5626
5627         * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
5628         crashes MonoDevelop: #430455.
5629
5630 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
5631
5632         * domain-internals.h (struct _MonoDomain): Move most fields used only by
5633         the JIT do MonoJitDomainInfo in ../mini/mini.h.
5634
5635         * domain.c: Remove initialization/cleanup of the removed fields.
5636
5637 2008-09-27  Mark Probst  <mark.probst@gmail.com>
5638
5639         * class.c (mono_class_generic_sharing_enabled): Enable generic
5640         code sharing for PPC.
5641
5642 2008-09-26  Bill Holmes  <billholmes54@gmail.com>
5643
5644         * attach.c : Fixing the Windows builds.
5645
5646         Code is contributed under MIT/X11 license.
5647
5648 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5649
5650         * class.c (mono_class_generic_sharing_enabled): Experimentally change 
5651         the default generic sharing mode to 'all'.
5652
5653 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5654
5655         * generic-sharing.c, class-internals.h: New function for checking
5656         whether a method needs a static RGCTX invoke wrapper.  A few
5657         funtions moved from mini/generic-sharing.c.
5658
5659         * icall.c: New function used.
5660
5661 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5662
5663         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
5664         Static RGCTX invoke wrapping applies to value type methods, too.
5665
5666         * class.c (mono_class_setup_vtable_general): In generic-shared
5667         value types, wrap methods with a static RGCTX invoke wrapper.
5668
5669 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5670
5671         * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
5672         osx build.
5673
5674 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
5675
5676         * gc.c (mono_gc_add_finalizer_thread_callback): New function to
5677         register a callback which is called when the finalizer thread is woken
5678         up.
5679         (finalizer_thread): Call the callback if it exists.
5680
5681         * attach.h attach.c: New files, implementing the attach mechanism.
5682
5683         * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
5684         
5685         * object.c (mono_object_get_virtual_method): Fix an assertion introduced
5686         by the previous change.
5687
5688 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5689
5690         * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
5691         loader.c, marshal.c, metadata-internals.h, metadata.c,
5692         method-builder.c, object.c, reflection.c: introduced specific functions
5693         to allocate from the domain and image mempools and cleaned up most of
5694         the code to use them (still missing a few in reflection.c).
5695         Keep the loader bytes counter updated.
5696
5697 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
5698
5699         * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
5700         loader-related counters.
5701
5702 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
5703
5704         * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
5705         added more MS-compatible counters.
5706
5707 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
5708
5709         * class.c (mono_class_setup_fields): Call setup_fields before accessing
5710         class->blittable. Fixes #428217.
5711
5712 2008-09-21  Zoltan Varga  <vargaz@gmail.com>
5713
5714         * reflection.c (mono_image_get_field_on_inst_token): Call 
5715         field_encode_signature () since that handles custom modifiers too.
5716         Fixes #424663.
5717
5718 2008-09-20  Zoltan Varga  <vargaz@gmail.com>
5719
5720         * reflection.c (add_custom_modifiers): New helper function to merge custom
5721         modifiers stored in objects to a MonoType.
5722         (fieldref_encode_signature): Encode custom modifiers.
5723         (mono_image_get_generic_field_token): Call add_custom_modifiers ().
5724         (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
5725
5726 2008-09-19  Kornél Pál  <kornelpal@gmail.com>
5727
5728         * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
5729         calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
5730         64-bit IL only images because imports are not resolved for IL only images.
5731         Special thanks to Bill Holmes for finding this bug and testing the patch.
5732         Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
5733
5734         Contributed under MIT/X11 license.
5735
5736 2008-09-19  Miguel de Icaza  <miguel@novell.com>
5737
5738         * mono-config.c (dllmap_start): Add support for the bits keyword
5739         on dllentry and dllmap to easily detect 32 vs 64 bit systems.
5740
5741 2008-09-19  Mark Probst  <mark.probst@gmail.com>
5742
5743         * reflection.c (inflate_mono_method): When the class the method is
5744         to be inflated for is itself not inflated, just return the method.
5745
5746 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
5747
5748         * mono-perfcounters.c: use more user friendly process instance names.
5749
5750 2008-09-18  Bill Holmes  <billholmes54@gmail.com>
5751
5752         * marshal.c (emit_marshal_variant) : Change the attribute checks to 
5753           handle "[in] ref" and "[in][out] ref" cases.
5754
5755         * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
5756           to mono_mb_create_method.  This was causing problems calling native to
5757           managed passing Variants by value.
5758
5759         Code is contributed under MIT/X11 license.
5760
5761 2008-09-18  Zoltan Varga  <vargaz@gmail.com>
5762
5763         * class.c (can_access_internals): Call mono_assembly_load_friends ()
5764         before accessing the friend_assembly_names field.
5765
5766         * assembly.c (mono_assembly_load_friends): Make this callable multiple
5767         times.
5768         (mono_assembly_load_from_full): Avoid calling load_friends (), it is
5769         called lazily when it is needed.
5770
5771         * metadata-internals.h (struct _MonoAssembly): Add 
5772         'friend_assembly_names_inited' flag.
5773
5774 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
5775
5776         * mono-perfcounters-def.h: fix the types of a few counters.
5777         * mono-perfcounters.c: implemented the instance names getter
5778         and a few bugfixes.
5779
5780 2008-09-18  Atsushi Enomoot  <atsushi@ximian.com>
5781
5782         * culture-info-table.h : regenerated.
5783
5784 2008-09-17  Robert Jordan  <robertj@gmx.net>
5785
5786         * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
5787         context bound objects. Fixes #415577.
5788
5789         Code is contributed under MIT/X11 license.
5790
5791 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
5792
5793         * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
5794         implementation (bug #423582).
5795
5796 2008-09-16  Zoltan Varga  <vargaz@gmail.com>
5797
5798         * object.c (mono_object_get_virtual_method): Handle the case method->slot
5799         is not set. Fixes #426309.
5800
5801 2008-09-16  Jb Evain  <jbevain@novell.com>
5802
5803         * class.c (mono_class_from_name): fix the exported type look up
5804         when the type is defined in a referenced assembly.
5805
5806 2008-09-16  Jb Evain  <jbevain@novell.com>
5807
5808         * reflection.c (mono_image_fill_export_table_from_type_forwarders):
5809         increment the next index counter on each iteration to make that work
5810         for more than one type forwarder. Unmanaged part to fix #422929.
5811
5812 2008-09-15  Mark Probst  <mark.probst@gmail.com>
5813
5814         * object-internals.h: enum ComInterfaceType in
5815         MonoInterfaceTypeAttribute is guint32, not guint16.
5816
5817 2008-09-12  Mark Probst  <mark.probst@gmail.com>
5818
5819         * cil-coff.h, image.c, reflection.c: Endianness fixes in image
5820         writing code.
5821
5822 2008-09-11  Mark Probst  <mark.probst@gmail.com>
5823
5824         * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
5825         not gboolean.
5826
5827 2008-09-11  Mark Probst  <mark.probst@gmail.com>
5828
5829         * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
5830         Endianness fixes for MonoSymbolFileOffsetTable.
5831
5832 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
5833
5834         * process.c (complete_path) : Removing quotes from the 
5835           input path.  The glib file routines do not handle file paths
5836           that have quotes around them.
5837
5838         Code is contributed under MIT/X11 license.
5839
5840 2008-09-10  Bill Holmes  <billholmes54@gmail.com>
5841
5842         * socket-io.h : Adding a comment to provide locations where 
5843           changes to MonoSocketAsyncResult need to be synced.
5844
5845         Code is contributed under MIT/X11 license.
5846
5847 2008-09-10  Zoltan Varga  <vargaz@gmail.com>
5848
5849         * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out 
5850         parameters as well. Fixes #425001.
5851
5852 2008-09-08  Miguel de Icaza  <miguel@novell.com>
5853
5854         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
5855         windows build.
5856
5857 2008-09-07  Miguel de Icaza  <miguel@novell.com>
5858
5859         * console-io.c: Add support for tracking the window size if it
5860         changes.
5861
5862         The setup is very simple: the TtySetup function will now return a
5863         pointer to a location in memory that tracks the current console
5864         size.  The managed code checks its current value every time its
5865         queried against the last value set, and updates accordingly.
5866
5867         With this setup we can work with multiple consoles, and we do not
5868         require to poke into managed code from a signal handler.
5869
5870         Additionally, the environment for COLUMNS and LINES is now handled
5871         in unmanaged code.
5872
5873         (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
5874
5875 2008-09-07  Mark Probst  <mark.probst@gmail.com>
5876
5877         * marshal.c (mono_type_native_stack_size): Treat
5878         MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
5879
5880 2008-09-04  Jb Evain  <jbevain@novell.com>
5881
5882         * class.c (mono_class_is_assignable_from): fix assignability of nullables
5883         to nullables.
5884
5885 2008-09-03 Rodrigo Kumpera  <rkumpera@novell.com>
5886
5887         * verify.c (verify_type_compatibility_full): Revert change
5888         to allow converting a native int to unmanaged pointer be verifiable
5889         under non-strict mode.
5890         It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
5891
5892         * verify.c: Added some TODOs.
5893
5894 2008-09-02  Bill Holmes  <billholmes54@gmail.com>
5895
5896         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
5897           ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
5898           Changed to use GlobalAlloc for the memory returned on Windows platforms.
5899
5900         Code is contributed under MIT/X11 license.
5901
5902 2008-09-02  Jb Evain  <jbevain@novell.com>
5903
5904         * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
5905
5906 2008-09-02 Rodrigo Kumpera  <rkumpera@novell.com>
5907
5908         reflection.c (typebuilder_setup_fields): Handle classes with
5909         explicit size.
5910
5911 2008-09-01 Rodrigo Kumpera  <rkumpera@novell.com>
5912
5913         class.c (mono_class_setup_events): Add memory barrier due to
5914         double checked locking.
5915         
5916         class.c (mono_class_setup_properties): Same.
5917
5918 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
5919
5920         * class.c (mono_class_is_assignable_from): Fix the build.
5921         
5922         * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
5923         before accessing klass->interface_bitmap. Fixes #421744.
5924
5925 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
5926
5927         * appdomain.c (mono_runtime_set_no_exec): New internal function setting
5928         the runtime into no-exec mode, useful when running the AOT compiler.
5929
5930         * appdomain.c gc.c object.c: Avoid executing managed code when running
5931         in no-exec mode.
5932         
5933         * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
5934
5935         * reflection.c (_mono_reflection_get_type_from_info): Handle the 
5936         special case when the mono_assembly_loaded () returns NULL because the 
5937         search hook is not installed.
5938
5939 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
5940
5941         * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
5942         crashes in bstr marshalling on linux.
5943
5944 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
5945
5946         * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
5947         with more than one parameter.
5948
5949 2008-08-24  Miguel de Icaza  <miguel@novell.com>
5950
5951         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
5952         start/stop flow control as well when turning off ICANON (allows
5953         C-s and C-q to be read by Console.ReadKey).
5954
5955 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
5956
5957         * class.c (mono_class_init): Move the initialization of nested classes
5958         into mono_class_get_nested_types (). Fixes #418433.
5959
5960         * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
5961         flag.
5962
5963         * class.c reflection.c icall.c: Use mono_class_get_nested_types () for 
5964         iterating tough the nested classes of a class.
5965
5966 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
5967
5968         * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
5969         on arm.
5970
5971 2008-08-22  Miguel de Icaza  <miguel@novell.com>
5972
5973         * console-io.c (sigcont_handler): Support signal chaining for
5974         SIGCONT.
5975
5976         (console_set_signal_handlers): Use best practices with sigaction,
5977         clear the structure before using it. 
5978
5979 2008-08-22  Robert Jordan  <robertj@gmx.net>
5980
5981         * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
5982         Fix the Windows build.
5983
5984 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
5985
5986         * class.c (mono_class_generic_sharing_enabled): Make the default
5987         sharing mode 'corlib'.
5988
5989 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
5990
5991         * console-io.c (console_set_signal_handlers): Fix a warning.
5992
5993         * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
5994         method normally, the JIT will take care of avoiding recursion.
5995
5996 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
5997
5998         * console-io.c : Fixing builds for platforms that do not have <termios.h>.
5999
6000         Code is contributed under MIT/X11 license.
6001
6002 2008-08-20  Miguel de Icaza  <miguel@novell.com>
6003
6004         * console-io.c (sigcont_handler): We need to restore the entire
6005         termios state, not only the original settings, as things like echo
6006         can be controlled after this (Booish exposes this issue with its
6007         own ReadLine implementation).
6008
6009         Additionally, we need to set the terminal back into keypad_xmit
6010         mode.
6011         
6012         (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
6013         string as a paramter as well.   Otherwise we get different
6014         keyboard sequences.
6015
6016 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
6017
6018         * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
6019         delegates with byref out parameter passing. Fixes #351520.
6020
6021         * debug-helpers.c (mono_context_get_desc): New helper function to stringify
6022         a generic context.
6023         (mono_type_get_desc): Add the type arguments for GENERICINST.
6024         (mono_method_full_name): Stringify the class name using mono_type_full_name
6025         so it picks up generic arguments.
6026
6027 2008-08-19  Gert Driesen  <drieseng@users.sourceforge.net>
6028
6029         * console-io.c: Removed debug output.
6030
6031 2008-08-19 Rodrigo Kumpera  <rkumpera@novell.com>
6032
6033         reflection.c (mono_reflection_create_runtime_class): Alloc
6034         the nested classes linked list using the dynamic image mempool.
6035         Fixes leak in corlib compilation.
6036
6037 2008-08-19  Miguel de Icaza  <miguel@novell.com>
6038
6039         * console-io.c: Fix incredibly annoying behavior on the console
6040         after resuming execution after control-z.   This affected every
6041         console application.
6042
6043 2008-08-18 Rodrigo Kumpera  <rkumpera@novell.com>
6044
6045         * mempool-internals.h: Header for mono private mempool functions. The first
6046         two function are for allocating glib linked lists using pools.
6047
6048         * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
6049
6050         * Makefile.am: Added mempool-internals.h.
6051
6052 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
6053
6054         * domain.c (mono_domain_create): Call the JIT domain hook if installed.
6055         (mono_domain_free): Ditto.
6056
6057         * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
6058         be used by the JIT to store its domain-specific information, instead of putting
6059         it directly into MonoDomain.
6060
6061         * domain.c (mono_install_create_domain_hook): New helper function to install
6062         a hook which initializes domain->runtime_info.
6063
6064         * domain.c (mono_install_free_domain_hook): Ditto.
6065         
6066 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
6067
6068         * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
6069         asserting if the ares parameter is null.
6070
6071         * mono-perfcounters.c: Fix warnings.
6072
6073         * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
6074         is not needed, don't check for interruptions either.
6075         (mono_marshal_get_delegate_end_invoke): Ditto.
6076
6077 2008-08-15  Marek Habersack  <mhabersack@novell.com>
6078
6079         * mono-perfcounters.c (predef_readonly_counter): added support for
6080         reading the ASP.NET Requests Queued counter from another process.
6081
6082 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
6083
6084         * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
6085         MonoImage to simplify the AOT code.
6086
6087 2008-08-10  Zoltan Varga  <vargaz@gmail.com>
6088
6089         * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
6090         marshalling. Fixes #416078.
6091
6092 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
6093         
6094         * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
6095         it is set, looking up the icall address is deferred to the JIT, since 
6096         in embedded scenarios, the icall might not be registered in the runtime
6097         doing the AOT compilation. Backported from the 2.0 branch.
6098
6099 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
6100
6101         * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
6102         Fixes #415621.
6103
6104 2008-08-05  Marek Habersack  <mhabersack@novell.com>
6105
6106         * Makefile.am: added support for cross-compilation.
6107
6108 2008-08-04  Zoltan Varga  <vargaz@gmail.com>
6109
6110         * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
6111
6112 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
6113
6114         * mono-perfcounters.c: jitted methods and jitted bytes counters.
6115
6116 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
6117
6118         * class-internals.h, icall-def.h, mono-perfcounters-def.h,
6119         mono-perfcounters.c: performance counters implementation.
6120
6121 2008-07-31  Zoltan Varga  <vargaz@gmail.com>
6122
6123         * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
6124         to gpointer, letting the AOT code decide what to store in it.
6125
6126 2008-07-31  Bill Holmes  <billholmes54@gmail.com>
6127
6128         * marshal.c (cominterop_get_native_wrapper) : Adding a call to 
6129           mono_class_setup_methods if the methods are not initialized.
6130
6131         Code is contributed under MIT/X11 license.
6132
6133 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
6134
6135         * verify.c: Remove some debug code I commited by accident.
6136
6137         * verify.c (mono_method_is_valid_in_context): Change the return value
6138         to make possible to distinguish between invalid and unverifiable.
6139
6140         * verify.c (verifier_load_method): Don't return NULL for unverifiable
6141         methods.
6142
6143 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
6144
6145         * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
6146         constraints. Fixes regression in gtest-253.
6147
6148 2008-07-30 Rodrigo Kumpera  <rkumpera@novell.com>
6149
6150         * verify.c (mono_verifier_verify_class): Don't allow generic types
6151         with explicit layout.
6152
6153         * verify.c (mono_method_verify): Check locals and argument types.
6154
6155 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
6156
6157         * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
6158         wait if the thread is in StopRequested state.
6159
6160         * class.c (mono_class_from_name): Refactor the module searching code into
6161         a separate function so it can be reused in the AOT case too.
6162
6163 2008-07-28 Rodrigo Kumpera  <rkumpera@novell.com>
6164
6165         * verify.c (mono_type_is_valid_in_context): Improve the error message.
6166         Check both the type and it's generic type definition for loader errors.
6167         
6168         * verify.c (mono_method_is_valid_in_context): Don't generate another
6169         error when a type errors occur, this leads to the wrong exception been
6170         thrown.
6171
6172 2008-07-28  Dick Porter  <dick@ximian.com>
6173
6174         * icall-def.h
6175         * process.c
6176         (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
6177         New internal calls to duplicate and close a process handle.
6178
6179 2008-07-27  Andreas Färber  <andreas.faerber@web.de>
6180
6181         * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
6182
6183 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
6184
6185         * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
6186
6187 2008-07-27  Robert Jordan  <robertj@gmx.net>
6188
6189         * class.c (mono_class_init): Don't compute class.has_finalize for
6190         valuetypes. Fixes #412477.
6191
6192 2008-07-25 Rodrigo Kumpera  <rkumpera@novell.com>
6193
6194         * verify.c: Implement constraint equivalence checking.
6195         This is required when a generic parameter is used as
6196         argument to a constrained one.
6197
6198         Fixes #410637.
6199
6200 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
6201
6202         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6203
6204         * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
6205
6206         * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
6207         synch with managed object layout.
6208
6209 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
6210
6211         * verify.c (do_branch_op): Handle valuetypes and generic
6212         arguments properly.
6213
6214         * verify.c (do_cmp_op): Same.
6215
6216         Fixes #410383.
6217
6218 2008-07-24  Mark Probst  <mark.probst@gmail.com>
6219
6220         * generic-sharing.c: Fix memory leaks.
6221
6222         * class.c, class-internals.h: Make
6223         mono_class_inflate_generic_type_with_mempool() non-static.
6224
6225 2008-07-24 Rodrigo Kumpera  <rkumpera@novell.com>
6226
6227         * pedump.c (dump_verify_info): Dump full class name.
6228
6229 2008-07-24  Mark Probst  <mark.probst@gmail.com>
6230
6231         * generic-sharing.c: Removed some old code that didn't do anything.
6232
6233 2008-07-24  Massimiliano Mantione  <massi@ximian.com>
6234         * profiler.c: Added runtime_initialized_event,
6235         mono_profiler_install_runtime_initialized and
6236         mono_profiler_runtime_initialized. This new hook tells the profiler
6237         when the runtime is sufficiently initialized to be able to call
6238         mono_thread_attach on the root appdomain.
6239         * profiler.h, profiler-private.h: Likewise.
6240
6241 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
6242
6243         * verify.c (do_cast): Do boxing for generic arguments as well.
6244
6245         * class.c (is_nesting_type): Drop generic instantiations before
6246         checking for nesting.
6247
6248         * class.c (can_access_instantiation): Allow access to generic
6249         arguments.
6250
6251 2008-07-23 Rodrigo Kumpera  <rkumpera@novell.com>
6252
6253         * verify.c (verify_class_for_overlapping_reference_fields):
6254         On some cases, the field size might be zero, guard against that.
6255         Fix the explicit layout check to work as expected.
6256
6257 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
6258
6259         * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling 
6260         mono_thread_resume () during shutdown, since the thread we want to abort
6261         might be suspended.
6262
6263 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
6264
6265         * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a 
6266         warning.
6267
6268         * debug-mono-symfile.c: Fix a warning.
6269
6270         * mono-perfcounters.c (get_cpu_times): Fix a warning.
6271
6272         * object.c (mono_class_vtable): Check if exception_type is set, and return
6273         NULL as defined by the function comments.
6274
6275 2008-07-22  Mark Probst  <mark.probst@gmail.com>
6276
6277         * mempool.c: Use malloc for every single mempool allocation if the
6278         configure option is set.  This makes it easier to track mempool
6279         allocations with tools like Valgrind.
6280
6281 2008-07-22  Jb Evain  <jbevain@novell.com>
6282
6283         * reflection.c (create_dynamic_mono_image): emit the same
6284         metadata version that SL2 does when creating a SL2 image.
6285
6286 2008-07-21 Rodrigo Kumpera  <rkumpera@novell.com>
6287
6288         * icall-def.h:
6289         * icall.c: New icall System.Enum:get_hashcode. This function
6290         avoids the overhead of boxing the enum to the underlying type.
6291
6292 2008-07-21  Mark Probst  <mark.probst@gmail.com>
6293
6294         * reflection.c (mono_method_get_object): Don't let static RGCTX
6295         invoke wrappers get into MonoReflectionMethods.
6296
6297 2008-07-17 Rodrigo Kumpera  <rkumpera@novell.com>
6298
6299         * object-internals.h:
6300         * object.c: New mono_runtime_class_init_full function
6301         that makes throwing the exception optinal.
6302
6303         * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
6304         for the case where the exception object is supplied.
6305
6306 2008-07-16  Kornél Pál  <kornelpal@gmail.com>
6307
6308         * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
6309         old ld versions.
6310
6311         Contributed under MIT/X11 license.
6312
6313 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
6314
6315         * string-icalls.c (ves_icall_System_String_InternalSplit):
6316         Optimize array allocation by caching the MonoClass of the
6317         array type.
6318
6319         * icall.c (ves_icall_Type_GetMethodsByName): Same.
6320
6321         * reflection.c (mono_param_get_objects): Same.
6322
6323 2008-07-16 Rodrigo Kumpera  <rkumpera@novell.com>
6324
6325         * icall-def.h:
6326         * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
6327         It inflates the given type using the class context.
6328
6329 2008-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
6330
6331         * object.c (mono_class_try_get_vtable): New function. Tries to fetch
6332         the vtable if it already exists.
6333
6334         * object-internals.h: Add mono_class_try_get_vtable as part of the
6335         internal API.
6336
6337         * reflection.c (mono_type_get_object): Use the MonoObject from the
6338         vtable when possible. Reduces locking contention on reflection heavy
6339         code.
6340
6341 2008-07-15  Zoltan Varga  <vargaz@gmail.com>
6342
6343         * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
6344         g_bit_nth_msf () since that macro is not implemented in eglib.
6345
6346 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
6347
6348         * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
6349         on platforms which do not support it.
6350
6351 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
6352
6353         * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
6354
6355 2008-07-11  Martin Baulig  <martin@ximian.com>
6356
6357         * mono-debug-debugger.h
6358         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
6359
6360         * mono-debug-debugger.c
6361         (_mono_debugger_interruption_request): New global volatile variable.
6362         (mono_debugger_check_interruption): New public function.
6363
6364         * threads.c
6365         (mono_thread_current_check_pending_interrupt): Call
6366         mono_debugger_check_interruption().
6367         (mono_thread_interruption_checkpoint_request): Likewise.
6368
6369 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6370
6371         * verify.c: Add more type checks for loaded types. Verify the result
6372         handle from ldtoken.
6373
6374 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6375
6376         * loader.c (field_from_memberref): Don't crash if the field
6377         wasn't found.
6378
6379 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6380
6381         * verify.c: Verify if type and method instantiations
6382         don't have invalid VAR or MVAR arguments.
6383
6384 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6385
6386         * verify.c: Fix double free of function pointer list.
6387
6388 2008-07-11 Rodrigo Kumpera  <rkumpera@novell.com>
6389
6390         * object.c (mono_string_to_utf8): Comment the new code as it
6391         breaks under eglib.
6392
6393 2008-07-08 Rodrigo Kumpera  <rkumpera@novell.com>
6394
6395         * object.c (mono_string_to_utf8): Avoid allocating a temp array.
6396
6397 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
6398
6399         * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
6400           is not throw too many times.
6401
6402         Code is contributed under MIT/X11 license.
6403
6404 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
6405
6406         * mono-debug.c (mono_debug_find_method): Allow this to be called even when
6407         debugging is turned off.
6408
6409 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
6410
6411         * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
6412
6413 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6414
6415         * class-internals.h, class.c: Added new generic sharing option:
6416         Share only stuff in System.Collections.Generic, which is now the
6417         default.
6418
6419 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6420
6421         * generic-sharing.c, class-internals.h: New function for getting a
6422         generic method in a generic class given the corresponding method
6423         for a different instantiation of the class.  Partly refactored
6424         from mini-trampolines.c.
6425
6426         * class.c: Make sure generic methods have a class_inst if they are
6427         part of a generic class.
6428
6429         * metadata.c (mono_type_stack_size_internal): Handle type
6430         variables.
6431
6432 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6433
6434         * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
6435         Signifies whether information on the this/vtable/mrgctx variable
6436         is available.
6437
6438 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6439
6440         * object.c, object-internals.h, icall.c: New function
6441         mono_delegate_ctor_with_method(), which does the same as
6442         mono_delegate_ctor(), but takes an explicit method argument
6443         instead of taking the method from the jit info.
6444
6445         * marshal.c: When creating a delegate with an inflated method take
6446         the "this" argument as the target class for the castclass.
6447
6448 2008-07-03  Mark Probst  <mark.probst@gmail.com>
6449
6450         * domain.c (mono_jit_info_table_find): Fixed a bug that caused
6451         mono_jit_info_table_find() to perform very badly in some cases.
6452
6453 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
6454
6455         * icall.c (type_from_typename): Handle 'string'.
6456
6457         * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
6458         wrappers into the wrapper_hash, since the key is not a MonoMethod.
6459
6460 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
6461
6462         * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
6463
6464         * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
6465         number of available managed allocator types.
6466
6467         * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
6468         (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
6469
6470 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
6471
6472         * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
6473         which is a low level lock protecting just the 'jit_code_hash' hash table.
6474
6475         * domain.c: Initialize+cleanup jit_code_hash_lock.
6476         
6477 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
6478
6479         * coree.c (mono_load_coree): Set coree_module_handle global variable only
6480         after initialization.
6481
6482         * coree.h: Make MonoFixupExe internal.
6483
6484         Contributed under MIT/X11 license.
6485
6486 2008-06-30  Kornél Pál  <kornelpal@gmail.com>
6487
6488         * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
6489         because that is platform independent. Check NumberOfRvaAndSizes in PE32
6490         as well.
6491         (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
6492         image being loaded is a CLI image and _CorValidateImage gets called.
6493
6494         * coree.h: Add MonoLoadImage.
6495
6496         * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
6497         instead of LoadLibrary.
6498
6499         Contributed under MIT/X11 license.
6500
6501 2008-06-29 Rodrigo Kumpera  <rkumpera@novell.com>
6502
6503         * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
6504         for any primitive type.
6505
6506 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
6507
6508         * object.c (mono_array_new_specific): Optimize this and the other allocation
6509         functions a bit.
6510         
6511         * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
6512         domains too if mono_dont_free_domains is set.
6513
6514         * domain-internals.h (mono_dont_free_domains): New internal option controlling
6515         whenever to free appdomain data after it has been unloaded.
6516
6517         * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
6518         
6519 2008-06-28  Zoltan Varga  <vargaz@gmail.com>
6520
6521         * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
6522         (mono_method_get_equivalent_method): Fix a warning.
6523
6524         * object.c (mono_message_init): Avoid looking up array types for each call.
6525
6526 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
6527
6528         * object.c (mono_message_invoke): Avoid looking up the object[] type for each
6529         call.
6530
6531         * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
6532         even more.
6533
6534         * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
6535         each iteration.
6536
6537         * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
6538         fields of an enum.
6539
6540 2008-06-26 Rodrigo Kumpera  <rkumpera@novell.com>
6541
6542         * object.c (mono_value_box): Fix boxing of nullables.
6543
6544 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
6545
6546         * assembly.c (mono_set_rootdir): Use __ImageBase instead of
6547         mono_module_handle that is defined by the linker; no initialization required.
6548         * coree.h: Remove mono_module_handle, add __ImageBase, update
6549         mono_image_open_from_module_handle.
6550         * coree.c (_CorValidateImage): Convert platform independent PE32 images to
6551         PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
6552         (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
6553         memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
6554         to 4 GB away from image base address. IA64 version is not tested but was very
6555         easy to implement and should work if we ever need it.
6556         * domain.c (mono_init_internal): Avoid system error message boxes.
6557         * image.c (mono_image_open_from_module_handle): Replace ref_count argument
6558         with has_entry_point. Handle do_mono_image_load fauilre correctly.
6559         (mono_image_open_full, mono_image_close): Use has_entry_point instead of
6560         coff_attributes that is a more reliable way to detect if _CorDllMain was called.
6561         * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
6562
6563         Contributed under MIT/X11 license.
6564
6565 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6566
6567         * class.c, class-internals.h: Export mono_class_get_generic_type_definition
6568         as part of the private mono API.
6569         
6570         * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
6571         Do proper argument checking for methods that belong to generic classes.
6572         Do proper type resolution for GMFH/2.
6573         Fixes #377324.
6574         
6575 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6576
6577         * verify.c (do_switch): Fix a memory corruption bug with
6578         the jump index is out of bound.
6579
6580 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6581
6582         * verify.c: Disable debug code.
6583
6584 2008-06-25 Rodrigo Kumpera  <rkumpera@novell.com>
6585
6586         * reflection.c (mono_image_get_methodbuilder_token): Use
6587         mono_image_get_methodspec_token_for_generic_method_definition
6588         instead of mono_image_get_memberref_token. We cache more memberef
6589         entries now.
6590
6591 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
6592
6593         * verify.c: Inflate exception clause types.
6594         Fixes #402606.
6595         
6596 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
6597
6598         * reflection.c (mono_image_get_methodbuilder_token): Don't leak
6599         name.
6600
6601         * reflection.c (mono_image_get_ctorbuilder_token): Same.
6602
6603         * reflection.c (mono_image_create_method_token): Same.
6604
6605 2008-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
6606
6607         * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
6608         It does the same as mono_image_get_methodref_token but works on
6609         MethodBuilder.
6610
6611         * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
6612         and always generate a methodspec. This follows the old behavior and fixes
6613         the regressions in System.Core. 
6614
6615 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
6616
6617         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where 
6618         don't event mono_class_get () succeeds. Fixes #402182.
6619
6620 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
6621
6622         * metadata-internals.h: Added MonoDynamicImage::methodspec
6623         hashtable to store methodspec tokens created for MethodBuilders.
6624
6625         * reflection.c (mono_image_get_methodbuilder_token): Encode generic
6626         MethodBuilders as open instantiations if a methodspec was requested.
6627
6628         * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
6629
6630         * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
6631
6632         * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
6633
6634         Fixes bug #349190.
6635
6636 2008-06-20 Rodrigo Kumpera  <rkumpera@novell.com>
6637
6638         * loader.c (method_from_methodspec): Avoid crashing if the
6639         method lookup fails.
6640
6641 2008-06-20  Dick Porter  <dick@ximian.com>
6642
6643         * socket-io.c (get_socket_assembly): Cope with Moonlight network
6644         classes being in a different assembly.  Fixes bug 399184.
6645
6646 2008-06-20  Zoltan Varga  <vargaz@gmail.com>
6647
6648         * loader.c (mono_loader_init): Make this callable multiple times.
6649         (mono_dllmap_insert): Call mono_loader_init () so this works even before
6650         the runtime is initialized. Fixes #401755.
6651
6652 2008-06-19  Dick Porter  <dick@ximian.com>
6653
6654         * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
6655         Fixes bug 349688.
6656
6657 2008-06-19  Dick Porter  <dick@ximian.com>
6658
6659         * socket-io.c:
6660         * icall-def.h: Implement Socket generic Send() and Receive()
6661         methods.  Fixes bug 395168.
6662
6663 2008-06-19  Kornél Pál  <kornelpal@gmail.com>
6664
6665         * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
6666
6667         Contributed under MIT/X11 license.
6668
6669 2008-06-18  Martin Baulig  <martin@ximian.com>
6670
6671         * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
6672         `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
6673         set to 80.0.  The debugger <-> runtime interface is now frozen as
6674         well.   
6675
6676         * mono-debug.c
6677         (mono_debug_debugger_version): Bump to 4.
6678
6679 2008-06-18  Martin Baulig  <martin@ximian.com>
6680
6681         * debug-mono-symfile.c
6682         (load_symfile): Don't check the minor version.
6683
6684         * debug-mono-symfile.h: Bump the version number to 50.0.
6685
6686 2008-06-18  Martin Baulig  <martin@ximian.com>
6687
6688         * debug-mono-symfile.c
6689         (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
6690         minimum required version.
6691
6692 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
6693
6694         * reflection.c (mono_custom_attrs_from_property): Fix support for
6695         retriveving cattrs of dynamic inflated generic types.
6696
6697         * reflection.c (mono_custom_attrs_from_event): Same.
6698
6699         * reflection.c (mono_custom_attrs_from_field): Same;
6700
6701         * reflection.c (typebuilder_setup_events): Same cattrs of events.
6702
6703         * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
6704         Moved to metadata.c.
6705
6706         * metadata.c: New functions to retrive the equivalent field, event
6707         of property from the generic type definition.
6708
6709         * metadata-internals.h: Added new functions from metadata.c.
6710
6711 2008-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
6712
6713         * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
6714         to cached in a mempool is used.
6715
6716         * metadata.c (free_generic_class): In some situations field generic_info type
6717         is not properly dup'ed and leads to double free'ing.
6718
6719         Fixes #400643.
6720
6721 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6722
6723         * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
6724         this arguments (will be needed later for generic methods).
6725         Collect stats.
6726
6727 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6728
6729         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
6730         Create a static RGCTX invoke wrapper for methods which require it.
6731
6732 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6733
6734         * object.c, class-internals.h: New function for checking whether
6735         an individual field is special static.
6736
6737 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
6738
6739         * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
6740         linear search since the table is sorted.
6741
6742         * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
6743         Fixes #324180.
6744
6745 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
6746
6747         * appdomain.c (unload_thread_main): Applied patch from Tim Howard 
6748         (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
6749
6750         * gc.c (mono_domain_finalize): Allow an infinite timeout.
6751
6752         * threads.c (mono_threads_abort_appdomain_threads): Ditto.
6753         
6754         * threads.c (mono_thread_request_interruption): Get rid of locking, use
6755         InterlockedCompareExchange to query and modify 
6756         thread->interruption_requested.
6757
6758         * object-internals.h (struct _MonoThread): Change interruption_requested
6759         to a gint32 so it can be modified by atomic operations. Add 
6760         'critical_region_level' from the managed side, change small_id to a guint32,
6761         add new set of 'unused' fields.
6762
6763         * appdomain.c: Bump corlib version.
6764
6765 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
6766
6767         * class.c (mono_class_from_name): Search modules as well. Fixes
6768         #322332.
6769
6770 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6771
6772         * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
6773         templates.  Templates are generalized with an additional type_argc
6774         argument.  RGCTX templates have type_argc==0, MRGCTX templates
6775         have type_argc>0.
6776
6777         * domain-internals.h, domain.c: New hash table for looking up
6778         MRGCTXs.
6779
6780         * metadata.c, metadata-internals.h: Rename hash and equal
6781         functions for MonoGenericInst's and make them public.
6782
6783         * class-internals.h: New data structures for the MRGCTX.  Macros
6784         for distinguishing slots in the RGCTX and the MRGCTX.
6785
6786 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6787
6788         * object.c (mono_method_get_imt_slot): Put the same methods of
6789         different instantiations of the same generic interface in the same
6790         IMT slots, to make generic sharing simpler.
6791
6792 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
6793
6794         * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
6795
6796         * metadata.c (mono_metadata_field_info_with_mempool): Added.
6797         This function works just like mono_metadata_field_info, but
6798         accept a mempool as argument to be used allocating memory.
6799
6800         * marshal.c (mono_marshal_load_type_info): Use new function
6801         to load marshal data into image mempool.
6802
6803 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
6804
6805         * class.c (mono_class_inflate_generic_type_with_mempool):
6806         This function allows to inflate a generic type using
6807         a mempool.
6808
6809         * class.c (inflate_generic_type): Take a mempool as argument
6810         and use it to do type dup'ing.
6811
6812         * class.c (mono_class_setup_fields): Field type for generic
6813         generic classes are allocated from the image mempool.
6814
6815         * metadata.c (free_generic_class): Inflated field type is
6816         now allocated in the image mempool.
6817
6818 2008-06-12 Rodrigo Kumpera  <rkumpera@novell.com>
6819
6820         * threads.c (thread_cleanup): Free MonoThread::name.
6821
6822 2008-06-12  Marek Habersack  <mhabersack@novell.com>
6823
6824         * appdomain.c (ensure_directory_exists): avoid unnecessary
6825         mkdir(2) calls when the shadow directory already exists.
6826         (mono_make_shadow_copy): copy also satellite assemblies from the
6827         private bin directories.
6828
6829 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
6830
6831         * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
6832         
6833         * threads.c (mono_thread_get_stack_bounds): Align the stack address to
6834         a page boundary. Fixes #396219.
6835
6836 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6837
6838         * marshal.c (mono_marshal_load_type_info): Add a memory barrier
6839         due to double-checked locking.
6840
6841 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6842
6843         * assembly.c (build_assembly_name): Release memory on failure.
6844
6845         * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
6846
6847 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6848
6849         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
6850         memory on failure.
6851
6852 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6853
6854         * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
6855         memory on failure.
6856
6857 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6858
6859         * loader.c (field_from_memberref): Check if field signature type is equal
6860         to the non-inflated type of the field. Fixes #398980.
6861
6862 2008-06-11  Zoltan Varga  <vargaz@gmail.com>
6863
6864         * assembly.c (mono_assembly_load_from_full): Call 
6865         mono_assembly_load_friends () outside the assemblies lock, since it can
6866         acquire the loader lock. Fixes #323696.
6867
6868         * reflection.c (resolve_object): Inflate the inst with the context for
6869         FieldOnTypeBuilderInst. Fixes #399010.
6870
6871 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6872
6873         * reflection.c (mono_image_get_field_on_inst_token): Don't
6874         inflate the field to encode it's signature. If it's a
6875         VAR or MVAR it should stay that way in the signature.
6876         Fixes #399047.
6877
6878 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6879
6880         * reflection.c (resolve_object): Release memory of inflated types.
6881
6882 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6883
6884         * loader.c (mono_method_get_signature_full): Remove assert about
6885         loading a methodspec to a generic method. We have such methods, such as
6886         System.Threading.Interlocked::CompareExchange<T>.
6887         This assert was removed since it crashes the verifier when it checks
6888         methods calling CompareExchange<T>.
6889
6890 2008-06-10  Marek Safar  <marek.safar@gmail.com>
6891
6892         * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
6893         of Type array and not MonoType.
6894
6895 2008-06-10  Marek Habersack  <mhabersack@novell.com>
6896
6897         * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
6898         <lupus@ximian.com>
6899
6900 2008-06-10  Martin Baulig  <martin@ximian.com>
6901
6902         * debug-mono-symfile.h
6903         (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6.  There were no
6904         changes to the file format, but we were generating incorrect
6905         source file indices in the line number table due to a bug, which
6906         made backtraces report an incorrect source file.
6907
6908 2008-06-10 Rodrigo Kumpera  <rkumpera@novell.com>
6909
6910         * mono-debug.c: Moved mono_debug_free_method_jit_info from
6911         mini/debug-mini.c to here.
6912
6913         * mono-debug.c (il_offset_from_address): Free memory from find_method.
6914
6915         * mono-debug.h: Export mono_debug_free_method_jit_info, users should
6916         use it to release structs returned by mono_debug_find_method.
6917
6918 2008-06-10  Zoltan Varga  <vargaz@gmail.com>
6919
6920         * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
6921         since it needs to set method->slot for all interface methods.
6922
6923 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
6924
6925         * class-internals.h: Forgot to add.
6926
6927 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
6928
6929         * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
6930
6931         * reflection.c (lookup_custom_attr): Added a MonoImage argument.
6932         Lookup the custom attributes from property_hash.
6933
6934         * reflection.c (mono_save_custom_attrs): Save the custom attributes
6935         in property_hash. Allocate all data using the image mempool.
6936
6937         * reflection.c: Removed dynamic_custom_attrs. Changed all checks
6938         for dynamic_custom_attrs to checks if the image is dynamic.
6939
6940 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
6941
6942         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
6943         assemblies array.
6944         
6945         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
6946         runtime functions while holding the domain assemblies lock.
6947
6948 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
6949
6950         * verify.c: Reapplied the last bit of the reverted changes.
6951
6952 2008-06-09 Rodrigo Kumpera  <rkumpera@novell.com>
6953
6954         * verify.c: Reapplied more of the reverted changes.
6955
6956 2008-06-09  Martin Baulig  <martin@ximian.com>
6957
6958         * debug-mono-symfile.c (load_symfile): Check the major version
6959         first; if it's wrong, don't print the minor version in the error message.
6960
6961 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
6962
6963         * appdomain.c (set_domain_search_path): Make this use the domain assemblies
6964         lock instead of the domain lock to avoid deadlocks, since the thread might
6965         already hold the loader lock.
6966
6967         * threads.c (start_wrapper): Call mono_monitor_init_tls ().
6968         (mono_thread_attach): Ditto.
6969
6970         * monitor.c: Use a TLS variable for holding the current thread id instead
6971         of calling pthread_self ().
6972         (mono_monitor_init_tls): New internal function to initialize the TLS
6973         variable.
6974         (mono_monitor_try_enter_internal): Put the owner == id check after the
6975         owner == 0 check.
6976
6977         * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
6978         missed optimizations when using gcc-4.3.
6979
6980 2008-06-08 Rodrigo Kumpera  <rkumpera@novell.com>
6981
6982         * reflection.c (mono_dynamic_image_free): Free the memory
6983         used by MonoGenericParam in MonoDynamicImage::gen_param.
6984
6985         * reflection.c (mono_reflection_setup_generic_class): Allocate
6986         container from mempool.
6987
6988         * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
6989         container from mempool.
6990
6991 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
6992
6993         * threads.c (mono_set_pending_exception): New internal function to set the
6994         pending exception of the current thread.
6995         (mono_thread_get_and_clear_pending_exception): Check for 
6996         thread->pending_exception as well.
6997
6998         * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
6999
7000         * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
7001         it can trigger a collection.
7002
7003 2008-06-06  Martin Baulig  <martin@ximian.com>
7004
7005         Merged the `debugger-kahalo' branch.
7006
7007         * mono-debug.h
7008         (MONO_DEBUGGER_VERSION): Bumped to 72.
7009
7010         * debug-mono-symfile.h
7011         (MonoSymbolFileMethodIndexEntry): Removed.
7012         (MonoSymbolFileMethodEntry): New public typedef.
7013         (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
7014         (MonoSymbolFileSourceEntry): Remove everything except `index' and
7015         `data_offset'.
7016         (MonoSymbolFileMethodEntry): Removed.
7017         (MonoSymbolFileLexicalBlockEntry): Removed.
7018         (MonoSymbolFileLineNumberEntry): Removed.
7019         (MonoDebugLexicalBlockEntry): Removed.
7020         (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
7021         removed `num_il_offsets' and `il_offsets'.
7022         (MonoSymbolFile): Replace `version' with `major_version' and
7023         `minor_version'.
7024         (MONO_SYMBOL_FILE_VERSION): Replace with
7025         `MONO_SYMBOL_FILE_MAJOR_VERSION' and
7026         `MONO_SYMBOL_FILE_MINOR_VERSION'.
7027
7028         * debug-mono-symfile.c
7029         (mono_debug_symfile_lookup_location): Add support for the new line
7030         number table format.
7031
7032 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7033
7034         * metadata.c (free_generic_class): Release the inflated
7035         MonoClass of dynamic generic classes if it's not a generic
7036         type definition.
7037
7038 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7039
7040         * verify.c: Reapplied more of the reverted changes.
7041
7042 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7043
7044         * reflection.c (lookup_custom_attr): Clean the cached flag or
7045         nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
7046         for SRE types.
7047
7048 2008-06-07 Rodrigo Kumpera  <rkumpera@novell.com>
7049
7050         * verify.c: Reapplied a small part of the reverted changes.
7051
7052 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
7053
7054         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7055
7056         * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was 
7057         previously in managed code.
7058         (mono_monitor_exit): Ditto.
7059         (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
7060
7061         * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
7062         the managed definition.
7063
7064 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
7065
7066         * verify.c: Revert changes to see if it helps with weird buildbot crashes.
7067
7068 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7069
7070         * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
7071         
7072         * monitor.c: Add some micro optimizations.
7073
7074         * icall.c (type_from_typename): Handle 'bool'.
7075
7076 2008-06-06 Rodrigo Kumpera  <rkumpera@novell.com>
7077
7078         * verify.c: Implement constructor verification per P III 1.8.1.4.
7079         Fixes #396716.
7080
7081 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7082
7083         * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
7084         holding the assemblies lock here too.
7085
7086 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7087
7088         * verify.c: Kill stack_top function.
7089
7090 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7091
7092         * verify.c: Kill stack_get function.
7093
7094 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7095
7096         * verify.c (mono_method_verify): Last change broke the build. Fixed.
7097
7098 2008-06-05 Rodrigo Kumpera  <rkumpera@novell.com>
7099
7100         * verify.c (verify_type_compatibility_full): Make SZARRAY checks
7101         more reliable.
7102
7103         * verify.c (mono_method_verify): Inflate params and locals to avoid
7104         mismatch when checking for compatibility.
7105
7106 2008-06-05  Jonathan Chambers  <joncham@gmail.com>
7107
7108         * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
7109         Length prefix should be size in bytes. Fix bug #339530.
7110         
7111         * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
7112         Length prefix should be size in bytes. Fix bug #339530.
7113
7114         Code is contributed under MIT/X11 license.
7115
7116 2008-06-05  Bill Holmes <billholmes54@gmail.com>
7117
7118         * decimal.c:  Adding MSVC implementation to my_g_bit_nth_msf.
7119
7120         Contributed under MIT/X11 license.
7121
7122 2008-06-05  Martin Baulig  <martin@ximian.com>
7123
7124         * mono-debug-debugger.c
7125         (mono_debugger_check_breakpoints): Reflect latest runtime changes.
7126
7127 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
7128
7129         * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
7130         while holding the assemblies lock to prevent deadlocks. Handle the case
7131         where the search hook returns NULL but the assembly was still loaded.
7132         Fixes #323696.
7133
7134         * appdomain.c (set_domain_search_path): Acquire the domain lock since we
7135         modify domain state.
7136
7137 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
7138
7139         * boehm-gc.c: Add DTrace probes gc-{begin,end}.
7140         * Makefile.am (pedump_LDADD): Post-process object files and
7141         add dtrace-generated object file, if necessary.
7142
7143         Code is contributed under MIT/X11 license.
7144
7145 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
7146
7147         * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
7148
7149 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
7150
7151         * class.c (mono_type_get_full): Add a work-around for generic type definitions.
7152
7153 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7154
7155         * threads.c: Try to free everything from the delayed free table
7156         when shutting down threads, and set the variable to NULL after the
7157         table is freed so that calling
7158         mono_thread_hazardous_try_free_all() when shutting down the root
7159         domain doesn't crash.
7160
7161 2008-06-04 Rodrigo Kumpera  <rkumpera@novell.com>
7162
7163         * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
7164         the caller if resulting type was inflated.
7165
7166         * class.c (mono_class_create_from_typespec): Free the MonoType if it
7167         was inflated.
7168
7169         * class.c (mono_type_get_full): Free the MonoType if it was inflated.
7170
7171
7172 2008-06-04  Zoltan Varga  <vargaz@gmail.com>
7173
7174         * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
7175         class library tests.
7176
7177         * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume 
7178         (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
7179         #396989.
7180
7181 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7182
7183         * domain.c, domain-internals.h: The JIT infos are now freed by the
7184         JIT info table code.  They are freed immediately if there only a
7185         single JIT info table in circulation.  If there is more, the free
7186         is delayed via a queue.
7187
7188         * threads.c, threads-types.h: New hazard pointer function for
7189         freeing all freeable delayed items in one sitting.
7190
7191 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7192
7193         * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
7194
7195         * reflection.c (typebuilder_setup_properties): Same.
7196
7197         * reflection.c (typebuilder_setup_events): Same.
7198
7199 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7200
7201         * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
7202         and use it for allocating memory.
7203
7204         * reflection.c (mono_marshal_spec_from_builder): Same.
7205
7206         * reflection.c: Change code to use new signatures.
7207
7208         * metadata.c (mono_metadata_type_dup): Add a FIXME note.
7209
7210 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7211
7212         * decimal.c (rescale128): Put back one line which was accidently commented
7213         out.
7214         
7215         * decimal.c (rescale128): Disable the code added by the last patch, as it seems
7216         to cause crashes.
7217
7218 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7219
7220         * reflection.c (mono_reflection_generic_class_initialize): Name must
7221         be always malloc'ed so we can free it later on. Do this for field, property
7222         and event.
7223
7224         * metadata.c (free_generic_class): Free field, property and event names.
7225
7226 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7227
7228         * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
7229         instead of g_memdup.
7230
7231         * reflection.c (typebuilder_setup_fields): Same.
7232
7233 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7234
7235         * decimal.c (rescale128): Optimize this function a bit more.
7236
7237 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7238
7239         * metadata.c (free_generic_class): Release some memory from
7240         SRE generic classes.
7241
7242 2008-06-03 Rodrigo Kumpera  <rkumpera@novell.com>
7243
7244         * reflection.c (mono_image_get_generic_field_token): No reference
7245         to name is kept, free it.
7246
7247         * reflection.c (mono_reflection_generic_class_initialize): Free
7248         more memory of the inflated field.
7249
7250 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7251
7252         * decimal.c (mono_decimalDiv): Moved equality checks here from managed
7253         code.
7254
7255 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
7256
7257         * reflection.c (mono_dynamic_image_free): Release memory used by
7258         MonoDynamicImage::array_methods elements.
7259
7260         * reflection.c (assembly_add_win32_resources): Release memory after
7261         encoding.
7262
7263 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
7264
7265         * decimal.c (log2_32): Use an optimized version for this function too.
7266         
7267         * decimal.c (log2_64): Fix this on 32 bit machines.
7268
7269 2008-06-02 Rodrigo Kumpera  <rkumpera@novell.com>
7270
7271         * class.c (mono_dup_array_type): Implement allocation using a mempool.
7272
7273         * class.c (mono_metadata_signature_deep_dup): Same.
7274
7275         * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
7276         a mempool.
7277
7278         * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
7279
7280         * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
7281
7282         * metadata-internals.h: Added mono_metadata_signature_dup_full.
7283
7284         * class-internals.h: Update signatures to take a MonoMemPool.
7285
7286 2008-06-02  Dick Porter  <dick@ximian.com>
7287
7288         * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage): 
7289         * icall-def.h: Add
7290         System.ComponentModel.Win32Exception.W32ErrorMessage, using the
7291         FormatMessage API to get the error text.  Fixes bug 321827.
7292
7293 2008-06-02  Zoltan Varga  <vargaz@gmail.com>
7294
7295         * decimal.c: Add some micro optimizations to make decimal operations faster.
7296
7297 2008-06-01 Rodrigo Kumpera  <rkumpera@novell.com>
7298
7299         * reflection.c (method_encode_clauses): Take a mempool
7300         as parameter and use it to allocate the clause array.
7301
7302         * reflection.c (mono_image_get_field_on_inst_token): Free
7303         the inflated type after encoding it.
7304
7305         * reflection.c (mono_dynamic_image_free): Free each element
7306         of MonoDynamicImage::gen_params.
7307
7308         * reflection.c (reflection_methodbuilder_to_mono_method):
7309         Allocate the generic param array from the mempool.
7310         Allocate signature params from the mempool.
7311
7312         * reflection.c (mono_reflection_generic_class_initialize):
7313         Free inflated fields after been used.
7314
7315 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
7316
7317         * icall.c: Reapply the memory leak fixes as they no
7318         longer make mono crash.
7319
7320 2008-05-30 Rodrigo Kumpera  <rkumpera@novell.com>
7321
7322         * reflection.c (mono_type_get_object): Don't store the suplied
7323         MonoType with type_hash. A caller which pass a type that
7324         was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
7325         might end with a pointer to freed memory.
7326         The solution is to use byval_arg or this_arg from the associated
7327         MonoClass of the supplied type.
7328
7329 2008-05-29  Zoltan Varga  <vargaz@gmail.com>
7330
7331         * icall.c: Revert the rest of the last change as it breaks the build too.
7332
7333 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7334
7335         * icall.c: Revert a leak fix as it's breaking the build.
7336
7337 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7338
7339         * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
7340
7341 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7342
7343         * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
7344
7345 2008-05-29 Rodrigo Kumpera  <rkumpera@novell.com>
7346
7347         * icall.c: Fix some memory leaks.
7348
7349 2008-05-29  Dick Porter  <dick@ximian.com>
7350
7351         * threadpool.c (mono_thread_pool_remove_socket): Always remove the
7352         async socket operations from the pending list when a socket
7353         closes.  Leaving it until the threadpool services the event
7354         exposes a race condition when a socket descriptor is reused.
7355         Fixes bug 377589.
7356
7357 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7358
7359         * object.c: Fix negative index check for array alocation.
7360
7361 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7362
7363         * icall.c, marshal.c: Delegate wrappers should skip visibility.
7364         This check is performed by the verifier for IL created delegates
7365         and by Delegate::CreateDelegate for programatically created ones.
7366         Fixes #372406.
7367
7368 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7369
7370         * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
7371         Fix code to use mono_array_size_t instead of int.
7372
7373         Based on patch by Luis F. Ortiz.
7374         Contributed under X11 license.
7375         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7376
7377 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7378
7379         * icall.c: Added ves_icall_System_Array_GetLongLength and
7380         ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
7381         arrays.
7382
7383         * icall.h: Export both new functions.
7384
7385         Based on patch by Luis F. Ortiz.
7386         Contributed under X11 license.
7387         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7388
7389 2008-05-28  Martin Baulig  <martin@ximian.com>
7390
7391         The debugger now requires exactly r103463.
7392
7393         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
7394         This version is not supported by the debugger, wait for 72.
7395
7396 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7397
7398         * object.h: Changed array related functions to use
7399         mono_array_size_t instead of guint32. Forgot to commit this file.
7400
7401         Patch by Luis F. Ortiz.
7402         Contributed under X11 license.
7403         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7404
7405
7406 2008-05-28 Rodrigo Kumpera  <rkumpera@novell.com>
7407
7408         * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
7409         don't define it. Use the number literal instead.
7410
7411 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7412
7413         * icall.c: Changed array related functions to use
7414         mono_array_size_t instead of guint32.
7415
7416         * icall.c (ves_icall_System_Array_GetLength): Check for length
7417         overflow under MONO_BIG_ARRAYS.
7418
7419         Based on patch by Luis F. Ortiz.
7420         Contributed under X11 license.
7421         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7422
7423 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7424
7425         * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
7426
7427         Based on patch by Luis F. Ortiz.
7428         Contributed under X11 license.
7429         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7430
7431 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7432
7433         * object.c, object.h: Changed array related functions to use
7434         mono_array_size_t instead of guint32.
7435
7436         Patch by Luis F. Ortiz.
7437         Contributed under X11 license.
7438         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7439
7440 2008-05-27 Rodrigo Kumpera  <rkumpera@novell.com>
7441
7442         * object.h: Introduced mono_array_size_t typedef. This must be used
7443         in all places an array length is expected. This is 64bits wide if
7444         MONO_BIG_ARRAYS is enabled.
7445
7446         Patch by Luis F. Ortiz.
7447         Contributed under X11 license.
7448         http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
7449
7450 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
7451
7452         * security-manager.c class.c: Set the class exception info by calling
7453         mono_class_set_failure ().
7454
7455         * class.c (mono_class_get_exception_data): New accessor function.
7456         (mono_class_set_failure): Store exception_data in the property hash.
7457
7458         * class-internals.h (struct _MonoClass): Store 'exception_data' outside
7459         the struct as a property.
7460
7461         * loader.c (mono_get_method_full): Store the lookup result for method
7462         tokens in method_cache, the others in methodref_cache to decrease the memory
7463         usage of hash tables.
7464
7465         * image.c (mono_image_close): Destroy method_cache and methodref_cache.
7466         (mono_image_init): method_cache is lazy inited now.
7467
7468         * metadata-internals.h (struct _MonoImage): Change method_cache to
7469         a MonoValueHashTable, add a separate methodref_cache.
7470
7471 2008-05-27  Eyal Alaluf <eyala@mainsoft.com>
7472
7473         * number-formatter.h: Fix tables to avoid arithemtic overflow in
7474           Double.ToString as exposed by Bug #383531.
7475
7476 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
7477
7478         * number-formatter.h: Make some tables static.
7479
7480         * class.c (mono_method_set_generic_container): New accessor function.
7481         (mono_method_get_generic_container): Ditto.
7482
7483         * class-internals.h (struct _MonoMethod): Remove rarely used 
7484         'generic_container' field, store it in the property hash instead. Add 
7485         'is_generic' boolean field instead.
7486
7487         * image.c (mono_image_init): Initialize property_hash.
7488         (mono_image_close): Destroy property_hash.
7489
7490         * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
7491         hold rarely used fields of runtime structures belonging to this image.
7492
7493         * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
7494         to get/set method->generic_container.
7495
7496         * loader.c (mono_get_method_from_token): Avoid loading the method header for
7497         generic methods.
7498
7499 2008-05-25  Zoltan Varga  <vargaz@gmail.com>
7500
7501         * class.c (mono_class_inflate_generic_method_full): Don't increase
7502         mono_stats.inflated_method_count for methods found in the cache.
7503
7504         * threads.c (mono_thread_request_interruption): Add a comment about 
7505         QueueUserAPC ().
7506
7507 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
7508
7509         * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
7510         interface_offsets_packed table.
7511         
7512         * class.c (mono_class_init): Remove some dead code.
7513
7514         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
7515         mono_class_setup_vtable () when CAS is active to detect security problems.
7516
7517 2008-05-23 Rodrigo Kumpera  <rkumpera@novell.com>
7518
7519         * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
7520
7521         * verify.c (mono_delegate_signature_equal): Don't compar number of generic
7522         parameters as it's irrelevant for delegate checking.
7523
7524 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
7525
7526         * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
7527
7528         * class.c (mono_class_init): Control the creation of a generic vtable using
7529         a global which is true by default, but set to false by the runtime startup code.
7530         
7531         * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
7532         Disabled for now since it breaks the embedding API.
7533         Move the setup of class->methods for arrays to mono_class_setup_methods ().
7534         (mono_class_setup_methods): Add a memory barrier.
7535
7536         * object.c (mono_class_create_runtime_vtable): Add code to handle the case
7537         when mono_class_init () doesn't compute the generic vtable.
7538         
7539 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
7540         * profiler.c: Added mono_profiler_install_statistical_call_chain,
7541         mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
7542         to support call chains (backtrace) in the stat profiler.
7543         * profiler.c, profiler-private.h: Likewise.
7544
7545 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7546
7547         * generic-sharing.c: Init generic class when a method of it is
7548         requested via a runtime generic context.
7549
7550 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
7551
7552         * class.c (mono_class_init): Add a comment about trying to avoid calling this.
7553
7554         * reflection.c (mono_type_get_object): Add a FIXME.
7555
7556         * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
7557
7558         * class.c (mono_class_get_method_by_index): New helper function, returning an
7559         entry in the class->methods array.
7560
7561 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7562
7563         * class.c (mono_class_init): Only do the array optimization for szarrays. 
7564         Avoid creating a generic vtable for generic instances as well.
7565         (mono_class_get_method_from_name_flags): Don't search in the metadata for
7566         generic instances.
7567
7568 2008-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
7569
7570         * loader.c (mono_get_method_constrained): Inflate the signature
7571         with class context. Fix #325283.
7572
7573 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7574
7575         * object.c (mono_class_create_runtime_vtable): Add a comment.
7576
7577         * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
7578         where needed.
7579         (setup_interface_offsets): Handle the case when this is called twice for arrays.
7580         (mono_class_setup_vtable_general): Add an assert.
7581         (mono_class_init): Avoid creating a generic vtable for arrays.
7582
7583         * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
7584         here, let mono_class_init () do that.
7585
7586         * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
7587         interfaces in mscorlib.
7588
7589         * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
7590         interfaces. Add some comments.
7591         (mono_class_init): Call mono_class_setup_methods () here since it is no
7592         longer called by mono_class_setup_vtable ().
7593
7594         * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
7595         not set in class->vtable.
7596         (mono_class_create_runtime_vtable): Reenable the disabled code.
7597
7598         * object.c (mono_class_create_runtime_vtable): Disable the last change for
7599         now as it causes some test failures.
7600
7601         * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
7602         if using the vtable trampoline. Also remove some strange code which put the
7603         generic methods themselves into the vtable slots. Remove the AOT init_vtable
7604         stuff as it is no longer needed.
7605
7606 2008-05-19 Rodrigo Kumpera  <rkumpera@novell.com>
7607
7608         * pedump.c: Give make --verify all option check code as well.
7609         Using --verify code won't check for metadata now.
7610
7611 2008-05-19  Martin Baulig  <martin@ximian.com>
7612
7613         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
7614
7615         * mono-debug.c
7616         (_mono_debug_using_mono_debugger): New global variable; it's set
7617         directly by the debugger, so mono_debug_using_mono_debugger() also
7618         works after attaching.
7619
7620 2008-05-18 Rodrigo Kumpera  <rkumpera@novell.com>
7621
7622         * object.c (mono_class_create_runtime_vtable): Use memory barriers
7623         as we do double checked locking on MonoClass::runtime_info and
7624         MonoClassRuntimeInfo::domain_vtables.
7625
7626 2008-05-18  Zoltan Varga  <vargaz@gmail.com>
7627
7628         * debug-helpers.c (print_field_value): Fix a warning.
7629
7630 2008-05-16  Zoltan Varga  <vargaz@gmail.com>
7631
7632         * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
7633         set in the AOT case.
7634
7635 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
7636
7637         * class.c (mono_class_setup_vtable_general): Use memory barriers
7638         as we do double checked locking on MonoClass::vtable.
7639
7640 2008-05-16 Rodrigo Kumpera  <rkumpera@novell.com>
7641
7642         * reflection.c (resolve_object): Inflate only if the generic context
7643         is not null. Fixes #389886.
7644
7645 2008-05-15  Jonathan Chambers  <joncham@gmail.com>
7646
7647         * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
7648         instead of g_free.
7649
7650         Code is contributed under MIT/X11 license.
7651
7652 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
7653
7654         * class.c: Revert unrelated change.
7655
7656 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
7657
7658         * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
7659         a generic instantiation, use mono_class_from_mono_type instead of playing
7660         with MonoType directly.
7661
7662 2008-05-14 Rodrigo Kumpera  <rkumpera@novell.com>
7663
7664         * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
7665         checks must ignore generic instantiations, so mono_class_has_parent is not
7666         suitable. Fixes #390128.
7667
7668 2008-05-14  Zoltan Varga  <vargaz@gmail.com>
7669
7670         * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
7671         it to avoid registering tokens during metadata generation. Fixes #390023.
7672
7673 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
7674
7675         * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
7676         consistent.
7677
7678         Contributed under MIT/X11 license.
7679
7680 2008-05-14  Kornél Pál  <kornelpal@gmail.com>
7681
7682         * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
7683         even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
7684         to fixup the EXE image.
7685         (mono_cleanup): Use mono_close_exe_image.
7686         (mono_close_exe_image): New function.
7687         * image.c: Include "marshal.h".
7688         (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
7689         (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
7690         counting when the image is loaded outside of mono_image_open_full. Set status
7691         based on GetLastError.
7692         * coree.c: Include required headers. Add init_from_coree.
7693         (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
7694         mono_assembly_open only when the image has vtfixups. Set init_from_coree.
7695         (_CorExeMain): Set init_from_coree.
7696         (CorExitProcess): Only call ExitProcess for now.
7697         (CorBindToRuntimeEx): New stub implementation.
7698         (CorBindToRuntime): New function.
7699         (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
7700         (MonoFixupExe): ILONLY executables require no fixups.
7701         (mono_set_act_ctx): New function to set activation context.
7702         (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.  
7703         * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
7704         Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
7705         mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
7706         as MONO_INTERNAL.
7707         * domain-internals.h: Add mono_close_exe_image.
7708
7709         Contributed under MIT/X11 license.
7710
7711 2008-05-13 Rodrigo Kumpera  <rkumpera@novell.com>
7712
7713         * metadata.c (mono_metadata_compute_size): Correctly calculate field
7714         size for generic param and event tables. Fixes #388977.
7715
7716 2008-05-13  Zoltan Varga  <vargaz@gmail.com>
7717
7718         * loader.c (mono_method_signature): Use memory barriers because of the double
7719         checked locking pattern.
7720
7721         * threads.c (remove_and_abort_threads): Stop and wait for threads which are
7722         aborting or aborted as well. Fixes #376391.
7723         
7724         * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
7725         existing runtime state in the Suspend handler during shutdown.
7726
7727 2008-05-12  Zoltan Varga  <vargaz@gmail.com>
7728
7729         * threads.c (mono_thread_request_interruption): Add some FIXMEs.
7730
7731         * threads.c (mono_thread_suspend_all_other_threads): Add support for threads 
7732         which are starting up or shutting down.
7733
7734         * threads.c (mono_threads_set_shutting_down): Don't return a value since
7735         this function never returns if the runtime is already shutting down.
7736
7737         * icall.c (ves_icall_System_Environment_Exit): Update after 
7738         mono_threads_set_shutting_down () signature change.
7739         
7740 2008-05-09 Rodrigo Kumpera  <rkumpera@novell.com>
7741
7742         * class.c: Added can_access_instantiation to verify if the instantiation
7743         is visible. Fix access check for nested types as they returned TRUE
7744         before doing type and generic instantiation visibility checks.
7745
7746 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
7747
7748         * reflection.c (mono_reflection_create_generic_class): The created type
7749         must have a different container from its TypeBuilder. Otherwise they
7750         will end sharing generic arguments, which is wrong.
7751
7752         Due to the sharing, making a generic instance of the created type using
7753         the TypeBuider generic arguments resulted in the generic type definition
7754         been returned, which is wrong as well.
7755
7756         As a bonus the code was leaking the type_params array. This memory should
7757         be allocated from the image mempool.
7758
7759         This fixes bug #354047.
7760
7761 2008-05-08 Rodrigo Kumpera  <rkumpera@novell.com>
7762
7763         * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
7764         to here         as they are now used in assembly.c new code.
7765         Added a skipverification flag to MonoAssembly.
7766         New internal function mono_assembly_has_skip_verification.
7767
7768         * assembly.c: New function mono_assembly_has_skip_verification. It checks
7769         if an assembly has a version 2.0 SkipVerification security attribute. Fixes
7770         part of #387274.
7771
7772 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
7773
7774         * object.c (mono_object_get_virtual_method): Inflate the resulting method if
7775         needed. Fixes #387034.
7776
7777         * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
7778
7779 2008-05-06  Miguel de Icaza  <miguel@novell.com>
7780
7781         * assembly.c (mono_assembly_load_reference): Prevent crash while
7782         disassembling Silverlight 2.0 executables while we still do not
7783         have GACed libraries.
7784
7785 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
7786
7787         * reflection.c: Special case generic type definitions as well. Fixes #383444.
7788
7789 2008-05-06  Zoltan Varga  <vargaz@gmail.com>
7790
7791         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
7792         of the dynamic case. Fixes #387404.
7793
7794 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
7795
7796         *verify.c (mono_verifier_is_class_full_trust): If under
7797         verify_all and the verifier mode was not set, only
7798         gac and corlib types are fulltrust. This makes --verify-all
7799         usable to detect unverifiable code, which is the expected
7800         use case.
7801
7802 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
7803
7804         * verify.h: Ops, commited the header with debug
7805         enabled.
7806
7807 2008-05-06 Rodrigo Kumpera  <rkumpera@novell.com>
7808
7809         * verify.c (merge_stack): Use the new value on unverifiable
7810         stack merges.
7811
7812         * verify.c (verify_type_compatibility_full): Comparison
7813         of nullable types can't use mono_class_is_assignable_from.
7814
7815         * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
7816         that makes all verification errors be reported.
7817
7818         * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
7819         mono_method_verify.
7820
7821 2008-05-05  Robert Jordan  <robertj@gmx.net>
7822
7823         * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
7824         support for value types. See #386415.
7825
7826         * object.c: comments.
7827
7828         Code is contributed under MIT/X11 license.
7829
7830 2008-05-05  Martin Baulig  <martin@ximian.com>
7831
7832         * debug-mono-symfile.h
7833         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
7834         for old pre-terrania symbol files.
7835
7836 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
7837
7838         * mono-config.c: Add ppc64 architecture.
7839
7840         Code is contributed under MIT/X11 license.
7841
7842 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
7843
7844         * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
7845           PPC64 uses function descriptors as well.
7846
7847         Code is contributed under MIT/X11 license.
7848
7849 2008-05-04  Zoltan Varga  <vargaz@gmail.com>
7850
7851         * object.c (compute_class_bitmap): Ignore literal static fields.
7852
7853         * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
7854         var has an invalid format.
7855         (describe_ptr): Add some sanity checks for the vtable.
7856         (add_nursery_frag): Clear unused nursery fragments.
7857         (major_collection): Clear all remaining nursery fragments.
7858
7859 2008-05-03  Robert Jordan  <robertj@gmx.net>
7860
7861         * image.c, metadata-internals.h: add thunk_invoke_cache.
7862
7863         * marshal.c, marshal.h: implement
7864         mono_marshal_get_thunk_invoke_wrapper ().
7865
7866         * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
7867
7868         Code is contributed under MIT/X11 license.
7869
7870 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
7871
7872         * verify.c (do_leave): Empty the stack.
7873
7874 2008-05-02 Rodrigo Kumpera  <rkumpera@novell.com>
7875
7876         * class.c (mono_class_is_assignable_from): Variance
7877         doesn't work between reference and value types. For example,
7878         given type C<T+>, C<int32> is not assignable to C<object>.
7879         Break the argument checking loop on first error. 
7880
7881 2008-05-02  Atsushi Enomoto  <atsushi@ximian.com>
7882
7883         * icall.c : base64_to_byte_array() needs some more strict
7884           check for sequence of '=' characters. Patch by Santa
7885           Marta (http://deee.g.hatena.ne.jp/santamarta).
7886
7887           Contributed under MIT/X11 license.
7888           (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
7889
7890 2008-05-02  Jonathan Chambers  <joncham@gmail.com>
7891
7892         * domain.c: Disable LoadLibrary support to fix Win32 build.
7893
7894         Code is contributed under MIT/X11 license.
7895
7896 2008-05-02  Zoltan Varga  <vargaz@gmail.com>
7897
7898         * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
7899         to help with cache behaviour.
7900
7901 2008-05-01  Miguel de Icaza  <miguel@novell.com>
7902
7903         * appdomain.c (mono_domain_from_appdomain): Add new accessor
7904         method. 
7905
7906 2008-05-01  Zoltan Varga  <vargaz@gmail.com>
7907
7908         * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
7909
7910 2008-05-01  Dick Porter  <dick@ximian.com>
7911
7912         * process.c (process_get_fileversion): Only pass 16 bits of
7913         language ID to VerLanguageName.  Fixes bug 381204.
7914
7915 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
7916
7917         * verify.c (mono_method_verify): Fix the comparison
7918         operator for code bounds check.
7919
7920 2008-04-30 Rodrigo Kumpera  <rkumpera@novell.com>
7921
7922         * verify.c (mono_method_verify): Check the bounds of
7923         all access of the code array.
7924
7925 2008-04-29  Kornél Pál  <kornelpal@gmail.com>
7926
7927         * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
7928
7929 2008-04-28  Zoltan Varga  <vargaz@gmail.com>
7930
7931         * image.c (mono_image_strong_name_position): Fix return value when the rva is
7932         not valid.
7933
7934 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
7935
7936         * loader.c (mono_get_method_from_token, mono_method_signature): Add
7937         support for METHOD_IMPL_ATTRIBUTE_NATIVE.
7938         * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
7939         fixup main EXE images when using mono.exe for mixed-mode assembly support.
7940         * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
7941         mono_runtime_load.
7942         * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
7943         runtime initialization from metadata.
7944         * assembly.c: Remove obsolete ceGetModuleFileNameA.
7945         (mono_set_rootdir): Use mono_get_module_file_name.
7946         (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
7947         handles.
7948         * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
7949         * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
7950         * image.c (mono_cli_rva_image_map): Use MonoImage instead of
7951         MonoCLIImageInfo. Add support for module handles.
7952         (load_cli_header): Update mono_cli_rva_image_map signature.
7953         (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
7954         (mono_image_strong_name_position): Use mono_cli_rva_image_map.
7955         (mono_image_rva_map): Add support for module handles.
7956         (mono_image_ensure_section_idx): Add support for module handles.
7957         (mono_image_close): Add support for module handles.
7958         (do_load_header): Add support for module handles.
7959         (mono_image_open_from_module_handle): New function for internal use.
7960         (mono_image_open_full): Load normal images using LoadLibrary on Windows.
7961         (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
7962         (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
7963         handles.
7964         (mono_image_fixup_vtable): New function for mixed-mode assembly support.
7965         * image.h: Add mono_image_fixup_vtable.
7966         * coree.c: New file for mscoree.dll functions and mixed-mode assembly
7967         support.
7968         * coree.h: New file.
7969         * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
7970         unsupported native code.
7971         (mono_marshal_set_callconv_from_modopt): New function splitted from
7972         mono_marshal_get_managed_wrapper.
7973         (mono_marshal_get_managed_wrapper): Use
7974         mono_marshal_set_callconv_from_modopt.
7975         (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
7976         * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
7977         * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
7978         that results in a deadlock when the runtime is loaded in _CorDllMain.
7979         * Makefile.am: Add coree.c and coree.h.
7980
7981         Contributed under MIT/X11 license.
7982
7983 2008-04-28  Mark Probst  <mark.probst@gmail.com>
7984
7985         * generic-sharing.c: Search for type arguments in array element
7986         types as well.
7987
7988 2008-04-28  Mark Probst  <mark.probst@gmail.com>
7989
7990         * class-internals.h, generic-sharing.c: New, small runtime generic context.
7991
7992         * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
7993
7994         * object.c: Don't setup the RGCTX when the vtable is created,
7995         because we're setting it up lazily now.
7996
7997 2008-04-26  Zoltan Varga  <vargaz@gmail.com>
7998
7999         * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix 
8000         64 bit support.
8001
8002 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
8003
8004         * verify.c (verify_class_for_overlapping_reference_fields): 
8005         If class is under fulltrust allow reference types to overllap
8006         if they have the same RVA.
8007
8008 2008-04-24 Rodrigo Kumpera  <rkumpera@novell.com>
8009
8010         * pedump.c: Added new flag valid-only, that makes the verifier
8011         behaves just like --security=validil. It won't fail type load
8012         due to unverifiable restrictions.
8013
8014 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
8015
8016         * class-internals.h (struct MonoMethod): Added a verification_success
8017         field to cache verifier executions. Reduced MonoMethod:slot size by
8018         one bit.
8019
8020 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
8021
8022         * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
8023         instead of a 'vt' argument to save an indirection and to allow these to be used
8024         for valuetypes.
8025         (scan_vtype): New helper function to scan an area using a gc descriptor.
8026         (mono_gc_wbarrier_value_copy): Implement this.
8027         (handle_remset): Add support for REMSET_VTYPE.
8028         (find_in_remset_loc): Ditto.
8029         (mono_gc_base_init): Allow some debugging options to be controlled through the
8030         use of the MONO_GC_DEBUG env variable.
8031         (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
8032         (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
8033
8034 2008-04-23  Martin Baulig  <martin@ximian.com>
8035
8036         * domain.c (mono_domain_create): Move the call to
8037         mono_debug_domain_create() down, after allocating the domain id.
8038
8039 2008-04-23 Rodrigo Kumpera  <rkumpera@novell.com>
8040
8041         verify.c (verify_class_for_overlapping_reference_fields): Skip
8042         static fields while verifying for overlapping fields as they
8043         don't matter at all.
8044
8045 2008-04-23  Marek Habersack  <mhabersack@novell.com>
8046
8047         * domain-internals.h: added a declaration of
8048         mono_make_shadow_copy.
8049
8050         * assembly.c (mono_assembly_open_full): shadow copying of
8051         assemblies moved to here, so that all the assemblies within the
8052         application domain's private binary directories can be
8053         processed. Fixes bug #380546
8054
8055         * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
8056         mono_make_shadow_copy and made non-static. The decision whether
8057         to shadow-copy an assembly is made based on its location - it's
8058         copied if it's in one of the private application domain binary
8059         directories and its different to the target file in the shadow
8060         directory. Fixes bug #380546
8061
8062 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
8063
8064         * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
8065
8066         * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
8067         types.
8068
8069         * reflection.c (mono_image_create_token): Handle 
8070         Method/ConstructorOnTypeBuilderInst.
8071         (resolve_object): Ditto.
8072         (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
8073         so it can be called from resolve_object. Also handle the case when the inflated
8074         class already has its methods setup.
8075
8076 2008-04-21  Martin Baulig  <martin@ximian.com>
8077
8078         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
8079
8080 2008-04-20  Geoff Norton  <gnorton@novell.com>
8081
8082         * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
8083         pointer dereference.
8084
8085 2008-04-15  Marek Habersack  <mhabersack@novell.com>
8086
8087         * appdomain.c (try_load_from): if IOMAP is in effect, call the
8088         portability API to look up the assembly file. Fixes behavior in
8089         situations when the application has a bin/ directory, but the
8090         assembly search patch refers to Bin/ (and thus the requested file
8091         name is Bin/SomeLibrary.dll). Fixes bug #379888
8092
8093 2008-04-15 Rodrigo Kumpera  <rkumpera@novell.com>
8094
8095         verify.c (mono_type_is_generic_argument): Extracted this check
8096         from a dozen places to here.
8097
8098         verify.c: Fixed all issues related to boxing generic arguments
8099         and their constraints.
8100
8101 2008-04-14 Rodrigo Kumpera  <rkumpera@novell.com>
8102
8103         verify.c (mono_class_interface_implements_interface): Fix win32 build.
8104
8105 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
8106
8107         * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
8108         isn't finished yet. Fixes #363447.
8109
8110 2008-04-13  Zoltan Varga  <vargaz@gmail.com>
8111
8112         * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
8113         Fixes #346419.
8114
8115 2008-04-13  Jb Evain  <jbevain@novell.com>
8116
8117         * domain.c: update the 2.1 profile versions.
8118         Merged from the Moonlight 2 branch.
8119
8120 2008-04-12  Zoltan Varga  <vargaz@gmail.com>
8121
8122         * assembly.c (mono_assembly_load_from_full): Do the check for loading other
8123         mscorlibs for the non-refonly case as well.
8124
8125         * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
8126         in mono_assembly_load_from_full (). Fixes #378924.
8127
8128 2008-04-11  Geoff Norton  <gnorton@novell.com>
8129
8130         * icall.c: The global extern environ doesn't exist on Mac.  We
8131         need to call NSGetEnviron instead.
8132
8133 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8134
8135         verify.c: Add generic method constraint verification.
8136
8137 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8138
8139         class.c (mono_class_inflate_generic_method_full): Add a long
8140         explanation to the is_mb_open hack. Remove the FIXME.
8141
8142 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8143
8144         * verify.c (mono_method_verify): Mark all unknown opcodes
8145         as invalid. Mark jmp as unverifiable.
8146
8147 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8148
8149         * verify.c: Add code to do type constraint verification on class instances.
8150
8151         * verify.c (mono_verifier_verify_class): Use the type constraint 
8152         verification code.
8153
8154 2008-04-10 Rodrigo Kumpera  <rkumpera@novell.com>
8155
8156         * class.c (mono_class_get_field_default_value): Don't pass cindex
8157         as hint to mono_metadata_get_constant_index. The local is not initialized
8158         and should contain garbage most of the time. This could only work
8159         with a lot of luck.
8160
8161 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
8162
8163         * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
8164
8165 2008-04-09 Rodrigo Kumpera  <rkumpera@novell.com>
8166
8167         * class-internals.h: Add generic_param_token to MonoClass::sizes union.
8168
8169         * class.c (mono_class_from_generic_parameter): Save the token of the
8170         generic param in MonoClass::sizes.generic_param_token.
8171
8172         * reflection.c (mono_custom_attrs_from_class): If the class type is
8173         VAR or MVAR retrieve the attributes of the generic param.
8174
8175 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
8176
8177         * class.c (mono_class_init): Do class verification if the verifier
8178         is enabled.
8179
8180 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
8181
8182         * verify-internal.h: Added mono_verifier_verify_class.
8183
8184         * verify.c: Added mono_verifier_verify_class. It checks for
8185         classes with explicit layout that have overlapping reference fields.
8186
8187         * pedump.c: Init the verifier state prior to verification. Fixed
8188         command line arguments.
8189
8190 2008-04-08 Rodrigo Kumpera  <rkumpera@novell.com>
8191
8192         * Makefile.am: Added verify-internals.h, hopefully fix the build.
8193
8194 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
8195
8196         * verify-internals.h: Fix a warning.
8197
8198 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
8199
8200         * verify-internals.h: New header with the verifier configuration
8201         extracted from mini.c.
8202
8203         * verify.c: Implemented the new functions exported by verify-internals.h.
8204
8205 2008-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
8206
8207         * verify.c: Add proper verification of ckfinite.
8208
8209 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
8210
8211         * verify.c (do_conversion): Improved error message to something
8212         more meanfull.
8213
8214         * verify.c (check_is_valid_type_for_field_ops): Fix to work
8215         with primitive types.
8216
8217 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
8218
8219         * verify.c: Added tail prefix checking. Marked icall
8220         as unverifible.
8221
8222 2008-04-04 Rodrigo Kumpera  <rkumpera@novell.com>
8223
8224         * verify.c: Fix the detection of branches to the middle
8225         of an instruction.
8226
8227 2008-04-03 Rodrigo Kumpera  <rkumpera@novell.com>
8228
8229         * verify.c: Implemented verification of volatile. and
8230         unaligned. prefix. Check if a type is valid after retrieving it.
8231
8232 2008-04-01  Dick Porter  <dick@ximian.com>
8233
8234         * process.c (process_get_fileversion): If there's no string block,
8235         set the file language to en_US.  Fixes the other new part of bug
8236         374600.
8237
8238 2008-03-29 Rodrigo Kumpera  <rkumpera@novell.com>
8239
8240         * class.c: New functions mono_method_can_access_field_full and
8241         mono_method_can_access_method_full. They perform type visibility
8242         and type site check.
8243
8244         * class-internal.h: Added exported functions.
8245
8246         * verify.c: Use new functions to implement proper visibility checks.
8247
8248 2008-03-29  Zoltan Varga  <vargaz@gmail.com>
8249
8250         * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
8251
8252 2008-03-28  Dick Porter  <dick@ximian.com>
8253
8254         * process.c (process_get_fileversion): Use the first language ID
8255         we see, rather than insisting on an invariant language.  Fixes bug
8256         374600.
8257
8258 2008-03-28  Zoltan Varga  <vargaz@gmail.com>
8259
8260         * reflection.c (calc_section_size): Use add_stream_zero to align the size of
8261         the streams to fix reading of invalid memory later.
8262
8263         * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
8264         to ease debugging.
8265
8266 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
8267
8268         * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
8269         (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
8270
8271 2008-03-26  Massimiliano Mantione  <massi@ximian.com>
8272         * threads.h: Added MonoThreadManageCallback type and
8273         mono_thread_set_manage_callback prototype
8274         * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
8275         (used to store the mono_thread_manage callback).
8276         * threads.c: Added mono_thread_set_manage_callback, and handle
8277         "MonoThread->manage_callback" in build_wait_tids.
8278
8279 2008-03-26  Dick Porter  <dick@ximian.com>
8280
8281         * process.c (process_get_fileversion): Set FileVersionInfo strings
8282         to Empty when the resource doesn't have the particular info.
8283         Fixes bug 355717.
8284
8285 2008-03-25 Rodrigo Kumpera  <rkumpera@novell.com>
8286
8287         * verify.c (mono_method_verify): Proper prefix validation.
8288
8289 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
8290
8291         * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
8292         itself in a separate argument instead of throwing them. Fixes #373448.
8293
8294         * appdomain.c: Bump corlib version.
8295
8296 2008-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
8297
8298         * verify.c: Implemented readonly prefix and verify controled mutability pointers.
8299
8300 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
8301
8302         * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
8303         version macros.
8304
8305 2008-03-20  Mark Probst  <mark.probst@gmail.com>
8306
8307         * generic-sharing.c, class-internals.h: Code for putting
8308         reflection types into the runtime generic context.
8309
8310 2008-03-19 Rodrigo Kumpera  <rkumpera@novell.com>
8311
8312         * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
8313         Fixes #340662. 
8314
8315
8316 2008-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
8317
8318         * verify.c (VerifyContext): Added instruction prefix data to the struct.
8319
8320         * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
8321
8322         * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
8323
8324         * verify.c (do_cast): Let the result value keep the boxed status.
8325
8326         * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
8327
8328 2008-03-17  Jb Evain  <jbevain@novell.com>
8329
8330         * reflection.c: when running on a 2.0 runtime, emit
8331         unconditionally the #~ header version as 2.0, and the
8332         CLI header version as 2.5, for symmetry's sake with csc.
8333
8334 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
8335
8336         * class.c: Remove the unused cache_interface_offsets stuff.
8337
8338         * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
8339         profiler.c: Fix warnings.
8340
8341 2008-03-16  Mark Probst  <mark.probst@gmail.com>
8342
8343         * generic-sharing.c, class-internals.h: Support for putting
8344         methods into the runtime generic context.
8345
8346 2008-03-16  Zoltan Varga  <vargaz@gmail.com>
8347
8348         * class.c (mono_class_setup_fields): Ignore calls made to this function for
8349         classes which are generic instances of not-yet finished typebuilders. Fixes
8350         #351172.
8351
8352         * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
8353
8354 2008-03-15  Zoltan Varga  <vargaz@gmail.com>
8355
8356         * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
8357
8358         * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
8359         field, replace it with a hash table in MonoDynamicImage.
8360
8361         * reflection.c (inflate_mono_method): Access the generic definition object from
8362         image->generic_def_objects instead of imethod->reflection_info.
8363
8364         * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto. 
8365
8366         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
8367         
8368         * image.c (mono_image_close): Move the dynamic image freeing code to a separate
8369         function in reflection.c so it is easier to keep in sync with the dynamic image
8370         creation code.
8371
8372         * reflection.c (mono_dynamic_image_free): New internal function, extracted from
8373         mono_image_close ().
8374
8375 2008-03-15  Mark Probst  <mark.probst@gmail.com>
8376
8377         * class.c (mono_class_generic_sharing_enabled): Disable generic
8378         sharing for all architectures except AMD64 and x86 to fix build.
8379
8380 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
8381
8382         * verify.c: Use the generic definition MonoGenericContext when available.
8383         Remove code for checking generics instance compatibility in favor of
8384         mono_class_is_assignable_from.
8385
8386 2008-03-14  Mark Probst  <mark.probst@gmail.com>
8387
8388         * marshal.c, marshal.h, metadata-internals.h, image.c,
8389         wrapper-types.h: New wrapper for invoking a shared static method
8390         without having to pass the runtime generic context argument.
8391
8392 2008-03-14 Rodrigo Kumpera  <rkumpera@novell.com>
8393
8394         * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
8395
8396 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
8397
8398         * reflection.c (mono_image_get_field_on_inst_token): Add caching.
8399         
8400         * reflection.c (mono_image_get_field_on_inst_token): New helper function to
8401         create a token from a FieldOnTypeBuilderInst.
8402         (mono_image_create_token): Handle FieldOnTypeBuilderInst.
8403         (resolve_object): Ditto.
8404
8405         * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
8406         mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
8407
8408 2008-03-14  Martin Baulig  <martin@ximian.com>
8409
8410         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
8411
8412         * debug-mono-symfile.h
8413         (MONO_SYMBOL_FILE_VERSION): Bump to 41.
8414         (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
8415
8416 2008-03-10  Martin Baulig  <martin@ximian.com>
8417
8418         * debug-mono-symfile.h
8419         (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
8420         `lexical_block_table_offset'.
8421         (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
8422         `lexical_blocks'.
8423         (MonoSymbolFile): Added `version'.
8424
8425         * mono-debug.h
8426         (MonoDebugLexicalBlockEntry): Removed.
8427         (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
8428         `lexical_blocks'.
8429
8430         * mono-debug.c (mono_debug_add_method): Don't compute lexical
8431         blocks here; the debugger now does this internally.
8432
8433 2008-02-27  Martin Baulig  <martin@ximian.com>
8434
8435         * object.c (mono_runtime_exec_main): Call
8436         `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
8437         `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
8438
8439 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
8440
8441         * verify.c (verify_type_compatibility_full): Allow native int to be converted
8442         to native pointer in non-strict mode. Required to "(IntPtr)null" work.
8443
8444 2008-03-12 Rodrigo Kumpera  <rkumpera@novell.com>
8445
8446         * verify.c (verify_ldftn_delegate): Accept a sealed type when using
8447         ldftn with a virtual method.
8448
8449 2008-03-13  Geoff Norton  <gnorton@novell.com>
8450
8451         * decimal.c:  Only include memory.h if the platform has it.
8452
8453 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
8454
8455         * assembly.c, class.c, metadata-internals.h: make sure public key
8456         tokesns are compared in a case-insensitive way. Also, all
8457         the lookups in the GAC use a lowercase public key token
8458         (gaacutil already does the lowercasing on install). Fixes
8459         bug #369541.
8460
8461 2008-03-11 Rodrigo Kumpera  <rkumpera@novell.com>
8462
8463         * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
8464         and return value.
8465
8466 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
8467
8468         * image.c: when someone loads a mscorlib from a file, return the
8469         currently loaded mscorlib (fixes bug #369253).
8470
8471 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8472
8473         * class.c: handle types with no parents by forcing them to have
8474         System.Object as a parent and marking them as broken (this currently
8475         allows the first part of bug #369173 to work as well, likely because
8476         we don't check for typeload exceptions everywhere yet).
8477
8478 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
8479
8480         * class.c: more complete check that types belong to corlib
8481         (fixes second part of bug #369173).
8482
8483 2007-03-10  Bill Holmes  <billholmes54@gmail.com>
8484
8485         * generic-sharing.c:  Including glib.h for the MSVC builds to define
8486           "inline" to "__inline" before including mono-membar.h.
8487           
8488         * mono-perfcounters.c:  Adding HAVE_SYS_TIME_H check for MSVC builds.
8489           Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for 
8490           MSVC builds.
8491
8492         Contributed under MIT/X11 license.
8493
8494 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
8495
8496         * verify.c (do_invoke_method): Remove return type validation.
8497
8498         * verify.c (do_ret): Do return type validation at return site instead of
8499         call site.
8500
8501 2008-03-10 Rodrigo Kumpera  <rkumpera@novell.com>
8502
8503         * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
8504
8505         * verify.c: Some todos cleaned and improved a few error messages.
8506
8507 2008-03-08  Zoltan Varga  <vargaz@gmail.com>
8508
8509         * class.c (mono_class_setup_mono_type): Improve the test for corlib.
8510
8511 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
8512
8513         * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
8514         system types correctly.
8515
8516         * exception.h exception.c (mono_exception_from_token_two_strings): New helper
8517         function.
8518
8519 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
8520
8521         * assembly.c (build_assembly_name): Fix a warning.
8522
8523 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8524
8525         * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
8526         the called function takes an object type argument. Fixes storing or
8527         valuetypes across remoting as well as reducing memory usage.
8528         * image.c, metadata-internals.h: remove now unused ldfld_remote and
8529         stfld_remote wrapper caches.
8530
8531 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
8532
8533         * icall.c (mono_lookup_internal_call): Update the exception message when an icall
8534         is not found.
8535
8536         * reflection.c (mono_image_register_token): New helper function to save
8537         a token->object mapping.        
8538
8539         * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
8540         managed code.
8541
8542         * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
8543         one dimension arrays. Fixes #367670.
8544         (mono_reflection_get_type_internal): Ditto.
8545
8546 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
8547
8548         * marshal.c: mono_load_remote_field_new() always returns object.
8549         so use the proper signature (fixes bug #366445).
8550
8551 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
8552         
8553         * class-internals.h (MonoMethod): Remove unused uses_this flag, 
8554         add an 'inline_failure' flag instead.
8555
8556 2008-03-04  Mark Probst  <mark.probst@gmail.com>
8557
8558         * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
8559         with a new structure, MonoGenericJitInfo, in the MonoJitInfo.  It
8560         contains the location of "this", used for exception handling.
8561
8562 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
8563
8564         * class.c (mono_class_layout_fields): Set the min alignment of small structs to
8565         their size on all platforms for perf reasons.
8566
8567 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8568
8569         * reflection.h: Move mono_reflection_is_valid_dynamic_token to
8570         object-internal.h
8571
8572         * object-internal.h: Same.
8573
8574 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8575
8576         * reflection.h: Fix the build I just broke.
8577
8578 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8579
8580         * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
8581         Test if a token is valid, this remove explicit usage of 
8582         MonoDynamicImage::tokens from the verifier code.
8583
8584         * reflection.h: Added mono_reflection_is_valid_dynamic_token.
8585
8586         * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
8587         instead of direct access to MonoDynamicImage::tokens.
8588
8589 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8590
8591         * verify.c (token_bounds_check): Fix the build I just broke.
8592
8593 2008-03-03 Rodrigo Kumpera  <rkumpera@novell.com>
8594
8595         * verify.c (token_bounds_check): Fix bounds check for dynamic images.
8596
8597         * verify.c (verifier_load_method): Fixed the errors message.
8598
8599         * verify.c (mono_method_verify): Fixed a debug message.
8600
8601 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
8602
8603         * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
8604         mono-perfcounters.h, class-internals.h: support for predefined
8605         writable counters, query of categories and counters, bugfixes.
8606
8607 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
8608
8609         * verify.c (do_refanytype): Verify the refanytype opcode.
8610
8611         * verify.c (mono_method_verify): Use do_refanytype.
8612
8613 2008-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
8614
8615         * verify.c (do_mkrefany): Verify the mkrefany opcode.
8616
8617         * verify.c (mono_method_verify): Use do_mkrefany.
8618
8619 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
8620
8621         * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
8622         mono-perfcounters.c, mono-perfcounters.h: basic performance counter
8623         implementation.
8624
8625 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
8626
8627         * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
8628         the type load exception.
8629
8630 2008-02-27 Rodrigo Kumpera  <rkumpera@novell.com>
8631
8632         * verify.c: Added a few FIXME for method signatures
8633
8634         * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
8635         of mono_method_get_signature and get vararg call working. Removed unused
8636         checks for return value.
8637
8638         * verify.c (do_refanyval): Verify the refanyval opcode.
8639
8640         * verify.c (mono_method_verify): Implemented verification of arglist and
8641         use do_refanyval.
8642
8643 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
8644
8645         * class.c (mono_class_setup_methods): Move the check for synchronized methods on
8646         vtypes to marshal.c.
8647
8648         * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
8649         it works for AOT as well.
8650
8651 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
8652
8653         * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
8654         with mono_msec_ticks () which is monotonic and doesn't cause bugs when
8655         the system time is adjusted.
8656
8657 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
8658
8659         * icall.c, icall-def.h: use the new time functions (fixes the
8660         non-monotonic behaviour of TickCount).
8661
8662 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
8663
8664         * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
8665         it breaks the build.
8666         
8667         * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
8668         cattr is not finished yet.
8669
8670 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
8671
8672         * verify.c: Proper token validation for field, method and type.
8673
8674 2008-02-25 Rodrigo Kumpera  <rkumpera@novell.com>
8675
8676         * loader.c (field_from_memberref): Generate a loader error if the type is not found.
8677
8678         * loader.c (method_from_memberref): Generate type load error instead of method missing
8679         if the type is not found.
8680
8681 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
8682
8683         * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
8684         some of the conversions caused the generation of a marshal directive exception.
8685
8686 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
8687
8688         verify.c: Report which exception should be thrown by the JIT.
8689         Added a lot of FIXME notes.
8690
8691 2008-02-22  Mark Probst  <mark.probst@gmail.com>
8692
8693         * generic-sharing.c: Runtime generic context slots are not
8694         instantiated on init anymore.  Instead, provide function to do the
8695         instantiating on demand.
8696
8697         * class-internals.h: Added vtable to runtime generic context.
8698         Macros for encoding direct and indirect slot offsets in one
8699         guint32.
8700
8701 2008-02-21  Mark Probst  <mark.probst@gmail.com>
8702
8703         * object.c, generic-sharing.c: Moved some generic sharing code
8704         from object.c to generic-sharing.c.
8705
8706         * generic-sharing.c: Added support for extensible runtime generic
8707         context.
8708
8709         * metadata-internals.h: Two new hash tables in MonoImage for
8710         extensible runtime generic context support.
8711
8712         * domain.c: Unregister generic vtables upon domain unloading.
8713
8714         * image.c: Destroy new hash tables upon image unloading.
8715
8716         * metadata.c: Unregister generic subclasses upon image unloading.
8717
8718         * class-internals.h: New data structure for runtime generic
8719         context template.  New fields in the runtime generic context for
8720         extensible part.
8721
8722         * Makefile.am: Added generic-sharing.c.
8723
8724 2008-02-21 Rodrigo Kumpera  <rkumpera@novell.com>
8725
8726         icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
8727         there is a pending loader exception, raise it.
8728
8729         icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
8730         same.
8731
8732         icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): 
8733         same.
8734
8735         Fixes #363450.
8736
8737 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
8738
8739         * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
8740
8741         * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
8742         
8743         * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
8744         ref-only requests for compatibility with MS.
8745
8746 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
8747
8748         * reflection.c (mono_custom_attrs_from_method): Don't silently
8749         return an empty list for generic method instances.
8750         (mono_custom_attrs_from_param): Likewise.
8751
8752 2008-02-20  Rodrigo Kumpera  <rkumpera@novell.com>
8753             Raja R Harinath  <harinath@hurrynot.org>
8754
8755         Fix #354757
8756         * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
8757         * class.c (mono_class_inflate_generic_method_full): Initialize it
8758         when a fully-open method is instantiated.
8759         * metadata.c (inflated_method_equal, inflated_method_hash): Update
8760         to new field.
8761         * reflection.c (inflate_mono_method): Don't create a temporary context.
8762
8763 2008-02-20  Raja R Harinath  <harinath@hurrynot.org>
8764
8765         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
8766         Compute correct value, to prepare for imethod->reflection_info going away.
8767
8768 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
8769
8770         * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
8771
8772 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
8773
8774         * verify.c: Implement skip visibility flag.
8775
8776 2008-02-18 Rodrigo Kumpera  <rkumpera@novell.com>
8777
8778         * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
8779         which contains an extra field to tell the kind of exception that should be thrown.
8780
8781         * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
8782
8783 2008-02-17  Raja R Harinath  <harinath@hurrynot.org>
8784
8785         * loader.c (mono_method_get_param_names): Initialize 'klass' after
8786         'method' is updated.
8787
8788 2008-02-11  Zoltan Varga  <vargaz@gmail.com>
8789
8790         * class.c (mono_class_layout_fields): Set class->min_align for classes using
8791         explicit layout as well. Fixes #360375.
8792
8793 2008-02-11  Geoff Norton  <gnorton@novell.com>
8794
8795         * loader.c: Guard and dereference against inflated generic methods
8796
8797 2008-02-10  Gert Driesen  <drieseng@users.sourceforge.net>
8798
8799         * class.c: Include Retargetable spec in assembly name.
8800         * assembly.c: Always include PublicKeyToken spec in assembly name
8801         (with value "null" if assembly is not signed), and include
8802         Retargetable spec.
8803         * icall-def.h: Added icall for Assembly.get_fullname.
8804         * icall.c: Added icall returning the fullname of an assembly.
8805
8806 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
8807
8808         * class.c (mono_class_setup_vtable_general): Add a missing call to
8809         mono_class_setup_methods () which is needed in the AOT case.
8810
8811 2008-02-08 Rodrigo Kumpera  <rkumpera@novell.com>
8812
8813         * verify.c (mono_type_get_stack_name): Added. Return the name for the
8814         stack type of the given MonoType.
8815
8816         * verify.c (verify_type_compatibility_full): Handle the void type.
8817
8818         * verify.c (is_compatible_boxed_valuetype): Changed to fit the
8819         way stack merging works.
8820
8821         * verify.c (store_local): Improved verification message.
8822
8823         * verify.c (do_branch_op): If the merging is invalid, the method
8824         is unverifiable and not invalid. Improved error message.
8825
8826         * verify.c (merge_stacks): Properly merge a boxed valuetype and
8827         a reference type diferent than System.Object. Improved error
8828         message.
8829
8830 2008-02-07 Rodrigo Kumpera  <rkumpera@novell.com>
8831
8832         * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
8833
8834         * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
8835         type of an enum even if the argument is byref.
8836
8837         * verify.c: Replace all explicit uses of enumtype and enum_basetype
8838         to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
8839
8840         * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
8841
8842         *verify.c (verify_type_compatibility_full): Make enum types
8843         compatible with their base types.
8844
8845         * verify.c (is_compatible_boxed_valuetype): Added. Check if both
8846         types are compatible for the special case of a boxed valuetype and
8847         System.Object.
8848
8849         * verify.c (verify_stack_type_compatibility): The function
8850         is_compatible_boxed_valuetype was extracted from here.
8851
8852         * verify.c (push_arg): Only set ctx->has_this_store if the method
8853         is not static.
8854
8855         * verify.c (do_ldelem): Fixed a typo in an error message and added
8856         strict check for mixing int32 and native int as the array type
8857         and ldelem type.
8858
8859         * verify.c (merge_stacks): Consider boxed valuetypes in the
8860         compatibility checks.
8861
8862 2008-02-07  Massimiliano Mantione  <massi@ximian.com>
8863         * profiler.h: (MonoGCEvent): Added start-stop the world events.
8864
8865 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
8866         *class.c: use_new_interface_vtable_code: renamed the env var to have
8867         a "MONO_" prefix, and fix the logic to enable it by default.
8868
8869 2008-02-06  Massimiliano Mantione  <massi@ximian.com>
8870         *class.c:
8871         mono_class_setup_vtable_general: rewrote the way in which interface
8872         methods are added to vtables. Makes bug-77127.exe pass, and hopefully
8873         makes the code more maintainable.
8874         For now the old code is still there, and can be activated setting
8875         the env var "USE_NEW_INTERFACE_VTABLE_CODE".
8876
8877 2008-02-06 Rodrigo Kumpera  <rkumpera@novell.com>
8878
8879         * verify.c: guarded some debug functions around and #ifdef.
8880
8881         * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
8882
8883 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
8884
8885         * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
8886         changes for now since they seem to break too many things.
8887
8888 2008-02-05  Mark Probst  <mark.probst@gmail.com>
8889
8890         * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
8891         mono_marshal_find_nonzero_bit_offset): Added macro and function
8892         for finding the byte- and bit-offset of a bitfield within a
8893         struct.
8894
8895 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
8896
8897         * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
8898         (mono_marshal_get_struct_to_ptr): Ditto.
8899
8900         * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of 
8901         cctor_signature.
8902
8903 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
8904
8905         * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
8906         between methods for non-corlib types.
8907
8908 2008-02-02  Geoff Norton  <gnorton@novell.com>
8909
8910         * loader.c (mono_method_get_param_names): Populate the parameter name for 
8911         generic parameters as well. (Fixes #342536)
8912
8913 2008-01-31 Rodrigo Kumpera  <rkumpera@novell.com>
8914
8915         * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
8916
8917         * verify.c (do_invoke_method): Fix for calling with byref structs.
8918
8919         * verify.c (do_cast): push a boxed value type based on the type token and not
8920         the type of stack.
8921
8922 2008-01-31  William Holmes  <billholmes54@gmail.com>
8923
8924         * process.c (process_module_string_read): Check the size returned form 
8925           VerQueryValue to avoid out of memory exception. 
8926
8927 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
8928
8929         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
8930         Handle properly modules which are not in the moduleref table. Fixes
8931         #356938.
8932
8933 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
8934
8935         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
8936         the dynamic case which is now in managed code.
8937         (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
8938
8939         * marshal.c (mono_string_to_bstr): Fix a warning.
8940         (init_com_provider_ms): Ditto.
8941
8942         * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
8943
8944         * exception.c (mono_get_exception_out_of_memory): New helper function.
8945
8946 2008-01-28  Jonathan Chambers  <joncham@gmail.com>
8947
8948         * marshal.c: Add support for BSTR marshalling
8949         using other COM systems.
8950
8951         Code is contributed under MIT/X11 license.
8952
8953 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
8954
8955         * object.c (mono_runtime_invoke_array): reverted previous
8956         commit as it breaks the build.
8957
8958 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
8959
8960         * object.c (mono_runtime_invoke_array): Verify arguments for
8961         invalid types. Fixes #348522.
8962
8963 2008-01-28 Rodrigo Kumpera  <rkumpera@novell.com>
8964
8965         * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
8966         non-final virtual calls using call. 
8967
8968         * verify.c (do_invoke): fixed some TODOs.
8969
8970         * verify.c (push_arg): set has_this_store for "ldarga 0".
8971
8972 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
8973
8974         * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
8975         which belong to an inflated class. Fixes #356531.
8976
8977 2008-01-26  Robert Jordan  <robertj@gmx.net>
8978
8979         * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
8980         which resort to FindFirstFile when a certain error condition
8981         (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
8982         Code is contributed under MIT/X11 license.
8983
8984 2008-01-24  Jonathan Chambers  <joncham@gmail.com>
8985
8986         * marshal.c (emit_marshal_string): Fix out string marshalling
8987         to use specified encoding. Fixes #323900.
8988
8989         Code is contributed under MIT/X11 license.
8990
8991 2008-01-24  Raja R Harinath  <harinath@hurrynot.org>
8992
8993         * class.c (mono_class_inflate_generic_method_full): Don't modify
8994         iresult->context after cache check.
8995
8996 2008-01-23  Zoltan Varga  <vargaz@gmail.com>
8997
8998         * class.c (mono_class_inflate_generic_method_full): Change the
8999         struct assignments to memcpy for better visibility and add some comments.
9000
9001 2008-01-23  Dick Porter  <dick@ximian.com>
9002
9003         * threads.c (mono_threads_set_shutting_down): Simplify shutdown
9004         procedure, and make it work on windows.
9005
9006 2008-01-22  Zoltan Varga  <vargaz@gmail.com>
9007
9008         * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
9009         a MonoReflectionTypeBuilder since it is always of that type.
9010
9011         * reflection.c (mono_type_get_object): Remove an unneccesary check.     
9012
9013         * reflection.c (mono_generic_class_get_object): Simplify this a bit.
9014
9015         * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
9016         
9017         * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
9018
9019         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
9020
9021         * reflection.c (mono_reflection_create_runtime_class): Remove already created
9022         instantiations from the type cache.
9023
9024 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9025
9026         * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
9027
9028         * verify.c (do_unbox_value): push a controled mutability managed pointer.
9029
9030 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9031
9032         * verify.c (do_ldstr): added, verifies if the #US token is valid.
9033
9034         * verify.c (mono_method_verify): removed old TODO
9035
9036 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9037
9038         * verify.c (do_newobj): add visibility check.
9039
9040 2008-01-21 Rodrigo Kumpera  <rkumpera@novell.com>
9041
9042         * verify.c (do_load_function_ptr): add visibility check.
9043
9044 2008-01-21  Massimiliano Mantione  <massi@ximian.com>
9045         *class.c:
9046         mono_generic_class_get_class: hook profiler events.
9047         mono_field_get_offset: added to support heap-shot in the new profiler.
9048         *class.h: exported mono_field_get_offset.
9049         * reflection.c:
9050         mono_reflection_setup_internal_class: hook profiler events.
9051
9052 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
9053
9054         * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions' 
9055         argument here too and use it to avoid checking for pending exceptions if 
9056         possible.
9057
9058 2008-01-20  Gert Driesen  <drieseng@users.sourceforge.net>
9059
9060         * assembly.c (build_assembly_name): add arg for passing the assembly
9061         flags. Do not consider a PublicKey with value "null" valid.
9062         (mono_assembly_name_parse_full): added boolean argument that will be
9063         set if the assembly name contains a PublicKeyToken spec. Added support
9064         for the Retargetable spec for which only Yes or No are allowed as valid
9065         value. Consider assembly name invalid if Retargetable spec is set, but
9066         either version, culture or public key (token) are not specified.
9067         * metadata-internals.h: sync signature of mono_assembly_name_parse_full
9068         with implementation in assembly.c.
9069         * icall.c (fill_reflection_assembly_name): also copy assembly flags
9070         from MonoAssemblyName.
9071         (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
9072         introduced argument for mono_assembly_name_parse_full to know if the
9073         assembly name has a PublicKeyToken spec, and if it has instruct
9074         fill_reflection_assembly_name to use default value for keyToken (if
9075         PublicKeyToken is null).
9076
9077 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
9078
9079         * verify.c (mono_method_verify): fixed ovf ops with
9080         float values. They are unverifiable now.
9081
9082 2008-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
9083
9084         * class.c (set_failure_from_loader_error): add BadImageException to the
9085         list of exceptions that can cause a type to fail to load.
9086
9087         * class.c (mono_class_get_exception_for_failure): same.
9088
9089 2008-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
9090
9091         * verify.c (in_any_exception_block): added, check if offset
9092         is part of any exception handling clause.
9093
9094         * verify.c (get_stack_type): added VAR and MVAR types.
9095
9096         * verify.c (do_stobj): better error messages.
9097
9098         * verify.c (do_cpobj): added, check cpobj.
9099
9100         * verify.c (do_initobj): added, check initobj.
9101
9102         * verify.c (do_sizeof): added, check sizeof.
9103
9104         * verify.c (do_localloc): added, check localloc.
9105
9106         * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
9107
9108 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
9109
9110         * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
9111         save_lmf/restore_lmf opcodes.
9112
9113         * threads.c (mono_threads_install_notify_pending_exc): New function to
9114         install a callback notifying the JIT there is a pending exception on a thread.
9115         (mono_thread_request_interruption): Call the new callback.
9116         (mono_thread_get_and_clear_pending_exception): New function to return the
9117         exception pending on a thread.
9118
9119         * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
9120         to turn off checking for pending exceptions.
9121         (mono_marshal_get_native_wrapper): Ditto.
9122
9123 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
9124
9125         * threads-types.h: Get rid of the unnecessary extern declarations.
9126
9127 2008-01-16  Gert Driesen  <drieseng@users.sourceforge.net>
9128
9129         * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
9130         return field from parent class if not private.
9131         (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
9132         returns fields from parent class if they are not private.
9133         (method_nonpublic): added function to determine if a given method
9134         should be considered non-public. Returns false for private methods
9135         on parent class, and internal methods from parent on the 1.0 profile.
9136         (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
9137         use method_nonpublic function to determine whether method should be
9138         returned.
9139         (property_accessor_public): use newly introduced method_nonpublic
9140         function to determine whether accessor is non-public. 
9141         (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
9142         event from parent class if not private. Only return static event if
9143         Static flag is set, and only return static event from parent class if
9144         FlattenHierarchy flag is set.
9145         (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
9146         include non-private events from parent class.
9147
9148 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
9149
9150         * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
9151         warning.
9152
9153 2008-01-16  Wade Berrier <wberrier@novell.com>
9154
9155         * security.c: Add assembly.h header to appease some warnings
9156
9157 2008-01-16  Dick Porter  <dick@ximian.com>
9158
9159         * process.c (process_module_string_read): Remove trailing null
9160         when saving string.
9161
9162 2008-01-16  Mark Probst  <mark.probst@gmail.com>
9163
9164         * class-internals.h: A new data structure describing the layout of
9165         a runtime generic context (MonoRuntimeGenericContextTemplate).
9166
9167         * metadata-internals.h: Added a hash table to MonoDomain that maps
9168         from open generic classes to their runtime generic context
9169         templates.
9170
9171         * object.c: Building of the runtime generic context, including
9172         proper handling of generic type arguments of superclasses.
9173         Building of the runtime generic context according to the template.
9174
9175 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
9176
9177         * class.c (mono_class_setup_fields): Set field.count for generic instances.
9178         Fixes #350856.
9179
9180         * image.c (do_mono_image_open): Pass TRUE as last_exists to 
9181         mono_portability_find_file (). Fixes #325466.
9182         (mono_image_get_public_key): Fix a warning.
9183
9184 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
9185
9186         * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
9187         Fixes #353550.
9188         (mono_class_from_name_case): Ditto.
9189
9190 2008-01-13  Eyal Alaluf <eyala@mainsoft.com>
9191
9192         * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
9193           common storage for the tables used in the System/NumberFormatter class.
9194
9195 2008-01-13  Zoltan Varga  <vargaz@gmail.com>
9196
9197         * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
9198
9199 2008-01-11  Rodrigo Kumpera  <rkumpera@novell.com>
9200
9201         * verify.c (get_boxable_mono_type): check if the token is valid.
9202
9203         * verify.c (set_stack_value): changed to add an error if an
9204         invalid type is set on stack. Changed all callers due to signature change.
9205
9206         * verify.c (do_stobj): implement stobj validation.
9207
9208 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
9209
9210         * reflection.c (reflection_methodbuilder_to_mono_method): No need to
9211         set container->is_method, it was set earlier.
9212
9213         * metadata.c (type_in_image): Handle MVARs which belong to not finished
9214         generic methods.
9215
9216         * reflection.c (mono_reflection_initialize_generic_parameter): Set
9217         is_method of the generic container to TRUE for methods.
9218
9219 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
9220
9221         * metadata.c (type_in_image): Handle type parameters properly.
9222
9223         * class-internals.h (MonoGenericParam): Add an 'image' argument to track
9224         memory ownership of this structure.
9225
9226 2008-01-10  Rodrigo Kumpera  <rkumpera@novell.com>
9227
9228         * verify.c (get_boxable_mono_type): make typedref types been just
9229         unverifiable. check for void type.
9230
9231         * verify.c (do_unbox_any): added, verify opcode unbox.any.
9232
9233         * verify.c (do_load_function_ptr): accept method spec tokens.
9234
9235 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
9236
9237         * marshal.c (mono_class_native_size): Always set *align even if this is called
9238         recursively.
9239
9240 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
9241
9242         * verify.c (mono_verify_corlib): Remove this as it was not used and was 
9243         out-of-date.
9244
9245 2008-01-09  Rodrigo Kumpera  <rkumpera@novell.com>
9246
9247         * verify.c: removed some old unused tables. A huge bunch of small fixes
9248         to things found while testing the verifier with mono basic.
9249
9250         * verify.c (dump_stack_value): dump null literal flag to.
9251
9252         * verify.c (verify_type_compatibility_full): fix comparison
9253         for types that have a generic super type.
9254
9255         * verify.c (verify_stack_type_compatibility): fix compatibility
9256         between null literals and reference types. fix compatibility between
9257         boxed valuetypes and object. fix corner case test for enums.
9258
9259         * verify.c (do_cmp_op): proper verification of cgt.un in case
9260         of reference types.
9261
9262         * verify.c (do_invoke_method): fix error message.
9263
9264         * verify.c (do_store_indirect
9265
9266         * verify.c (check_is_valid_type_for_field_ops): proper verification
9267         of managed pointers to valuetypes and boxed valuetypes. proper verification
9268         of null literals.
9269
9270         * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
9271         allow token to be a reference type.
9272
9273         * verify.c (do_cast): proper handling of boxes valuetypes.
9274
9275         * verify.c (do_stelem): proper handling of storing a boxed valuetype
9276         in object[].
9277
9278         * verify.c (mono_method_verify): pass the opcode to do_cmp_op
9279         to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
9280         fixed the decoding of unbox_any
9281
9282 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
9283
9284         * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
9285
9286 2008-01-08  Rodrigo Kumpera  <rkumpera@novell.com>
9287
9288         * verify.c (do_newobj): do delegate verification.
9289
9290         * verify.c (verify_delegate_compatibility): perform delegate
9291         verification.
9292
9293         * verify.c (verify_ldftn_delegate): perform tests related to
9294         ldftn delegates.
9295
9296         * verify.c (mono_delegate_signature_equal): perform the
9297         slightly diferent signature comparison required by delegates.
9298
9299         * metadata.c (mono_metadata_type_equal_full): added and exported
9300         as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
9301         allows signature only comparison.
9302
9303         * metadata-internal.h (mono_metadata_type_equal_full): added and exported
9304         as MONO_INTERNAL.
9305
9306 2008-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
9307
9308         * verify.c: added a bunch of stack_slot_* functions to
9309         make access to stack slot type easier. This is required to
9310         allow optional flags, like null literal, boxed value and
9311         this pointer.
9312         All access paths to IlStackDesc::stype have been changed 
9313         to use these new funcions.
9314         Removed a bunch of unused functions and cleared all warnings.
9315         This patch introduces the usage of the this pointer and 
9316         boxed value flags.
9317
9318 2008-01-07  Zoltan Varga  <vargaz@gmail.com>
9319
9320         * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
9321
9322 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
9323
9324         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
9325         match managed version.
9326
9327         * appdomain.c: Bump corlib version.
9328         
9329         * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
9330         argument.
9331
9332 2008-01-06  Gert Driesen  <drieseng@users.sourceforge.net>
9333
9334         * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
9335         Set public key token to zero-length byte array if assembly is not
9336         strongnamed.
9337
9338 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
9339
9340         * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
9341         writing a vtype array elem.
9342
9343 2007-01-05  Gert Driesen  <drieseng@users.sourceforge.net>
9344
9345         * assembly.c (build_assembly_name): return FALSE if length of token is
9346         not 16 (if not "null").
9347         (mono_assembly_name_parse_full): return FALSE if value of version,
9348         culture, token or key is 0.
9349         * icall.c (fill_reflection_assembly_name): add boolean arguments to
9350         specify whether public key and public key token must be set to default
9351         value (zero-length byte array) if not available. Set versioncompat to
9352         SameMachine. If public key is available or the default is set, then
9353         set PublicKey flag.
9354         (ves_icall_System_Reflection_Assembly_FillName): if no public key
9355         is available, use empty byte array as default value. On the 2.0
9356         profile, use default value for public key token if not set.
9357         (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
9358         profile, use default value for public key if not set. On the 2.0
9359         profile, use default value for public key token if not set.
9360         (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
9361         default values for public key and public key token.
9362
9363 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
9364
9365         * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
9366         field to keep it in synch with the managed object.
9367
9368         * marshal.c (emit_marshal_object): Add support for byref marshalling of
9369         delegates. Fixes #351520.
9370
9371         * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
9372         contains defined memory.
9373         
9374         * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
9375
9376         * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
9377         
9378         * sgen-gc.c (check_consistency): New helper function to do a consistency check
9379         of the GC data structures.
9380
9381         * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
9382
9383         * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
9384         
9385         * object.c (mono_array_full_copy): Fix detection of whenever to use a write
9386         barrier.
9387         (mono_array_clone_in_domain): Ditto.
9388         (mono_array_clone_in_domain): Ditto.
9389
9390         * threads.c (start_wrapper): Register the thread start argument as a GC root.
9391         (cache_culture): Use a write barrier.
9392
9393         * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
9394         (ves_icall_get_property_info): Ditto.
9395
9396         * object.h (MONO_STRUCT_SETREF): New macro.
9397
9398         * class-internals.h (MonoStats): Add some GC statistics.
9399
9400         * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
9401
9402 2008-01-04  Andreas Faerber  <andreas.faerber@web.de>
9403
9404         * exception.c (mono_exception_from_name_two_strings):
9405         Break from loop after method is found.
9406
9407 2008-01-04  Dick Porter  <dick@ximian.com>
9408
9409         * process.c (process_module_string_read): Rename variable to
9410         reflect correct usage, after fixing bug 345972.
9411
9412 2008-01-03  Rodrigo Kumpera  <rkumpera@novell.com>
9413
9414         * verify.c (mono_type_create_fnptr_from_mono_method): 
9415         created a MonoType function pointer instance to be used during
9416         verification. The verifier releases this memory at end.
9417
9418         * verify.c (mono_method_is_constructor): extracted repeated
9419         checks for constructor into a single class.
9420
9421         * verify.c (do_push_field): use new extracted method
9422         for constructor check.
9423
9424         * verify.c (do_newobj): same.
9425
9426         * verify.c (do_ldftn): renamed to do_load_function_ptr
9427         and make it verify ldvirtftn too.
9428
9429         * verify.c (mono_method_verify: proper verification
9430         of ldvirtftn. release created MonoMethod instances.
9431
9432 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
9433
9434         * verify.c (token_bounds_check): added.
9435
9436         * verify.c (do_ldftn): added.
9437
9438         * verify.c (mono_method_verify): proper verificartion of ldftn.
9439
9440 2007-12-31  Rodrigo Kumpera  <rkumpera@novell.com>
9441
9442         * metadata.c (mono_metadata_decode_row): Assert if index is bigger
9443         than the table row count. It's the resposibility of the caller to
9444         make the bounds check and raise the correct error.
9445
9446         * metadata.c (mono_metadata_decode_row_col): Same.
9447
9448         * loader.c (mono_get_method_from_token): perform bounds check
9449         on token for methoddef table.
9450
9451 2007-12-29  Miguel de Icaza  <miguel@novell.com>
9452
9453         * icall.c
9454         (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
9455         assert into a negative result, the managed code already coped with
9456         that.
9457
9458         Some folks on Windows reported this error. 
9459
9460 2007-12-28  Gert Driesen  <drieseng@users.sourceforge.net>
9461
9462         * appdomain.c: Bump corlib version.
9463         * icall.c:
9464         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
9465         CultureInfo.CreateCulture to create CultureInfo for name.
9466         (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
9467         create CultureInfo for name. Fixes bug #347174.
9468
9469 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
9470
9471         * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
9472         flags.
9473
9474         * verify.c (is_valid_branch_instruction): allow branching to the
9475         first instruction of the protected block.
9476
9477         * verify.c (is_valid_cmp_branch_instruction): same.
9478
9479         * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
9480         avoid double initialization.
9481
9482         * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
9483         detect which cases the eval stack should just be copied.
9484
9485         * verify.c (mono_method_verify): check if the eval stack
9486         is empty when entering a protected block.
9487
9488 2007-12-27  Rodrigo Kumpera  <rkumpera@novell.com>
9489
9490         * verify.c: added is_clause_in_range, is_clause_inside_range,
9491         is_clause_nested and verify_clause_relationship. They perform
9492         the verifications stated in P1 12.4.2.7.
9493
9494         * verify.c (mono_method_verify): remove some unused variables,
9495         add the new exception clause checks, add instruction border
9496         checks for protected block start/end, improved some error 
9497         messages and fixed a bug in the way invalid instruction access
9498         is detected.
9499
9500 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
9501
9502         * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
9503         from GC 7.0 if available.
9504
9505         * object.c: Remove an unused define.
9506         
9507         * object.c (mono_class_compute_gc_descriptor): Fix a warning.
9508
9509         * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
9510
9511         * null-gc.c (mono_gc_make_descr_for_array): Implement.
9512
9513         * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
9514
9515         * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
9516         to take the same arguments as the other make_descr functions.
9517
9518         * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
9519
9520         * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
9521         directly.
9522
9523         * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
9524         mini.c.
9525
9526         * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc () 
9527         call to boehm-gc.c.
9528
9529         * boehm-gc.c (mono_gc_register_root): Fix a warning.
9530
9531         * null-gc.c (mono_gc_register_root): Fix a warning.
9532
9533         * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
9534
9535         * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
9536         (mono_gc_base_init): Call GC_init ().
9537
9538         * null-gc.c: Define mono_gc_register_root () as a no-op.
9539
9540         * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
9541
9542 2007-12-24  Rodrigo Kumpera  <rkumpera@novell.com>
9543
9544         * verify.c: add prototype for merge_stacks at top
9545
9546         * verify.c (do_switch): added.
9547
9548         * verify.c (merge_stacks): on some cases the stack merging
9549         was not happening properly. Unequal stack sizes at merge
9550         points should be invalid.
9551
9552         * verify.c (mono_method_verify): added more debug info on stack state.
9553         verify switch properly.
9554
9555 2007-12-24  Zoltan Varga  <vargaz@gmail.com>
9556
9557         * method-builder.h: New file, moved the mono_mb_ declarations here from 
9558         marshal.h.
9559
9560         * boehm-gc.c marshal.c: Include method-builder.h.
9561
9562         * marshal.c: Use mono_mb_emit_branch_label () in a few places.
9563
9564         * marshal.c: Remove some code which is now in method-builder.c.
9565
9566 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
9567
9568         * method-builder.c: New file, extraction of the method builder functionality 
9569         from marshal.c.
9570
9571         * marshal.c: Move the mb functions into method-builder.c.
9572
9573         * marshal.h marshal.c: Export some mono_mb_... functions.
9574
9575         * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
9576
9577         * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
9578         the caller.
9579
9580         * class.c (mono_class_get_full): Check the token type in the dynamic case.
9581
9582         * loader.c (mono_field_from_token): Ditto.      
9583
9584         * loader.c (mono_get_method_from_token): Change the check so it checks memberref
9585         type as well.
9586         
9587         * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
9588         Fixes #342565.
9589
9590         * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
9591         a helper function for setting it.
9592
9593         * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
9594
9595         
9596         * assembly.c: Significally simplify code now that referenced assemblies are 
9597         loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
9598
9599         * threads.h: Don't include  the internal threads-types.h header file. Fixes
9600         #349952.
9601
9602 2007-12-21  Rodrigo Kumpera  <rkumpera@novell.com>
9603
9604         * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
9605         instructions that were target of branches or are at protected block boundaries.
9606
9607         * verify.c (in_same_block): handle filter clauses.
9608
9609         * verify.c (is_valid_branch_instruction): added. checks the target of
9610         instructions br or brtrue/false.
9611
9612         * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
9613         binary branch instructions such as beq and bge.
9614
9615         * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
9616         and made it pin the instruction as been part of the exception block.
9617
9618         * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
9619         of in_same_block.
9620
9621         * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
9622         of in_same_block.
9623
9624         * verify.c (do_ret): ret from a protected block is unverifiable and
9625         not invalid.
9626
9627         * verify.c (do_static_branch): verify br and br.s instructions.
9628
9629         * verify.c (merge_stacks): add extra param to support detection
9630         of branches in the middle of instructions.
9631         
9632         * verify.c (mono_method_verify): verify branches and exception blocks
9633         that target the middle of instructions. Proper verification of br and br.s.
9634
9635 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
9636
9637         * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
9638         skip_visibility field.
9639         (reflection_methodbuilder_from_dynamic_method): Ditto.
9640
9641         * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
9642         registrations. Fixes #348193.
9643
9644         * threads.h: Move the internal mono_thread_get_pending_exception () to
9645         threads-types.h and rename it to mono_thread_get_undeniable_exception ().
9646
9647 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
9648
9649         * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
9650         icall registration. Fixes #348193.
9651
9652         * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
9653         for corlib classes into object. Fixes #349621.
9654
9655 2007-12-20  Gert Driesen  <drieseng@users.sourceforge.net>
9656
9657         * icall.c (property_accessor_nonpublic): new function to determine
9658         whether an accessor allows a property to be considered non-public.
9659         Returns false for private accessor(s) from parent class, and internal
9660         accessor(s) from parent on 2.0 profile (and higher).
9661         (ves_icall_Type_GetPropertiesByName): Use newly introduced function
9662         to determine whether property should be included if NonPublic flag
9663         is set. Fixes bug #349078.
9664
9665 2007-12-20  Rodrigo Kumpera  <rkumpera@novell.com>
9666
9667         * verify.c (init_stack_with_value): added.
9668
9669         * verify.c (mono_method_verify): extracted common
9670         code for exception initialization into init_stack_with_value.
9671
9672         * verify.c (mono_method_verify): initialize the exception
9673         for handler clauses as well.
9674
9675         * verify.c (mono_method_verify): fix the exception clause
9676         ordering rules, it should use handler end offset and not
9677         start offset.
9678
9679 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
9680
9681         * rawbuffer.c: remove useless warning.
9682
9683 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
9684
9685         * threads.h, threads-types.h: move functions to the correct header
9686         (fixes bug#349952).
9687
9688 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
9689
9690         * verify.c (mono_method_verify): proper verification
9691         of exception handling clauses ranges and fallthru in
9692         and out of protected blocks.
9693
9694 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
9695
9696         * verify.c (mono_method_verify): fixed compilation issue.
9697
9698 2007-12-19  Rodrigo Kumpera  <rkumpera@novell.com>
9699
9700         * verify.c (mono_method_verify): a printf slipped in, changed
9701         to use verifier debug macro.
9702
9703 2007-12-18  Rodrigo Kumpera  <rkumpera@novell.com>
9704
9705         * verify.c (is_correct_leave): check for filter clauses.
9706
9707         * verify.c (do_filter): added.
9708
9709         * verify.c (mono_method_verify): property verification of leave.
9710
9711
9712 2007-12-18  Mark Probst  <mark.probst@gmail.com>
9713
9714         * threads.c: Disable calls to _wapi_thread_signal_self() to fix
9715         Win32 build, until we figure out how to do the proper thing on
9716         Win32.
9717
9718 2007-12-17  Zoltan Varga  <vargaz@gmail.com>
9719
9720         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
9721         by the previous patch.
9722         
9723         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
9724         the assembly resolve handler for refonly assemblies.
9725
9726 2007-12-17  Mark Probst  <mark.probst@gmail.com>
9727
9728         * threads.c, thread-types.h, icall.c: New shutdown safeguards.
9729         Make sure only one thread is allowed to commence shutdown, and
9730         don't allow new threads to be started once shutdown is in
9731         progress.
9732
9733 2007-12-14  Rodrigo Kumpera  <rkumpera@novell.com>
9734
9735         * verify.c (is_correct_endfilter): added.
9736
9737         * verify.c (is_unverifiable_endfilter): added.
9738
9739         * verify.c (do_endfilter): added.
9740
9741         * verify.c (mono_method_verify): property verification of endfilter
9742         and fixed a corner case or endfinally.
9743
9744 2007-12-13  Rodrigo Kumpera  <rkumpera@novell.com>
9745
9746         * verify.h: new flags to support fail fast of unverifiable code and
9747         do non-strict verification. Non-strict verification is required to
9748         have MS runtime compatibility. There are a huge amount of unverifiable
9749         code that it accepts as verifiable. The strict mode verifies the code
9750         as the specs says.
9751         Non-strict mode will be required in cases where code needs to be
9752         accepted as verifiable but fails under strict mode.
9753
9754         * pedump.c: added support to fail fast and non-strict verification.
9755
9756         * verify.c: added support for both fail fast and non-strict verification.
9757
9758 2007-12-12  Rodrigo Kumpera  <rkumpera@novell.com>
9759
9760         * verify.c (is_correct_endfinally): added.
9761
9762         * verify.c (mono_method_verify): property verification of endfinally.
9763
9764 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
9765
9766         * verify.c (in_any_block): check for filter clauses.
9767
9768         * verify.c (is_correct_rethrow): added.
9769
9770         * verify.c (mono_method_verify): property verification of rethrow.
9771
9772         * metadata.h: added MONO_OFFSET_IN_FILTER macro.
9773
9774 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
9775
9776         * verify.c (do_throw): added.
9777
9778         * verify.c (mono_method_verify): property verification of throw
9779
9780 2007-12-11  Zoltan Varga  <vargaz@gmail.com>
9781
9782         * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
9783         assemblies. Fixes #346425.
9784
9785 2007-12-10  Zoltan Varga  <vargaz@gmail.com>
9786
9787         * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
9788         FieldBuilders.
9789
9790         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
9791
9792         * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
9793         prevent asserts when this is called with a token which might not be valid.
9794
9795         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
9796         lookup_dynamic_token_class with valid_token == FALSE.
9797
9798         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.       
9799
9800         * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
9801
9802         * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
9803         
9804 2007-12-10  Mark Probst  <mark.probst@gmail.com>
9805
9806         * gc.c: Don't delay threadpool thread finalization unless Mono is
9807         shutting down.
9808
9809 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9810
9811         * threads.c: turn an assert into a non-fatal warning.
9812
9813 2007-12-09  Robert Jordan  <robertj@gmx.net>
9814
9815         * icall.c (GetVirtualMethod): Add missing argument validation.
9816
9817 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
9818
9819         * verify.c (do_cast): added.
9820
9821         * verify.c (mono_method_verify): property verification of castclass and isinst.
9822
9823
9824 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
9825
9826         * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
9827
9828         * verify.c (do_stelem): added.
9829
9830         * verify.c (mono_method_verify): property verification of stelem.X.
9831
9832 2007-12-07  Mark Probst  <mark.probst@gmail.com>
9833
9834         * class.c, class-internals.h: Introduce an environment variable
9835         (MONO_GENERIC_SHARING) through which the extent of generic code
9836         sharing can be controlled (share all classes, share only corlib
9837         classes, or share nothing).
9838
9839         * object.c: Only create runtime generic context for classes for
9840         which sharing is enabled.
9841
9842 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
9843
9844         * verify.c (do_ldelem): refactor it to work with ldelem.any.
9845
9846         * verify.c (mono_method_verify): property verification of ldelem.any.
9847
9848 2007-12-06  Rodrigo Kumpera  <rkumpera@novell.com>
9849
9850         * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
9851         added ldelem.X opcodes.
9852
9853         * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
9854
9855         * verify.c: proper verification of ldelem.X 
9856
9857 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
9858
9859         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
9860
9861 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
9862
9863         * verify.c (mono_method_verify): null literal requires special handling,
9864         the value pushed on stack need to be flagged as so.
9865
9866         * verify.c (do_ldelema): Verify ldelema properly.
9867
9868 2007-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
9869
9870         * verify.c: Verify ldlen properly.
9871
9872 2007-12-05  Zoltan Varga  <vargaz@gmail.com>
9873
9874         * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
9875         to the target object's type. Fixes #346160.
9876
9877 2007-12-05  Dick Porter  <dick@ximian.com>
9878
9879         * threadpool.c (socket_io_add_poll): Asynchronous connect() on
9880         Solaris needs the same workaround as BSD-derived systems.  Fixes
9881         bug 323524, patch by Burkhard Linke
9882         <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
9883
9884 2007-12-04  Gert Driesen  <drieseng@users.sourceforge.net>
9885
9886         * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
9887         handle to use when error dialog is shown; otherwise, update mask
9888         to show no error dialog when an error occurs.
9889
9890 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
9891
9892         * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
9893
9894         * class.c (mono_class_get_field_default_value): New helper function to initialize
9895         field->def_type and field->data.
9896
9897 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
9898
9899         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
9900         the general one.
9901
9902         * object.c (mono_runtime_create_delegate_trampoline): New helper function.
9903
9904         * marshal.c: Avoid depending on delegate->method_info being set.
9905
9906         * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
9907         
9908         * object.c (mono_delegate_ctor): Set delegate->method.
9909
9910         * object-internals.h (struct _MonoDelegate): Add 'method' field.
9911
9912         * appdomain.c: Bump corlib version.
9913
9914 2007-11-27  Raja R Harinath  <harinath@gmail.com>
9915
9916         * metadata.c (mono_generic_inst_equal_full): Short-circuit
9917         equality check if we're comparing canonicalized MonoGenericInsts.
9918
9919 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
9920
9921         * class.c (generic_array_methods): Call mono_class_setup_methods () before
9922         accessing class->methods.
9923
9924 2007-11-22  Dick Porter  <dick@ximian.com>
9925
9926         * threads.c: Ensure that the synch_cs is set before trying to use
9927         it.
9928
9929 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
9930
9931         * profiler.c: r89126 broke the statistial profiler, unbreak.
9932
9933 2007-11-22  Martin Baulig  <martin@ximian.com>
9934
9935         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
9936
9937         * mono-debug.c
9938         (mono_debug_debugger_version): Bump to 3.
9939         (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
9940         -> mono_debugger_class_initialized().
9941
9942         * mono-debug-debugger.c
9943         (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
9944
9945         * class.c
9946         (mono_debugger_start_class_init_func): Removed.
9947         (mono_debugger_class_loaded_methods_func): Added.
9948         (mono_class_setup_methods): Call it here.
9949
9950 2007-11-22  Martin Baulig  <martin@ximian.com>
9951
9952         * mono-debug.c
9953         (mono_debug_add_delegate_trampoline): New public method.
9954         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
9955
9956         * mono-debug.h
9957         (MonoSymbolTable): Added `global_data_table'.
9958         (MonoDebuggerTypeKind): Removed.
9959
9960 2007-11-21  Zoltan Varga  <vargaz@gmail.com>
9961
9962         * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
9963         these methods.
9964
9965         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9966         
9967 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
9968
9969         * object.c: some fields don't have a valid rva: ignore them (bug #343083).
9970
9971 2007-11-20  Martin Baulig  <martin@ximian.com>
9972
9973         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
9974
9975         * mono-debug-debugger.c
9976         (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
9977         (mono_debugger_remove_breakpoint): Likewise.
9978         (mono_debugger_check_breakpoints): Likewise.
9979         (mono_debugger_register_class_init_callback): New public method.
9980         (mono_debugger_remove_class_init_callback): Likewise.
9981         (mono_debugger_add_type): Likewise.
9982
9983         * mono-debug-debugger.h
9984         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
9985
9986 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
9987
9988         * class.c: more interface implementations needed for the
9989         array enumerator (fixes bug #341112).
9990
9991 2007-11-18  Gert Driesen  <drieseng@users.sourceforge.net>
9992
9993         * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
9994         fix ParamName of ArgumentNullExceptions.
9995
9996 2007-11-17  Miguel de Icaza  <miguel@novell.com>
9997
9998         * reflection.c (mono_reflection_encode_sighelper): Generate the
9999         modopts and modreqs.   I have a useless test that crashes monodis,
10000         but that shows the code working.
10001
10002 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
10003
10004         * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
10005         (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
10006
10007 2007-11-15  Dick Porter  <dick@ximian.com>
10008
10009         * threads.c (ves_icall_System_Threading_Thread_Join_internal):
10010         When joining a thread, it's the thread that's calling Join that
10011         gets WaitSleepJoin state not the target.  Fixes the standalone
10012         test case in bug 334740, and hopefully the whole bug too.
10013
10014 2007-11-15  Dick Porter  <dick@ximian.com>
10015
10016         * process.c: Read file version info from the files pointed at by
10017         process modules, not the current process.  Fixes bug 315969.
10018
10019         Use windows typedef names in some places to fix warnings on the
10020         windows build.
10021
10022 2007-11-15  Mark Probst  <mark.probst@gmail.com>
10023
10024         * image.c, metadata-internals.h: Added a generic_class_cache hash
10025         to MonoImage for looking up generic classes when sharing generics.
10026
10027 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10028
10029         * sgen-gc.c: warning cleanups.
10030
10031 2007-11-15  Zoltan Varga  <vargaz@gmail.com>
10032
10033         * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
10034         inherited properties.
10035
10036 2007-11-14  Mark Probst  <mark.probst@gmail.com>
10037
10038         * object.c, class-internals.h: Added more information to the
10039         runtime generic context.
10040
10041 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
10042
10043         * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
10044         instead of just the target method. Generalize the abstract method handling to
10045         handle any non-static method.
10046
10047         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10048         mono_marshal_get_delegate_invoke () signature change.
10049
10050 2007-11-13  Mark Probst  <mark.probst@gmail.com>
10051
10052         * class.c, class-internals.h: Made
10053         mono_type_get_basic_type_from_generic () public.  Fixed member
10054         access check for shared generics.
10055
10056         * loader.c: Don't insert field into field cache if it's part of a
10057         non-inflated generic class.
10058
10059         * domain.c, domain-internals.h: The generic sharing context is now
10060         part of the jit info data structure.  Added two accessor
10061         functions.
10062
10063 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
10064
10065         * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
10066         the array Get/Set/Address methods, since the JIT inlines them.
10067
10068         * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
10069
10070         * image.c (mono_image_close): Free runtime_invoke_direct_cache.
10071         (mono_image_init): Initialize runtime_invoke_direct_cache.      
10072
10073         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
10074         mono_marshal_get_delegate_invoke signature change.
10075
10076         * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
10077         an additional argument. Add support for invoking abstract methods.
10078
10079         * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
10080
10081         * image.c (mono_image_close): Free delegate_abstract_invoke_cache.      
10082
10083 2007-11-09  Mark Probst  <mark.probst@gmail.com>
10084
10085         * class.c: Do field layout for open generic classes as well.
10086
10087 2007-11-09  Mark Probst  <mark.probst@gmail.com>
10088
10089         * gc.c, gc-internal.h: Don't finalize threadpool threads with
10090         other objects, because the threadpool is still around.  Put them
10091         in a list instead and after finalizing all other objects in the
10092         root domain shut down the thread pool and then finalize the
10093         threads.  Fixes bug #337383.
10094
10095         * threads.c, thread-types.h: New mono_thread_create_internal()
10096         function for marking a thread with the threadpool flag before it
10097         started.  Set synch_cs to NULL after freeing it.
10098
10099         * threadpool.c: Mark threadpool threads before they start.
10100
10101 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10102
10103         * reflection.h, reflection.c: don't export random functions
10104         and lazy load dbnull and missing objects.
10105
10106 2007-11-07  Jonathan Chambers <joncham@gmail.com>
10107
10108         * class.c: Initialize COM types if COM interfaces
10109         are present (not just COM classes).
10110         
10111         Code is contributed under MIT/X11 license.
10112
10113 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
10114         * reflection.c:
10115         create_dynamic_mono_image: hook module profiler events (dynamic case).
10116         mono_image_basic_init: hook assembly profiler events (dynamic case).
10117
10118 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
10119         * profiler.c:
10120         simple_appdomain_unload: completely terminate the profiler
10121         instead of only processing the statistical samples.
10122         simple_shutdown: make sure this is really called exactly once,
10123         even in multithreaded applications, and always listen to
10124         appdomain events.
10125         * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
10126         here, the "[un]load" functions will do it.
10127         Fixes bugs #333791 and #325261.
10128
10129 2007-11-07  Geoff Norton  <gnorton@novell.com>
10130
10131         * socket-io.c:  Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
10132         rather than depend on __APPLE__.
10133
10134 2007-11-07  Mark Probst  <mark.probst@gmail.com>
10135
10136         * icall.c: Safety checks in InitializeArray.  Fixes bug #324535.
10137
10138 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com> 
10139
10140         * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
10141         UTF16 MonoString. Fix the crash from bug #335488
10142
10143 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
10144
10145         * marshal.c: Correct (for non-Win32 OS) length != size in 
10146         mono_string_from_bstr. Fix #339530.
10147
10148 2007-11-06  Geoff Norton  <gnorton@novell.com>
10149
10150         * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
10151         to succeed
10152
10153 2007-11-05  Kornél Pál  <kornelpal@gmail.com>
10154
10155         * process.c: Added run-time GetProcessId API detection for Windows.
10156
10157 2007-11-04  Miguel de Icaza  <miguel@novell.com>
10158
10159         * reflection.c  (mono_param_get_objects): If a parameter has the
10160         attribute [System.Runtime.InteropServices.Optional] we should
10161         set the DefaultValue of the ParameterInfo to be
10162         System.Reflection.Missing instead of DBNull.
10163
10164         See bug #339013.
10165
10166         (mono_get_reflection_missing_object): New method,
10167         returns the System.Reflection.Missing.Value singleton instance.
10168
10169 2007-11-03  Atsushi Enomoto  <atsushi@ximian.com>
10170
10171         * culture-info-table.h : regenerated.
10172
10173 2007-11-02  Jonathan Chambers <joncham@gmail.com>
10174
10175         * icall.c: Use GetEnvironmentStrings on windows
10176         so we are using the same environment block as 
10177         GetEnvironmentVariable/SetEnvironmentVariable. Fixes
10178         #333740.
10179         
10180         Code is contributed under MIT/X11 license.
10181
10182 2007-10-31  Martin Baulig  <martin@ximian.com>
10183
10184         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
10185
10186         * mono-debug-debugger.h
10187         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
10188
10189 2007-10-30  Zoltan Varga  <vargaz@gmail.com>
10190
10191         * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated 
10192         classes.
10193
10194 2007-10-30  Atsushi Enomoto  <atsushi@ximian.com>
10195
10196         * culture-info-table.h : regenerated.
10197
10198 2007-10-30  Robert Jordan  <robertj@gmx.net>
10199
10200         * icall-def.h, icall.c:
10201         Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
10202
10203         Code is contributed under MIT/X11 license.
10204
10205 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
10206
10207         * class.c (mono_class_setup_vtable): Find the inflated methods in the
10208         inflated class instead of inflating them again.
10209         
10210         * class.c (mono_class_setup_vtable): Inflate the override methods in the 
10211         dynamic case.
10212
10213         * class.c (mono_generic_class_get_class): Set klass->property.count as well.
10214         Call setup_supertypes () after klass->parent is set.
10215         (mono_class_setup_properties): Enable this to work on dynamic generic classes.
10216
10217         * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
10218         for inflated instances of not yet created dynamic generic classes.
10219         (ctorbuilder_to_mono_method): Handle the case when this is called multiple
10220         times from inflated_method.
10221         (methodbuilder_to_mono_method): Ditto.
10222
10223 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
10224
10225         * gc.c: code cleanup and removed old untested option of not creating the
10226         finalizer thread.
10227
10228 2007-10-29  Zoltan Varga  <vargaz@gmail.com>
10229
10230         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
10231         creating a jump trampoline for dynamic methods.
10232
10233 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
10234
10235         * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
10236         generic TypeBuilders when called from another method of the same type (bug #335131).
10237
10238
10239 2007-10-27  Zoltan Varga  <vargaz@gmail.com>
10240
10241         * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
10242         doesn't seem to work perfectly.
10243         
10244         * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
10245         called multiple times.
10246         (methodbuilder_to_mono_method): Ditto.
10247         (resolve_object): Inflate FieldBuilder's.
10248
10249 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10250
10251         * string-icalls.c, string-icalls.h, appdomain.c: patch from
10252         Tyler Larson <mono-devel@tlarson.com> to fix the handling of
10253         RemoveEmptyEntries in the string.Split implementation (bug #322375).
10254
10255 2007-10-26  Dick Porter  <dick@ximian.com>
10256
10257         * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
10258         Thread initialisation changes
10259
10260 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
10261
10262         * verify.c: fix compatibility check between arrays and System.Array
10263
10264 2007-10-26  Zoltan Varga  <vargaz@gmail.com>
10265
10266         * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
10267         too. Fixes #336999.
10268
10269 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
10270
10271         * object.c (mono_value_box): Use typed allocation here.
10272
10273 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
10274
10275         * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
10276         trampoline instead of compiling the method right away.
10277
10278         * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
10279
10280 2007-10-21  Zoltan Varga  <vargaz@gmail.com>
10281
10282         * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
10283         related fields for dynamic classes. Fixes #334493.
10284
10285 2007-10-20  Zoltan Varga  <vargaz@gmail.com>
10286
10287         * class.c (mono_generic_class_get_class): Set klass->field.count as well.
10288         
10289         * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
10290
10291         * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
10292         (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
10293
10294         * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
10295
10296         * reflection.c (create_generic_typespec): Initialize klass->generic_container
10297         if needed.
10298         (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
10299
10300 2007-10-18  Jonathan Chambers <joncham@gmail.com>
10301
10302         * marshal.c: Use correct key when removing item
10303         from ccw_hash.
10304         
10305         Code is contributed under MIT/X11 license.
10306
10307 2007-10-17  William Holmes  <billholmes54@gmail.com>
10308
10309         *marshal.c: Adding a case to marshal booleans to U1
10310
10311         Code is contributed under MIT/X11 license.
10312
10313 2007-10-18  Zoltan Varga  <vargaz@gmail.com>
10314
10315         * class.c (mono_class_from_name): Search the modules compromising dynamic
10316         assemblies. Fixes #331601.
10317
10318 2007-10-16  Zoltan Varga  <vargaz@gmail.com>
10319
10320         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
10321         exception if the type name contains an assembly component. Fixes #334203.
10322
10323         * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
10324         modules inside dynamic assemblies. Fixes #334200.
10325         
10326         * reflection.c: Set image->public_key and image->public_key_length;
10327
10328         * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
10329         fields.
10330
10331         * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.        
10332         
10333 2007-10-16  Mark Probst  <mark.probst@gmail.com>
10334
10335         * metadata.c: Implemented correct comparing of generic classes.
10336         An inflated generic class can be equal to a non-inflated one if it
10337         is inflated with generic type variables as type arguments.  Fixes
10338         bug #333798.
10339
10340 2007-10-15  Dick Porter  <dick@ximian.com>
10341
10342         * monitor.c (mono_monitor_try_enter_internal): Set thread state to
10343         WaitSleepJoin while it is waiting to acquire a lock.  Fixes bug
10344         81646.
10345
10346         * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
10347         instead of a monitor lock.  This means that monitor_try_enter and
10348         co can set the thread state safely.
10349         (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
10350         thread_interrupt_requested, so interrupt actually works.
10351
10352         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
10353         ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
10354         state accessor function
10355
10356 2007-10-15  Martin Baulig  <martin@ximian.com>
10357
10358         * mono-debug.h
10359         (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
10360         the debugger with the current runtime.
10361
10362 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
10363
10364         * object.c, object-internals.h: added the ability to set a single
10365         trampoline for all the slots in a vtable.
10366
10367 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10368
10369         * marshal.c: deal with a possible race condition during multicast
10370         delegate invocation.
10371
10372 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10373
10374         * class.c: ensure value type methods don't have the synchronized
10375         flag set.
10376
10377 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
10378
10379         * string-icalls.c, string-icalls.h: reverted unapproved patch that
10380         breaks the build.
10381
10382 2007-10-11  Joel Reed  <joelwreed@comcast.com>
10383
10384         * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
10385         to take an options parameter so that empty entries can be removed during
10386         the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
10387
10388 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10389
10390         * marshal.c: make sure we don't store the signature from a dynamic
10391         method into the runtime invoke cache (bug #327189).
10392
10393 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10394
10395         * marshal.c: make sure the wrapper methods are properly initialized.
10396
10397 2007-10-11  Mark Probst  <mark.probst@gmail.com>
10398
10399         * metadata.c, metadata-internals.h: Generalized
10400         mono_type_stack_size() to mono_type_stack_size_internal() which
10401         takes an additional argument specifying whether it allows open
10402         types.
10403
10404 2007-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
10405
10406         * verify.c (do_invoke_method): handle typedbyref params
10407         correctly and check for unverifiable return values.
10408
10409         * verify.c (do_newobj): fix a warning.
10410
10411 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
10412
10413         * verify.c: don't tread typedbyref as allways unverifable,
10414         so uses, like (ld/st)loc.0 are valid. verify for the cases
10415         that it matters, like boxing related operations.
10416
10417 2007-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
10418
10419         * verify.c: add verification of the newobj opcode. verification
10420         of delegate instantation still missing due ldftn and virldftn not
10421         pushing the function type on stack
10422
10423 2007-10-08  Mark Probst  <mark.probst@gmail.com>
10424
10425         * class-internals.h: Runtime generic context data structure
10426         definition.
10427
10428         * object.c: Initialization of runtime generic context at runtime
10429         vtable creation time.
10430
10431 2007-10-08  Massimiliano Mantione  <massi@ximian.com>
10432         * class.c (mono_class_create_from_typedef,
10433         mono_class_from_generic_parameter, mono_ptr_class_get,
10434         mono_fnptr_class_get, mono_bounded_array_class_get)
10435         * domain.c (mono_domain_create, mono_domain_free)
10436         * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
10437         * image.c (do_mono_image_load, mono_image_close):
10438         Hooked up load-unload profiler events.
10439
10440 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10441
10442         * domain.c: track statistics about the actual amount of native code
10443         allocated.
10444
10445 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
10446
10447         * class.c: the valuetype enumerators don't have the additional
10448         supertypes interfaces.
10449
10450 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10451
10452         * class.c: need more interfaces setup for the IEnumerator<T>
10453         object created for arrays (tests/ienumerator-interfaces.2.cs).
10454
10455 2007-10-05  Zoltan Varga  <vargaz@gmail.com>
10456
10457         * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
10458
10459 2007-10-05  Alp Toker  <alp@atoker.com>
10460
10461         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
10462         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
10463         #315863.
10464
10465 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
10466
10467         * verify.c (verify_type_compatibility_full): verification of
10468         compatibility improved, validates correctly non-strict checks between
10469         native int and I4 types different than (unsigned)int32.
10470
10471         * verify.c (do_store_indirect): added, do all verification of
10472         ldind.X opcodes. 
10473
10474         * verify.c (get_load_indirect_mono_type): renamed to
10475         get_indirect_op_mono_type, as it now returns the MonoType for 
10476         ldind.X and stind.X opcodes.
10477
10478 2007-10-04  Rodrigo Kumpera  <rkumpera@novell.com>
10479
10480         * reflection.c: Fix the encoding of generic type definition for
10481         TypeBuilders.
10482
10483         * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
10484         mono_image_typedef_or_ref but allows to specify if typespec lookups should
10485         be made. Typespec check is done prior to typeref cache lookup.
10486
10487         * reflection.c (mono_image_typedef_or_ref): now just delegate to
10488         mono_image_typedef_or_ref_full.
10489
10490         * reflection.c (encode_generic_class): encode the generic class
10491         directly instead of calling encode_type.
10492
10493         * reflection.c (encode_type): encode the generic type definition
10494         MonoClass as a generic instantiation.
10495
10496         * reflection.c (create_typespec): cache typespec tokens in
10497         the assembly->typespec cache. Don't create typespec for a generic
10498         instance MonoClass. Create typespec for the generic type defintion.
10499
10500         * reflection.c (create_generic_typespec): encode the generic
10501         class directly instead of calling encode_type.
10502
10503         * reflection.c (mono_image_create_token): encode the generic
10504         type definition not using a typespec for MonoType instances.
10505
10506
10507 2007-10-04  Raja R Harinath  <rharinath@novell.com>
10508
10509         Fix #328812
10510         * class.c (mono_image_init_name_cache): Don't return nested
10511         'protected internal' classes.
10512         (mono_class_from_name_case): Likewise.
10513
10514 2007-10-04  Atsushi Enomoto  <atsushi@ximian.com>
10515
10516         * icall-def.h, icall.c : get_bundled_machine_config() is now the
10517           common function used by both DefaultConfig in System.dll and
10518           InternalConfigurationHost in System.Configuration.dll.
10519
10520 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10521
10522         * class.c: automatically add to vectors only a few essential explicit
10523         generic interfaces. The rest of the interfaces that arrays should
10524         provide are currently implicitly added (but still not lazily, see the
10525         design in the discussion of bug#325495 for the details of what is
10526         needed for that). Additionally, implicit interfaces are assigned the
10527         same vtable slot as the explicit interfaces (as they are compatible):
10528         this enables huge memory savings since we don't need to instantiate
10529         as many memthods and as large vtables anymore. Also, Since
10530         GetEnumerator<T> returns an instance of a type that is required to
10531         support a similarly large set of interfaces as arrays, we add
10532         implicit interfaces and interface offset sharing support to those
10533         types, too. This change adds all the required interfaces so that
10534         the anonarray.cs test case in the bug report works (we don't add
10535         all the interfaces to arrays of arrays 3-level deep and more because
10536         of the memory requirements explained in the bug and since they are much
10537         less common: the lazy-loading support will enabled them to work, too).
10538
10539 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
10540
10541         * verify.c (merge_stacks): major clean up, all type compatibility
10542         checks are done by verify_type_compatibility. This fix my earlier lack
10543         of understanding of the CLR type system and merge_stacks no longer looks
10544         scary.
10545
10546         * verify.c: fixed some bad spelling.
10547
10548 2007-10-02  Rodrigo Kumpera  <rkumpera@novell.com>
10549
10550         * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
10551         a given stack slock.
10552         
10553         * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
10554         verify_type_compatibility_full. This removed a near indentical function and fixed
10555         handling of Int32 and IntPtr across all opcodes.
10556
10557 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
10558
10559         * class.c: only vectors have the additional generic interfaces.
10560
10561 2007-10-01  Jonathan Chambers <joncham@gmail.com>
10562
10563         * mono-config.c: Use g_strcasecmp instead of
10564         strcasecmp like everywhere else to fix
10565         compilation with MSVC.
10566         
10567         Code is contributed under MIT/X11 license.
10568
10569 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10570
10571         * object.c, object-internals.h: refactored the IMT code to enable
10572         building a single slot at a time and lazily creating the IMT trampolines
10573         and thunks.
10574
10575 2007-09-29  Zoltan Varga  <vargaz@gmail.com>
10576
10577         * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
10578
10579         * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
10580         Fixes #328501.
10581         
10582 2007-09-29  Raja R Harinath  <harinath@gmail.com>
10583
10584         * loader.c (method_from_methodspec): Rearrange to avoid
10585         un-necessary exposition.  Don't assert out if the method's
10586         declaring type is a generic type definition.
10587
10588 2007-09-28  Martin Baulig  <martin@ximian.com>
10589
10590         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
10591
10592 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
10593
10594         * class-internals.h: optimize field layout of MonoClass to
10595         requires less cachelines at runtime and save a few bytes on 64 bit
10596         systems.
10597
10598 2007-09-28  Jb Evain  <jbevain@novell.com>
10599
10600         * reflection.c: when encoding type names in custom attributes,
10601         if the type is a closed generic type, its generic arguments
10602         have to be serialized as AssemblyQualifiedName, so that when
10603         they are deserialized, it's possible to re-create them properly.
10604         Fixes #329450.
10605
10606
10607 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
10608
10609         * object.c, class-internals.h: added delegate-creation counter.
10610
10611 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
10612
10613         * class.c: cleanup of the code that synthetizes interfaces for
10614         arrays in 2.0: saves quit a bit of corlib mempool memory.
10615         Code to fix bug #325495 ifdeffed out for now until the issues
10616         with memory usage and O(n^2) behaviour are fixed.
10617
10618 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10619
10620         * marshal.c: when possible, do not duplicate the name of the methods
10621         in the method builder and in the generated MonoMethod.
10622
10623 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
10624         * verify.c: added support for type checking ldind_* opcodes.
10625
10626 2007-09-27  Rodrigo Kumpera  <rkumpera@novell.com>
10627
10628         * class-internals.h (struct _MonoGenericClass): new field is_tb_open
10629         which is used to distinguish the fully open instantiation of a TypeBuilder
10630         with the rest. This temporary hack is required to restore the property that
10631         the fully open instantiation is the same type of the generic type definition.
10632
10633         * class-internals.h (mono_generic_class_is_generic_type_definition):
10634         new function as part of the internal API.
10635
10636         * class.c (inflate_generic_type): return NULL when the generic inst is
10637         fully open. The fully open generic type is now the same as the generic type
10638         definition for non TypeBuilder types.
10639
10640         * class.c (mono_generic_class_get_class): removed assert since it is
10641         no longer valid, gklass->cached_class can point to the generic type definition.
10642
10643         * class.c (mono_generic_class_is_generic_type_definition): new.
10644
10645         * metadata.c (mono_generic_class_hash): added is_tb_open field
10646         to the hash calculation.
10647
10648         * metadata.c (free_generic_class): if the generic class is associated
10649         with the generic type definition, its field will come from the mempool and
10650         must not be freed.
10651
10652         * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
10653         new, this function identifies the corner case of a TypeBuilder fully open
10654         instantiation.
10655
10656         * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
10657         for lookup. Set gclass->cached_class to be the container class in case of
10658         the fully open instantiation of non TypeBuilder types.
10659
10660         * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
10661         to compare generic classes.
10662
10663         * reflection.c (method_encode_methodspec): remove assert that
10664         no longer is valid.
10665
10666         * reflection.c (mono_reflection_generic_class_initialize): add
10667         an aditional assert to ensure the proper type is used.
10668
10669 2007-09-26  Rodrigo Kumpera  <rkumpera@novell.com>
10670
10671         * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
10672         to enjoy it.
10673
10674 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
10675
10676         * verify.c (push_arg): Fixed support for ldarga
10677         * verify.c (set_stack_value): Removed superfluous parameter, fixed the
10678         MonoType used as first arg in case of instance calls.
10679
10680 2007-09-25  Rodrigo Kumpera  <rkumpera@novell.com>
10681
10682         * verify.c: Support for verifying VAR and MVAR types, 
10683
10684 2007-09-25  Zoltan Varga  <vargaz@gmail.com>
10685
10686         * icall.c (ves_icall_get_property_info): Set the reflected type of the
10687         accessors correctly.
10688
10689 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10690
10691         * threads.c: support OSX and other systems in
10692         mono_thread_get_stack_bounds (bug #328026).
10693
10694 2007-09-25  Martin Baulig  <martin@ximian.com>
10695
10696         * mono-debug.h
10697         (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
10698
10699 2007-09-24  Martin Baulig  <martin@ximian.com>
10700
10701         * mono-debug.h
10702         (MonoDebugClassEntry): Moved the definition of this struct into
10703         mono-debug.c to make it private.
10704
10705         * mono-debug.c
10706         (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
10707         type table per symbol file, we don't need to store the symfile id
10708         any longer.
10709
10710 2007-09-24  Martin Baulig  <martin@ximian.com>
10711
10712         Create one type table per symbol file, since a `MonoClass *' gets
10713         invalid when its image is unloaded.
10714
10715         * mono-debug.h (MonoSymbolTable): Removed `type_table'.
10716         (MonoDebugHandle): Added `type_table'.
10717
10718 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
10719
10720         * mempool.c, mempool.h: added mono_mempool_new_size () API
10721         to be able to specify a smaller initial size for the pool.
10722         Adjusted the code to slowly increase pool size before using
10723         the previous default size.
10724         * image.c: use a small initial size for image mempools.
10725
10726 2007-09-23  Zoltan Varga  <vargaz@gmail.com>
10727
10728         * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
10729         Fixes ##320990.
10730
10731         * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal): 
10732         Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
10733
10734 2007-09-22  Zoltan Varga  <vargaz@gmail.com>
10735
10736         * metadata.c (mono_type_create_from_typespec): Remove an invalid
10737         free. Fixes #327438.
10738
10739 2007-09-21  Raja R Harinath  <harinath@gmail.com>
10740
10741         * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
10742         generic instantiations, etc.
10743         <MONO_TYPE_ARRAY>: Likewise.
10744
10745 2007-09-21  Martin Baulig  <martin@ximian.com>
10746
10747         * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
10748         these structs were never defined.
10749         (MonoDebugHandle): Removed the `_priv' field, it was never used.
10750
10751 2007-09-21  Martin Baulig  <martin@ximian.com>
10752
10753         * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
10754
10755 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
10756
10757         * image.c: removed the guid hash tables: we can get the same info
10758         without the additional memory usage hit (partially fixes also bug #327052).
10759
10760 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
10761
10762         * profiler.h, profiler-private.h, profiler.c: add a new profiler
10763         event to handle unloading methods. After the event is called, the
10764         corresponding MonoMethod* must be considered invalid.
10765         * loader.c (mono_free_method): call the new mono_profiler_method_free
10766         event.
10767
10768 2007-09-20  Mark Probst  <mark.probst@gmail.com>
10769
10770         * domain-internals.h: New flag in MonoJitInfo which marks shared
10771         generic methods.  New hash table (shared_generics_hash) in
10772         MonoDomain to keep track of shared generic methods.  Prototypes
10773         for functions to register and lookup shared generic methods.
10774
10775         * domain.c: Support for registering and looking up shared generic
10776         methods via a hash table (shared_generics_hash) in MonoDomain.
10777
10778         * class-internals.h: New exception to signal failure of shared
10779         compilation of a generic method.  New counters for generics
10780         sharing in MonoStats.
10781
10782 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
10783
10784         * image.c, metadata-internals.h: don't keep a file descriptor open
10785         for loaded assemblies (bug#325988).
10786
10787 2007-09-19  Raja R Harinath  <rharinath@novell.com>
10788
10789         * metadata.c (signature_in_image): New.  Carve out of type_in_image.
10790         (ginst_in_image, gclass_in_image): Simplify.  Change signature to
10791         use the corresponding datatypes.
10792         (type_in_image): Update to changes.
10793         (CleanForImageUserData): Simplify.
10794         (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
10795         Avoid quadratic behaviour in handling the "stolen" list by
10796         separating the filter predicate out, and by prepending the stolen
10797         items rather than appending them.
10798         (steal_ginst_in_image): Likewise.
10799         (mono_metadata_clean_for_image): Update to changes.
10800
10801 2007-09-19  Martin Baulig  <martin@ximian.com>
10802
10803         * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
10804
10805 2007-09-19  Martin Baulig  <martin@ximian.com>
10806
10807         * mono-debug.c (mono_debug_cleanup): Don't call
10808         mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
10809
10810 2007-09-19  Raja R Harinath  <harinath@gmail.com>
10811
10812         Fix crash on 'make run-test' in mcs/errors
10813         * metadata.c (type_in_image): New.  Carve out of ginst_in_image.
10814         Avoid more potential allocations in mono_class_from_mono_type.
10815         (ginst_in_image): Update to changes.
10816         (gclass_in_image): Rearrange slightly.
10817
10818 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
10819
10820         * class.c (mono_class_init): Move the code that sets up class->methods to 
10821         mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
10822
10823         * metadata.c (mono_metadata_get_inflated_signature): New function to return a
10824         canonical instance of an inflated generic signature.
10825         (mono_type_create_from_typespec): Remove an invalid free.
10826
10827         * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.  
10828
10829 2007-09-18  Marek Habersack  <mhabersack@novell.com>
10830
10831         * domain-internals.h: added a declaration of the
10832         mono_assembly_load_full_nosearch internal function.
10833
10834         * assembly.c (mono_assembly_load_with_partial_name): use
10835         mono_try_assembly_resolve return value properly.
10836         (mono_assembly_load_full_nosearch): copied the function body from
10837         mono_assembly_load_full, without the code to invoke assembly
10838         search hooks.
10839         (mono_assembly_load_full): calls the above new function and if the
10840         assembly is not resolved, invokes the search hooks.
10841
10842         * appdomain.c (mono_runtime_init): restore the global postload
10843         assembly search handlers.
10844
10845 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
10846
10847         * class.c (mono_class_init): Make sure class->methods and class->properties
10848         are never NULL in the generics case.
10849
10850         * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
10851
10852 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
10853
10854         * metadata.c (free_generic_class): Disable some code to fix the build.
10855
10856         * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
10857
10858         * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
10859         from the image mempool.
10860
10861         * metadata.c (free_generic_class): Free more data from the inflated class.
10862
10863         * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
10864
10865         * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
10866         mempool.
10867         (mono_type_create_from_typespec): Ditto.
10868
10869         * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
10870         MonoImage to the caller.
10871         (mono_init_internal): Save the opened image in a global variable.
10872         (mono_cleanup): Close the image opened in get_runtimes_from_exe.
10873
10874         * reflection.c (resolve_object): Fix a leak.
10875
10876         * metadata.c: Fix the freeing of data in the generics caches.
10877         
10878         * metadata.c (free_generic_inst): Comment this out to fix the build.
10879         (free_generic_class): Ditto.
10880
10881         * metadata.c: Free cached generic methods, instantinations and classes when
10882         they are removed from the caches.
10883         (mono_metadata_free_type): Free the type itself.
10884
10885         * class.c: Free the result of mono_class_inflate_generic_type () in a few
10886         places.
10887
10888 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
10889
10890         * boehm-gc.c: restrict managed allocs to __thread supporting
10891         architectures.
10892
10893 2007-09-16  Zoltan Varga  <vargaz@gmail.com>
10894
10895         * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
10896         (mono_generic_class_get_class): Fix a leak.
10897
10898         * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
10899         mono_metadata_free_type ().
10900         (mono_metadata_inflate_generic_inst): Fix a leak.
10901
10902 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
10903
10904         * mono-debug.c (free_header_data): Fix a leak missed earlier.
10905
10906         * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
10907         mempool.
10908
10909         * mono-debug.c (mono_debug_close_image): Fix call to 
10910         g_hash_table_remove ().
10911
10912 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
10913
10914         * icall-def.h: redirect all the string ctor to the managed
10915         CreateString () methods.
10916         * string-icalls.c, string-icalls.h: removed dead code for string
10917         ctors and icalls.
10918
10919 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
10920
10921         * mono-debug.c: Fix memory leaks.
10922
10923 2007-09-14  Jonathan Chambers <joncham@gmail.com>
10924
10925         * threads-types.h: Implement mono_hazard_pointer_set and 
10926         mono_hazard_pointer_clear macros using do/while(0) to fix
10927         compilation with MSVC.
10928         
10929         Code is contributed under MIT/X11 license.
10930
10931 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
10932
10933         * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
10934         -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
10935
10936 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10937
10938         * icall-def.h, string-icalls.c: get rid of old, no longer used, string
10939         icalls.
10940
10941 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
10942
10943         * boehm-gc.c, gc-internal.h, object.c: allow strings to be
10944         managed-code allocated as well.
10945
10946 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
10947
10948         * class.c (mono_class_is_assignable_from): Add support for generic variance.
10949
10950 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
10951
10952         * boehm-gc.c: fixed the build after the AOT changes.
10953
10954 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
10955
10956         * wrapper-types.h: Add an ALLOC wrapper type.
10957
10958         * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
10959         reference managed allocator methods.
10960
10961 2007-09-12  Marek Safar  <marek.safar@gmail.com>
10962
10963         * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
10964         of Type array and not MonoType, a fix suggested by Hari.
10965         
10966 2007-09-12  Jonathan Chambers <joncham@gmail.com>
10967
10968         * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
10969         and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
10970         
10971         Code is contributed under MIT/X11 license.
10972
10973 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
10974
10975         * domain.c, object.c, mono-config.c, object-internals.h: Fixed  #82416.
10976
10977 2007-09-12  Marek Habersack  <mhabersack@novell.com>
10978
10979         * image.c (do_mono_image_open): if assembly file fails to open and
10980         MONO_IOMAP is in effect, try to find the path in a
10981         case-insensitive way.
10982
10983         * appdomain.c (mono_runtime_init): do not install postload hooks -
10984         tests show that MS.NET doesn't use anything of that sort to
10985         trigger the AppDomain.AssemblyResolve event.
10986         (mono_try_assembly_resolve): renamed from try_assembly_resolve and
10987         made non-static.
10988         (mono_runtime_init): init portability helpers here.
10989
10990         * assembly.c (mono_assembly_load_with_partial_name): if other   
10991         attempts fail, trigger the AppDomain.AssemblyResolve event handler
10992         to resolve the assembly.
10993
10994         * domain-internals.h: added mono_try_assembly_resolve and marked
10995         it as internal.
10996
10997 2007-09-11  Jb Evain  <jbevain@novell.com>
10998
10999         * object-internals.h (MonoReflectionDynamicMethod): add
11000         a `MonoReflectionType *owner` field. The owner is used
11001         * reflection.c:
11002         (mono_reflection_create_dynamic_method): use the owner of the dynamic
11003         method as the class declaring the dynamic method.
11004         (reflection_methodbuilder_from_dynamic_method): copy the owner of the
11005         dynamic method to the declaring type of the methodbuilder.
11006
11007 2007-09-11  Mark Probst  <mark.probst@gmail.com>
11008
11009         * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
11010         rules for calling methods via reflection.
11011
11012 2007-09-11  Zoltan Varga  <vargaz@gmail.com>
11013
11014         * reflection.c (resolve_object): Add support for MonoGenericClass. 
11015         Inflate MonoType's.
11016
11017 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11018
11019         * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
11020         provide a managed method that does fast allocations without needing
11021         a managed->unmanaged transition. Boehm GC implementation currently
11022         enabled for ptrfree objects on sane architectures.
11023
11024 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11025
11026         * marshal.c, marshal.h: exported a couple of useful functions and
11027         added mono_mb_get_label () to easily handle backward branches.
11028
11029 2007-09-10  Zoltan Varga  <vargaz@gmail.com>
11030
11031         * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
11032
11033 2007-09-10  Massimiliano Mantione  <massi@ximian.com>
11034
11035         * loader.c (find_method): Fixed the regression introduced while
11036         fixing bug #81466.
11037
11038 2007-09-09  Zoltan Varga  <vargaz@gmail.com>
11039
11040         * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
11041         well.
11042         
11043         * class.c loader.c metadata.c object.c class-internals.h object-internals.h
11044         icall.c reflection.c: Pass a MonoGenericContext argument to 
11045         mono_lookup_dynamic_token ().
11046
11047         * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
11048         #82744.
11049         
11050 2007-09-09  Robert Jordan  <robertj@gmx.net>
11051
11052         * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
11053         for generic methods.
11054
11055         * object.c (mono_object_get_virtual_method): Handle generic methods.
11056         Fixes bug #78882.
11057
11058         Code is contributed under MIT/X11 license.
11059
11060 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11061
11062         * image.c: fix locking in mono_image_load_file_for_image ().
11063
11064 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
11065
11066         * reflection.c, icall.c, icall-def.h: the methodinfos name field is
11067         used only as a cache: added an icall to fill it.
11068
11069 2007-09-16  Rodrigo Kumpera  <rkumpera@novell.com>
11070
11071         * reflection.h: exposed mono_reflection_free_type_info
11072         * reflection.c (mono_reflection_get_type_internal): type_args is always freed
11073         since mono_reflection_bind_generic_parameters makes a copy of it.
11074         * reflection.c (free_type_info): subinfos should be freed.
11075         * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and 
11076         made non static.
11077         * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
11078         replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
11079         this fixes #82695 and #81726.
11080    
11081
11082 2007-09-03  Atsushi Enomoto  <atsushi@ximian.com>
11083
11084         * process.h, process.c:  added support for user profile/info in
11085           ProcessStartInfo. For now only Windows works.
11086
11087 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11088
11089         * metadata.c: consider the generic arguments when comparing
11090         signatures (bug #82614).
11091
11092 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11093
11094         * cil-coff.h, image.c: updated assembly loader to cope with the
11095         PE32+ 64 bit file format.
11096
11097 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11098
11099         * assembly.c, class.c, domain.c, loader.c: remove useless
11100         inclusion of cil-coff.h.
11101
11102 2007-08-29  Jonathan Chambers  <joncham@gmail.com>
11103
11104         * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
11105         if interface is marked with CoClassAttribute. 
11106    
11107         Code is contributed under MIT/X11 license.
11108
11109 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11110
11111         * sgen-gc.c: ensure no object from the to space is copied again or finalized
11112         if it's seen twice in major collections.
11113
11114 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11115
11116         * sgen-gc.c: big objects are not copied to the gray area, but they
11117         need to be considered for scanning, too, if they are brought alive
11118         by an object ready for finalizations or a survived one.
11119
11120 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11121
11122         * sgen-gc.c: properly account the number of disappearing links when
11123         they are nullified.
11124
11125 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
11126
11127         * sgen-gc.c: share the code to scan the registered roots between the
11128         different types of collections.
11129
11130 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11131
11132         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
11133
11134 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11135
11136         * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
11137         class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
11138
11139 2007-08-28  Mark Probst  <mark.probst@gmail.com>
11140
11141         * security-manager.c (mono_security_manager_get_methods):
11142         LinkDemandSecurityException now has 2 arguments instead of 3.
11143
11144 2007-08-27  Zoltan Varga  <vargaz@gmail.com>
11145
11146         * class.c (mono_class_layout_fields): Only do the struct alignment hack on
11147         platforms which need it.
11148
11149 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11150
11151         * sgen-gc.c: unregister thread data structures with a pthread_key_t
11152         dtor.
11153
11154 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
11155
11156         * threads.c: free the thread static data on thread exit.
11157
11158 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
11159
11160         * class.c: walk the hierarchy to find the generic definition for
11161         a class (fixes runtime part of bug #82498).
11162
11163 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
11164
11165         * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
11166         ...
11167
11168         * image.c (mono_image_close): Here. Hopefully fixes #82510.
11169
11170 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11171
11172         * monodiet.c (handle_cattrs): Fixed a custom attr leak.
11173
11174 2007-08-24  Robert Jordan  <robertj@gmx.net>
11175
11176         * appdomain.c: don't perform the ':'->';' substitution on Win32.
11177
11178 2007-08-24  Jb Evain  <jbevain@novell.com>
11179
11180         * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
11181         for byref types.
11182
11183 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11184
11185         * threads.c: Make sure a thread gets cleaned up only once.  Fixes
11186         #82286.
11187
11188 2007-08-24  Zoltan Varga  <vargaz@gmail.com>
11189
11190         * assembly.c: Fix a warning.
11191         
11192 2007-08-23  Marek Habersack  <mhabersack@novell.com>
11193
11194         * appdomain.c: parse the <runtime> section looking for the probing
11195         element with the 'privatePath' attribute, which sets additional
11196         directories in which the runtime should look for assemblies.
11197
11198 2007-08-23  Robert Jordan  <robertj@gmx.net>
11199
11200         * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
11201         Fixes #82499.
11202
11203 2007-08-23  Martin Baulig  <martin@ximian.com>
11204
11205         * mono-debug.[ch]: Rename mono_debug_init_corlib() into
11206         _mono_debug_init_corlib() and remove it from the header file.
11207
11208 2007-08-23  Martin Baulig  <martin@ximian.com>
11209
11210         * mono-debug-debugger.c
11211         (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
11212         don't notify the debugger about it.
11213
11214         * mono-debug-debugger.h
11215         (MonoDebuggerEvent): Removed `THREAD_ABORT'.
11216
11217 2007-08-23  Robert Jordan  <robertj@gmx.net>
11218
11219         * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
11220         Code is contributed under MIT/X11 license.
11221
11222 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11223
11224         * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
11225
11226 2007-08-22  Martin Baulig  <martin@ximian.com>
11227
11228         * mono-debug.c: Store debugging info on a per-domain basis and
11229         free it on domain unload.  Add support for unloading symbol files.
11230
11231         * mono-debug.h
11232         (MonoDebugList): New typedef.
11233         (MonoSymbolTable):
11234         - add `data_tables and `type_table'.
11235         - replace 'symbol_files' and `num_symbol_files' with a
11236           `MonoDebugList *'.
11237         (mono_debug_data_table): Removed.
11238         (mono_debug_list_add): New public function.
11239         (mono_debug_list_remove): New public function.
11240         (mono_debug_init_1): Renamed into mono_debug_init_corlib().
11241         (mono_debug_init_2_memory): Renamed into
11242         mono_debug_open_image_from_memory().
11243         (mono_debug_close_image): New public function.
11244         (mono_debug_domain_create): Likewise.
11245         (mono_debug_domain_unload): Likewise.
11246         (MONO_DEBUGGER_VERSION): Bump to 60.
11247
11248         * mono-debug-debugger.h
11249         (MonoDebuggerEvent):
11250         - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
11251         - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
11252         - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
11253         - rename `THREAD_CREATED' and `THREAD_EXITED' into
11254           `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
11255         - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
11256           meaning.
11257         (mono_debugger_add_symbol_file): Removed.
11258         (mono_debugger_add_type): Removed.
11259         (mono_debugger_lookup_type): Removed.
11260         (mono_debugger_lookup_assembly): Removed.
11261
11262         * domain.c
11263         (mono_domain_create): Call mono_debug_domain_create().
11264         (mono_init_internal): Call mono_debug_init_corlib().
11265
11266         * assembly.c
11267         (mono_assembly_close): Call mono_debug_close_image().
11268
11269 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11270
11271         * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
11272         mmap call.
11273
11274 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
11275
11276         * sgen-gc.c: ensure section->pin_queue_end is initialized
11277         correctly when non pinning objects in the section have been found.
11278
11279 2007-08-22  Marek Habersack  <mhabersack@novell.com>
11280
11281         * appdomain.c (set_domain_search_path): cope with PrivateBinPath
11282         containing a list of directories separated by ':'. MSDN docs say
11283         the directories should be separated with ';'. Part of a bugfix for
11284         bug #81446
11285
11286 2007-08-21  Rodrigo Kumpera  <rkumpera@novell.com>
11287
11288         * class.c (mono_type_retrieve_from_typespec) : fixed the return type
11289         it should MonoType and not MonoClass.
11290
11291 2007-08-21  Atsushi Enomoto  <atsushi@ximian.com>
11292
11293         * culture-info-table.h : regenerated.
11294
11295 2007-08-20  William Holmes  <billholmes54@gmail.com>
11296
11297         *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
11298          to call ReplaceFile Kernel32 on windows or in io-layer.
11299         *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
11300         *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
11301          as an internal call.
11302
11303         Code is contributed under MIT/X11 license.
11304
11305 2007-08-20  Jb Evain  <jbevain@novell.com>
11306
11307         * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
11308         and MONO_EXCEPTION_FIELD_ACCESS.
11309
11310         * debug-helpers.[c|h]: new mono_field_full_name function.
11311
11312 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11313
11314         * class.c: Removed class_security_level() and moved it to
11315         security-core-clr.c.
11316
11317         * security-core-clr.c, security-core-clr.h: class_security_level()
11318         is now public and renamed to mono_security_core_clr_class_level().
11319         It also looks for security attributes in the classes a class is
11320         nested in.
11321
11322 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11323
11324         * security-core-clr.c, security-core-clr.h: CoreCLR security
11325         utility functions.
11326
11327         * Makefile.am: Added security-core-clr.[ch].
11328
11329         * security-manager.c, security-manager.h: Functions and enum for
11330         setting and getting the security mode.
11331
11332         * class.c: CoreCLR security checks.
11333
11334 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11335
11336         * icall-def.h, process.c, process.h: implemented icall to get
11337         user/system processor times.
11338
11339 2007-08-17  Mark Probst  <mark.probst@gmail.com>
11340
11341         * domain.c, threads.c, class-internals.h, domain-internals.h: New
11342         reader-lock-free jit_info_table.
11343
11344 2007-08-17  Zoltan Varga  <vargaz@gmail.com>
11345
11346         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
11347
11348         * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.   
11349
11350         * object-internals.h (MonoException): Add missing _data member.
11351
11352 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
11353
11354         * loader.c (find_method, find_method_in_class): Fixed bug #81466,
11355         checking that only methods with matching qname or fqname are picked
11356         from implemented interfaces.
11357
11358 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
11359
11360         * verify.c (do_newarr):added, do type verification of
11361         newarr ops, push the right value on the eval stack.
11362         * verify.c (mono_method_verify): use do_newarr
11363
11364
11365 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
11366
11367         * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
11368         factored the common code into get_boxable_mono_type, which
11369         is now using mono_type_get_full, this fixed byref related tests.
11370
11371 2007-08-16  Rodrigo Kumpera  <rkumpera@novell.com>
11372
11373         * class.c: added mono_type_get_full, this function has the same
11374         behavior of mono_class_get_full but the returned MonoType has
11375         all metadata of the associated token in case of a typespec token.
11376         * class.c: added mono_type_retrieve_from_typespec, used by 
11377         mono_type_get_full to retrieve the token type.
11378         * class.c (mono_class_create_from_typespec): changed to use
11379         mono_type_retrieve_from_typespec.
11380         * class.c (mono_ldtoken): changed to use mono_type_get_full
11381         for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
11382         * class-internals.h: exported mono_type_get_full for internal use.
11383
11384 2007-08-16  Jb Evain  <jbevain@novell.com>
11385
11386         * domain.c (supported_runtimes): add entry for
11387         the 'moonlight' runtime version.
11388
11389 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11390
11391         * verify.c (mono_method_verify): small typo sliped in.  
11392
11393 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11394
11395         * verify.c (do_unbox_value): added, do type verification of
11396         unboxing ops
11397         * verify.c (mono_method_verify): use do_unbox_value
11398
11399
11400 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11401
11402         * verify.c (dump_stack_value): fixed typo, was printing string
11403         instead of object on stack.
11404         * verify.c (do_box_value): moved the byref check up as it leads
11405         to invalid code and should be done earlier.
11406         * verify.c: improved error messages for and ldobj
11407
11408 2007-08-15  William Holmes  <billholmes54@gmail.com>
11409
11410         * marshal.c (emit_marshal_custom): Omit the call to 
11411           marshal_native_to_managed when calling native to managed 
11412           and the argument is specified as an out argument.
11413
11414         Code is contributed under MIT/X11 license.
11415
11416 2007-08-15  Rodrigo Kumpera  <rkumpera@novell.com>
11417
11418         * verify.c: fixed the type checks for generics, function pointers and vectors.
11419         Added type verification for ldobj and ldtoken. The verifier
11420         would segfault if header or signature of a method contained references
11421         to non-existant types.
11422
11423 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
11424
11425         * marshal.c (cominterop_get_ccw): Patch from
11426         Bill Holmes to no walk up interface hierarchy. 
11427         All parent methods should be present in the interface for COM.
11428    
11429         Code is contributed under MIT/X11 license.
11430
11431 2007-08-15  Jonathan Chambers  <joncham@gmail.com>
11432
11433         * marshal.c (emit_marshal_com_interface): Patch from
11434         Bill Holmes to handle COM Interfaces as return values
11435         for native->managed calls.
11436    
11437         Code is contributed under MIT/X11 license.
11438
11439 2007-08-14  Jonathan Chambers  <joncham@gmail.com>
11440
11441         * marshal.c (cominterop_get_idispatch_for_object): Implement
11442         for runtime callable wrappers.
11443    
11444         Code is contributed under MIT/X11 license.
11445
11446 2007-08-13  Rodrigo Kumpera  <rkumpera@novell.com>
11447
11448         * pedump.c (main): changed from mono_init to mono_init_from_assembly
11449         so 2.0 types are accessible
11450
11451
11452 2007-08-13  Miguel de Icaza  <miguel@novell.com>
11453
11454         * domain.c (mono_init_internal): Call mono_assembly_load_friends
11455         once we load mscorlib.   Due to the order in which we initialize,
11456         the mono_assembly_load_full routine that loads mscorlib did not
11457         load friends.   We now load it once we load the
11458         mono_defaults.internals_visible_class class. 
11459
11460         * assembly.c: Expose the mono_load_friend_assemblies method.
11461
11462 2007-08-11  Rodrigo Kumpera  <rkumpera@novell.com>
11463
11464         * verify.c: improved the handling of boxing, better
11465         type checking for unary ops and conversion. Fix bug
11466         regarding managed pointer compatibility checking
11467
11468 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
11469
11470         * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
11471
11472         * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
11473
11474 2007-08-09  Raja R Harinath  <rharinath@novell.com>
11475
11476         * reflection.c (dup_type): Remove.
11477         * class.c (dup_type): Remove.
11478         (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
11479         instead of the dodgy 'dup_type'.
11480         (inflate_generic_type): Likewise.  Fix the VAR/MVAR cases to
11481         handle the case where 'dup_type' needed the second argument.
11482
11483 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
11484
11485         * domain.c: Fix a warning.
11486
11487 2007-08-08  Massimiliano Mantione  <massi@ximian.com>
11488
11489         * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
11490         checking that methods with the same fqname are not overridden
11491         with a method from an ancestor.
11492
11493 2007-08-07  Zoltan Varga  <vargaz@gmail.com>
11494
11495         * threads.c (free_thread_static_data_helper): Avoid a crash if
11496         thread->static_data is not yet set.
11497
11498 2007-08-07  Jonathan Chambers  <joncham@gmail.com>
11499
11500         * marshal.c: Use correct image when emitting
11501         native wrapper for COM calls.
11502    
11503         Code is contributed under MIT/X11 license.
11504
11505 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
11506
11507         * icall-def.h, security.c, security.h :
11508           added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
11509
11510 2007-08-07  Martin Baulig  <martin@ximian.com>
11511
11512         * mono-debug-debugger.h
11513         (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
11514
11515         * domain.c (mono_domain_free): Call
11516         `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
11517
11518 2007-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
11519
11520         * verify.c (check_underflow, check_overflow): error message now returns IL offset
11521         * verify.c (in_same_block): code should test if either offset is inside the clauses
11522         * verify.c (mono_method_verify): push the exception into the eval stack of exception
11523         and filter blocks
11524
11525 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
11526
11527         * image.c (mono_image_close): Fix a leak.
11528
11529         * object.c (mono_runtime_invoke_array): Avoid using alloca.
11530
11531         * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.        
11532
11533 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11534
11535         * domain.c, threads.c, threads-types.h: fix memory retention issue
11536         with thread static variables not being cleared on domain unload.
11537         Reuse thread static slots after domain unload.
11538
11539 2007-08-03  Zoltan Varga  <vargaz@gmail.com>
11540
11541         * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
11542         nullable type.
11543
11544         * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
11545         now done in mono_runtime_invoke_array.
11546
11547         * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the 
11548         receiver is a nullable type.
11549
11550         * class.c (mono_class_is_assignable_from): Handle the case when klass is a 
11551         generic parameter.
11552
11553 2007-08-03  Jonathan Chambers  <joncham@gmail.com>
11554
11555         * marshal.c: Implement COM Objects as return type for 
11556         managed->unmanaged calls. Added Release calls for COM Object
11557         out/return values in managed->unmanaged calls.
11558
11559         Code is contributed under MIT/X11 license.
11560
11561 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11562
11563         * threads.h, threads-type.h: move the hazard pointer declarations
11564         to the private header.
11565
11566 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11567
11568         * file-io.c, appdomain.c: memory leak fixes.
11569
11570 2007-08-02  Dick Porter  <dick@ximian.com>
11571
11572         * socket-io.c
11573         (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
11574         SO_REUSEADDR setting into io-layer/sockets.c.
11575
11576 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
11577
11578         * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
11579         from Object when called on a generic parameter. Fixes #82211.
11580
11581 2007-08-01  Dick Porter  <dick@ximian.com>
11582
11583         * file-io.c (convert_share): Test FileShare values bit-by-bit.
11584         Fixes bug 79250 yet again.
11585
11586 2007-07-30  Martin Baulig  <martin@ximian.com>
11587
11588         Merged the `debugger-dublin' branch.
11589
11590         * mono-debug.h
11591         (MonoDebugDataTable): New typedef.
11592         (MonoDebugMethodAddressList): New typedef.
11593         (MonoDebugWrapperData): Removed.
11594         (MonoDebugSymbolTable): Removed `current_data_table',
11595         `current_data_table_size', `current_data_table_offset'.
11596         (MonoDebugDataItemType): Moved into mono-debug.c.
11597         (MonoDebugMethodJitInfo): Remove `address'.
11598         (mono_debug_data_table): New global variable.
11599         (mono_debug_lookup_method_addresses): New public function.
11600         (mono_debug_find_method): Take a `MonoMethod *', not a
11601         `MonoDebugMethodInfo *'.
11602
11603         * mono-debug.c: Drop support for the old symbol tables.
11604
11605 2007-06-28  Martin Baulig  <martin@ximian.com>
11606
11607         * mono-debug.c (mono_debug_debugger_version): New public variable.
11608
11609 2007-07-31  William Holmes  <billholmes54@gmail.com>
11610
11611         * metadata.c Changed mono_type_create_from_typespec to not insert
11612           the type into the hash map until after
11613           do_mono_metadata_parse_type has completed.
11614         Fixes Bug #82194
11615         Code is contributed under MIT/X11 license.
11616
11617 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
11618
11619         * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
11620         generic parameter. Fixes #82211.
11621
11622 2007-07-27  Jb Evain  <jbevain@novell.com>
11623
11624         * pedump.c (dump_metadata, dump_metadata_header): dump
11625         versions contained in the metadata header.
11626
11627 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11628
11629         * threads.c: register small_id_table with the GC.
11630
11631 2007-07-27  Mark Probst  <mark.probst@gmail.com>
11632
11633         * threads.c, threads.h, class-internals.h, object-internals.h:
11634         Hazard pointers, to be used by lock-free parallel algorithms.
11635
11636 2007-07-26  Dick Porter  <dick@ximian.com>
11637
11638         * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
11639         routine on non-windows platforms, as I've not managed to think of
11640         a non-kludgy way of doing this.  Finishes off bug 78739.
11641
11642 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11643
11644         * object.c: properly setup interface_bitmap in proxy vtables.
11645
11646 2007-07-25  Marek Habersack  <mhabersack@novell.com>
11647
11648         * appdomain.c (get_shadow_assembly_location): do not use TickCount
11649         to create unique shadow copy target directories, use the domain's
11650         serial number instead. Each domain gets a unique target directory
11651         that way.
11652
11653         * domain.c (mono_domain_create): added code to increment domain
11654         shadow copy serial number and cache the value in the current
11655         domain structure.
11656
11657         * domain-internals.h (struct _MonoDomain): added a new field -
11658         shadow_serial to hold the serial number used in generation of
11659         shadow-copy directories. This is to make sure that the directory
11660         name is unique for each and every domain created. We avoid a race
11661         condition with overriding assemblies already in use by other app
11662         domains.
11663
11664 2007-07-24  Rodrigo Kumpera  <rkumpera@novell.com>
11665
11666         * class.c (mono_bounded_array_class_get): fixed memory leak when 
11667         binding generic parameters.
11668
11669 2007-07-24  Raja R Harinath  <rharinath@novell.com>
11670
11671         * metadata.c (do_mono_metadata_parse_generic_class): Use
11672         mono_metadata_lookup_generic_class.  Don't g_assert on a metadata
11673         error.
11674
11675 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11676
11677         * loader.c, class-internals.h, reflection.c: removed the per-method
11678         generics hashtable: we use the global one through the call of
11679         mono_class_inflate_generic_method ().
11680
11681 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11682
11683         * class.c, metadata.c, class-internals.h: introduce yet another
11684         generics global cache for inflated methods (fixes 98% of the perf
11685         issue in bug #81806).
11686
11687 2007-07-23  Raja R Harinath  <rharinath@novell.com>
11688
11689         Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
11690         * metadata.c (mono_metadata_lookup_generic_inst): Kill.
11691         (mono_metadata_get_generic_inst): New.  Given a list of MonoType*,
11692         return a MonoGenericInst containing (a copy) of those types.
11693         (mono_metadata_inflate_generic_inst): Update to changes.
11694         (mono_metadata_parse_generic_inst): Likewise.
11695         (mono_get_shared_generic_inst): Likewise.
11696         * reflection.c (mono_class_bind_generic_parameters): Likewise.
11697         (mono_reflection_bind_generic_method_parameters): Likewise.
11698         * metadata-internals.h: Likewise.
11699         * icall.c (free_generic_context): Kill.
11700         (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
11701
11702         * reflection.c (reflection_methodbuilder_to_mono_method): Use
11703         mono_metadata_type_dup.
11704         * marshal.c (mono_mb_create_method): Likewise.
11705
11706         * metadata.c (mono_metadata_type_dup): Rename from
11707         mono_metadata_type_dup_mp.  Take an optional mempool instead of a
11708         MonoImage.  Handle a few more cases, esp. when no mempool is given.
11709         * marshal.c, metadata-internals.h: Update to changes.
11710
11711 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
11712
11713         * class.c: fixed a small leak for array classes and removed warning.
11714
11715 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
11716
11717         * loader.c (mono_method_get_param_token): Make this work on generic methods.
11718         Return 0x8000000 for return parameters. Fixes #82161.
11719
11720 2007-07-21  Marek Habersack  <grendello@gmail.com>
11721
11722         * appdomain.c (get_shadow_assembly_location): append the current
11723         ticks value to the path. Avoids overwriting the same assemblies by
11724         several threads at the same time.
11725
11726 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
11727         and Raja R Harinath  <rharinath@novell.com>
11728
11729         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
11730         Simplify slightly.
11731         (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
11732         property for testing if a method is a generic method definition.
11733
11734 2007-07-20  Atsushi Enomoto  <atsushi@ximian.com>
11735
11736         * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
11737
11738 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
11739
11740         * verify.c: used function from private branch, reverted to the one in class.h 
11741
11742 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
11743
11744         * verify.c: a typo slipped in and the code wont compile
11745
11746 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
11747
11748         * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
11749         disabled box instruction as it is doing the wrong thing
11750         improved stack dump messages, now it is easier to debug type related issues
11751
11752
11753 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
11754
11755         * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak. 
11756
11757 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
11758
11759         * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from 
11760         TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
11761         grouped with class and valuetype. This change will simply 
11762         the code as it should be handled just like unmanaged pointers.
11763
11764 2007-07-19  Mark Probst  <mark.probst@gmail.com>
11765
11766         * class.c (concat_two_strings_with_zero): Fixed a silly bug.
11767
11768 2007-07-19  Rodrigo Kumpera  <rkumpera@novell.com>
11769
11770         * verify.c: several stack merge issues fixed, reference comparisons now
11771         check the type size. strict type check now works correctly.
11772         added more uses of IS_MANAGED_POINTER macro.
11773         fixed issues pointed by running the test suite against .net.
11774         
11775
11776 2007-07-19  Mark Probst  <mark.probst@gmail.com>
11777
11778         * class.c, loader.c, class-internals.h: Removed the
11779         MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
11780         defines.
11781
11782         * icall.c: Better error checking in some internal reflection
11783         methods.
11784
11785 2007-07-18  William Holmes  <billholmes54@gmail.com>
11786
11787         * filewatcher.c : removed unused variable 'filename' in 
11788           ves_icall_System_IO_FSW_SupportsFSW
11789
11790 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11791
11792         * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
11793         obsolete, removed.
11794
11795 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
11796
11797         * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
11798         
11799         * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
11800
11801 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
11802
11803         * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): 
11804         Implement generics support.
11805         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
11806
11807         * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
11808         type_args and method_args arguments.
11809         (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
11810         (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
11811         (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
11812
11813 2007-07-13  Rodrigo Kumpera  <rkumpera@novell.com>
11814
11815         * reflection.c: patch from Thong Nguyen to fix atribute resolution.
11816           It adds a rootimage parameter to mono_reflection_get_type_internal,
11817           adds new function mono_reflection_get_type_with_rootimage and use
11818           the rootimage to resolve the types instead of the current image
11819
11820 2007-07-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
11821
11822         * culture-info-table.h: Forgot to update after r78304.
11823
11824 2007-07-13  Raja R Harinath  <rharinath@novell.com>
11825
11826         * class.c (mono_class_is_open_constructed_type)
11827         <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
11828
11829 2007-07-12  Rodrigo Kumpera  <rkumpera@novell.com>
11830
11831         * class.c (mono_bounded_array_class_get):  method fails if used with
11832         an incomplete TypeBuilder enum (no basetype field), fixed it by 
11833         avoiding calculating the size for such array as it cannot be instantiated.
11834         Fix bug #82015
11835
11836 2007-07-12  Raja R Harinath  <rharinath@novell.com>
11837
11838         * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
11839         field.
11840         * metadata.c, reflection.c: Update to changes.
11841
11842 2007-07-11  Rodrigo Kumpera  <rkumpera@novell.com>
11843
11844         * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
11845         mono_class_is_valid_enum, they are used to valide a enum when loading.
11846         * reflection.c: used new functions to throw TypeLoadException when and
11847         invalid enum is build with TypeBuilder. Fixes #82018
11848   
11849 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
11850
11851         * object.c: forgot commit of mono_class_setup_methods () to access
11852         iface->methods.
11853         * object-internals.h: added a few more handy fields to
11854         MonoIMTCheckItem.
11855
11856 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11857
11858         * object.c (build_imt): Call mono_class_setup_methods () before accessing 
11859         iface->methods.
11860
11861 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
11862
11863         * class-internals.h, object-internals.h, object.c: IMT-based
11864         interface invocation core from Massimiliano Mantione
11865         (massi@ximian.com) with a reworked arch-specific interface,
11866         bsearch implementation and a few bugfixes and memory savings by me.
11867
11868 2007-07-10  Rodrigo Kumpera  <rkumpera@novell.com>
11869
11870         * class.c (mono_class_create_from_typedef): mono would segfault if 
11871         an enum did not have a __value field. It now throws a TypeLoadException
11872         for such cases. Fix bug #82022
11873
11874 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11875
11876         * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
11877
11878 2007-07-09  Mark Probst  <mark.probst@gmail.com>
11879
11880         * class.c (mono_class_init): If a class is already inited but has
11881         an exception_type set, return FALSE, not TRUE.  Fixes: 82050.
11882
11883 2007-07-09  Mark Probst  <mark.probst@gmail.com>
11884
11885         * class.c: Properly handle the case of an unimplemented interface
11886         method.  Fixes: 81673.
11887
11888 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11889
11890         * class-internals.h, object.c: cleanup patch from massi: use
11891         MonoVTable->interface_bitmap since the vtable interfaces offset array
11892         is going away.
11893
11894 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11895
11896         * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
11897         GetMDStreamVersion icall instead.
11898
11899 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11900
11901         * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
11902         not use mono_dl_build_path() with a full library name: makes
11903         fallbacks to libgaim and libfam work.
11904
11905 2007-07-06  William Holmes  <billholmes54@gmail.com>
11906
11907         * assembly.c: Added a continue statement in probe_for_partial_name when
11908          parse_assembly_directory_name fails.  Fixes : 82002
11909
11910 2007-07-06  Rodrigo Kumpera  <rkumpera@novell.com>
11911
11912         * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
11913         and added a verification  for TYPEDBYREF.
11914         * verify.c (verify_stack_type_compatibility): fix handling of byref types,
11915         make native int interchangeable with int32 and some small cleanup and formating.
11916         * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
11917         handle byref of byref.
11918         * verify.c (push_local): handle byref of byref.
11919         * verify.c (do_binop): invalid mix of values is unverifiable
11920         * verify.c (do_invoke_method): fixed the handling of bad params on stack and
11921         added visibility checks
11922         * verify.c (field related method): added visibility checks
11923         * verify.c (do_push_field): cannot take the address of a temporary valuetype field
11924
11925 2007-07-06  Zoltan Varga  <vargaz@gmail.com>
11926
11927         * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
11928         string.
11929
11930 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11931
11932         * profiler.c (mono_profiler_load): Fix an off-by-one error.
11933
11934         * marshal.c (emit_marshal_string): When returning a string from managed code,
11935         allways make a copy even for unicode strings. Fixes #81990.
11936
11937 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
11938
11939         * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
11940         of byref generic inst types (bug #81997).
11941
11942 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
11943
11944         * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
11945         * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
11946
11947 2007-07-02  Zoltan Varga  <vargaz@gmail.com>
11948
11949         * marshal.c (emit_marshal_string): Add support for unicode strings in
11950         MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
11951
11952 2007-07-02 Rodrigo Kumpera  <rkumpera@novell.com>
11953
11954         * verify.c: field load/store are now verified, missing only access checks now
11955
11956 2007-06-28  Martin Baulig  <martin@ximian.com>
11957
11958         * mono-debug.c (mono_debug_debugger_version): New public variable.
11959
11960 2007-06-24  Gert Driesen  <drieseng@users.sourceforge.net>
11961
11962         * locales.c: When constructing DateTimeFormat or NumberFormat for
11963         MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
11964         MonoCultureInfo contructed from the current locale is always
11965         read-only and has UseUserOverride set to true. All MonoCultureInfo
11966         instances returned for GetCultures have both IsReadOnly and
11967         UseUserOverride set to true. Fixes part of bug #81930.
11968
11969 2007-06-22  Jonathan Chambers  <joncham@gmail.com>
11970
11971        * icall-def.h: Update System.__ComObject icalls
11972        * marshal.c: Avoid managed transition (and object creation)
11973        when looking up COM interface in RCW.
11974        * marshal.h: Ditto.
11975        
11976        Code is contributed under MIT/X11 license.
11977
11978 2007-06-22  Zoltan Varga  <vargaz@gmail.com>
11979
11980         * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
11981         to avoid crashes during assembly unloading.
11982
11983 2007-06-22  Raja R Harinath  <rharinath@novell.com>
11984
11985         Fix MethodInfo.IsGenericMethodDefinition
11986         * reflection.c (mono_reflection_bind_generic_method_parameters):
11987         Rearrange code to ensure we always uses a generic method definition.
11988         * class.c (mono_class_inflate_generic_method_full): Set
11989         'generic_container' field only for generic method definitions.
11990         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
11991         Use presense of 'generic_container' field as indication of being a
11992         generic method definition.
11993
11994 2007-06-21  Zoltan Varga  <vargaz@gmail.com>
11995
11996         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11997
11998         * object-internals.h: Reflect changes in the layout of the managed Delegate
11999         class.
12000         
12001         * object-internals.h reflection.c icall-def.h: Applied patch from Robert
12002         Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
12003         runtime memory used by the dynamic method. Fixes #77146.
12004
12005 2007-06-21  Dick Porter  <dick@ximian.com>
12006
12007         * file-io.h: 
12008         * file-io.c (convert_share): Cope with FileShare.Delete.  Patch
12009         from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
12010         81767.
12011
12012 2007-06-21  Raja R Harinath  <rharinath@novell.com>
12013
12014         * reflection.c (method_encode_methodspec): Add a tripwire.
12015         * class.c (inflate_generic_type): The fully open generic type is
12016         not the same as the generic type definition.
12017
12018 2007-06-21  Martin Baulig  <martin@ximian.com>
12019
12020         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
12021
12022         * mono-debug-debugger.h
12023         (MonoDebuggerBreakpointInfo): Removed.
12024         (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
12025         (mono_debugger_remove_breakpoint): Likewise.
12026         (mono_debugger_breakpoint_callback): Likewise.
12027         (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
12028
12029 2007-06-21  Raja R Harinath  <rharinath@novell.com>
12030
12031         * metadata.c (mono_metadata_lookup_generic_class): The fully open
12032         generic type is not the same as the generic type definition.
12033         * class.c (mono_generic_class_get_class): Likewise.
12034
12035 2007-06-20  Geoff Norton  <gnorton@customerdna.com>
12036
12037         * icall.c: The second argument to 
12038         System.Reflection.MethodBase.GetMethodFromHandleInternalType
12039         is a MonoType not a MonoClass.
12040
12041 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
12042
12043         * verify.c: support for function pointers in the verifier
12044
12045 2007-06-20  Rodrigo Kumpera  <kumpera@gmail.com>
12046
12047         * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
12048
12049 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12050
12051         * assembly.c: removed Mono.Data.SqliteClient from the list of
12052         forward-compatible assemblies as it breaks the ABI (bug #81899).
12053
12054 2007-06-19  Raja R Harinath  <rharinath@novell.com>
12055
12056         * metadata.c (mono_metadata_lookup_generic_class): Protect cache
12057         lookup/update with the loader lock.
12058         * reflection.c (mono_class_bind_generic_parameters): No need to
12059         protect mono_metadata_lookup_* with the loader lock.
12060         * class.c (inflate_generic_type): Likewise.
12061         
12062         * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
12063         on a generic instantiated type.
12064
12065 2007-06-18  Rodrigo Kumpera <kumpera@gmail.com>
12066
12067         *verify.c: produce meanfull error messages on verification error
12068         *verify.c: fixed some cases of verification errors reported as validation errors
12069         *pedump.c: fixed the error name array, now it shows validation errors properly
12070         *verify.h: fixed the contant that should be used for verification errors
12071
12072 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
12073
12074         * metadata.c, image.c, metadata-internals.h: part of the fixes needed
12075         for bug #77596, 81858 and 80743 (generics data structures on domain
12076         unload).
12077
12078 2007-06-15  Raja R Harinath  <rharinath@novell.com>
12079
12080         Avoid allocating 'MonoGenericContext' on the heap.
12081         * class-internals (_MonoMethodInflated::context): Make field
12082         inline, not a pointer.
12083         * loader.c (method_from_methodspec): Allocate 'new_context' on the
12084         stack.  Use the context embedded within the inflated method as the
12085         hash key, rather than 'new_context'.
12086         * class.c (inflate_generic_context): Simplify.  Return a struct
12087         rather than allocating on the heap.
12088         (mono_class_inflate_generic_method_full): Update to changes.  Now,
12089         doesn't salt away a copy of the context -- simplifying the
12090         lifetime rules of a 'MonoGenericContext *'.
12091         (mono_method_get_context): Return pointer to embedded context.
12092         (setup_generic_array_ifaces): Allocate temporary context on stack.
12093         * reflection.c (inflate_mono_method): Likewise.
12094         (mono_reflection_bind_generic_method_parameters): Likewise.
12095         Use the context embedded within the inflated method as the hash key.
12096
12097         Avoid a source of allocation of 'MonoGenericContext'.
12098         * class-internals.h (_MonoGenericClass::context): Combine 'inst'
12099         and 'cached_context' fields into embedded 'MonoGenericContext' field.
12100         * class.c: Update to changes.
12101         (mono_generic_class_get_context): Simplify drastically.  Now just
12102         returns a pointer to the field.
12103         * metadata-internals.h (mono_metadata_generic_context_hash): Mark
12104         argument as a const pointer.
12105         (mono_metadata_generic_context_equal): Likewise.
12106         * metadata.c, loader.c, icall.c, reflection.c, verify.c:
12107         Update to changes.
12108
12109 2007-06-14  Rodrigo Kumpera  <kumpera@gmail.com>
12110
12111         * verify.c improved the handling of brtrue/brfalse, factored out common code
12112
12113 2007-06-14  Raja R Harinath  <rharinath@novell.com>
12114
12115         Kill MonoGenericMethod.
12116         * class-internals.h (MonoGenericContext::method_inst): Rename from
12117         'gmethod' and convert to a MonoGenericInst.
12118         (MonoGenericMethod): Remove.
12119         * metadata.h (MonoGenericMethod): Note that the name is obsolete.
12120         * loader.c (method_from_methodspec): Update to changes.  Use a
12121         MonoGenericContext as the key to the hashtable.
12122         * metadata.c (mono_metadata_generic_context_equal): Rename from 
12123         'mono_metadata_generic_method_equal' and take MonoGenericContext.
12124         (mono_metadata_generic_context_hash): Likewise from
12125         'mono_metadata_generic_method_hash'.  Change hash function.
12126         (mono_metadata_load_generic_params): Update to changes.
12127         (mono_get_shared_generic_method): Remove.
12128         * metadata-internals.h (mono_get_shared_generic_method): Remove.
12129         * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
12130         (inflate_generic_context): Likewise.
12131         (mono_class_inflate_generic_method_full): Likewise.
12132         (setup_generic_array_ifaces): Likewise.
12133         (mono_class_create_from_typespec): Likewise.
12134         * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
12135         (method_encode_methodspec): Update callsite.
12136         (reflection_methodbuilder_to_mono_method): Update to changes.
12137         (mono_reflection_bind_generic_method_parameters): Likewise.  Use a
12138         MonoGenericContext as the key to the hashtable.
12139         (inflate_mono_method): Update to changes.
12140
12141         * class-internals.h (MonoGenericMethod::container): Remove.
12142         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
12143
12144 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12145
12146         * profiler-private.h, profiler.c, profiler.h: added API to profile
12147         exception events.
12148
12149 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
12150
12151         * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments 
12152
12153 2007-06-13  Rodrigo Kumpera  <kumpera@gmail.com>
12154
12155         * verify.c: method invocation is now validated, now we verify parameter types on stack.
12156         Fixed overflow and underflow not aborting the verification process.
12157
12158 2007-06-13  Mark Probst  <mark.probst@gmail.com>
12159
12160         * class-internals.h (MonoStats): Added stats entries for dynamic
12161         code allocations.
12162
12163 2007-06-12  Zoltan Varga  <vargaz@gmail.com>
12164
12165         * loader.c (mono_free_method): Free header->locals and header->clauses.
12166
12167         * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
12168         dynamic case.
12169
12170         * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
12171
12172         * class.c (setup_interface_offsets): Allocate memory from the image mempool.
12173
12174 2007-06-12  Raja R Harinath  <rharinath@novell.com>
12175
12176         * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
12177         the tables.
12178
12179 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
12180
12181         *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
12182
12183 2007-06-11  Raja R Harinath  <harinath@gmail.com>
12184
12185         MonoGenericMethod on a diet
12186         * class-internals.h (_MonoMethodInflated::reflection_info): Move
12187         here ...
12188         (_MonoGenericMethod::reflection_info): ... from here.
12189         * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
12190         Update to changes.
12191         * reflection.c (inflate_mono_method): Likewise.
12192         (mono_reflection_bind_generic_method_parameters): Likewise.
12193
12194 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
12195
12196         *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
12197         *verify.c: factored long ldarg forms to share code with short forms
12198
12199 2007-06-11  Rodrigo Kumpera  <kumpera@gmail.com>
12200
12201         *verify.c: fixed code formating factored some duplicate code
12202         into a new function
12203
12204         *verify.h: fixed binary incompatibility introduced earlier
12205
12206         *pedump.c: fixed formating
12207
12208 2007-06-11  Raja R Harinath  <harinath@gmail.com>
12209
12210         Fix assertion when disassembling Mono.C5.dll
12211         * loader.c (method_from_methodspec): Avoid inflating a method
12212         twice with the same context.  If the methodref is inflated, use
12213         the declaring method instead.
12214
12215         * class.c (mono_class_from_generic_parameter): Fix case similar to
12216         bug #81830 handled below, but for method containers.
12217
12218 2007-06-10  Raja R Harinath  <harinath@gmail.com>
12219
12220         * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
12221         get_shared_generic_class.  Directly inflate the instance.
12222         [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
12223         (inflate_generic_class): Delete.
12224         (get_shared_generic_class): Delete.  Move setting of
12225         'cached_class' and 'cached_context' ...
12226         * metadata.c (mono_metadata_lookup_generic_class): ... here.
12227
12228         * metadata.c (mono_metadata_lookup_generic_class): Change
12229         signature to take the components of a MonoGenericClass rather than
12230         an allocated MonoGenericClass.  Change semantics to be intern-like.
12231         * reflection.c (mono_class_bind_generic_parameters): Update to
12232         changes.  Make locking region tighter.
12233         * class.c (inflate_generic_class): Update to changes.
12234         (get_shared_generic_class): Likewise.
12235         * metadata-internals.h: Likewise.
12236
12237         * reflection.c (mono_class_bind_generic_parameters): Take and
12238         return a MonoClass*, not a MonoType*.  Add 'is_dynamic' parameter.
12239         (mono_reflection_bind_generic_parameters): Use
12240         'mono_class_bind_generic_parameters' rather than duplicate the code.
12241         * class.c (mono_bounded_array_class_get): Update to changes.
12242         * object-internals.h: Likewise.
12243
12244         * reflection.c (mono_class_bind_generic_parameters): Only support
12245         parameterizing generic type definitions.  Remove support for other
12246         open types.
12247
12248 2007-06-08  Zoltan Varga  <vargaz@gmail.com>
12249
12250         * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
12251
12252         * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
12253         in the dynamic case.
12254
12255 2007-06-08  Gert Driesen  <drieseng@users.sourceforge.net>
12256
12257         * threads.c: When cleaning up thread, reset the Background bit.
12258         Fixes bug #81720.
12259
12260 2007-06-08  Jonathan Chambers  <joncham@gmail.com>
12261
12262        * metadata.c: Move variable declarations to top of scope.
12263        * verify.c: Move variable declarations to top of scope.
12264
12265        Code is contributed under MIT/X11 license.
12266
12267 2007-06-08  Raja R Harinath  <rharinath@novell.com>
12268
12269         * reflection.c (mono_class_bind_generic_parameters): Replace
12270         open-coded loop with mono_metadata_inflate_generic_inst.
12271
12272         * class.c (get_shared_generic_class): Don't call
12273         mono_get_shared_generic_inst.  Use the container's own
12274         'class_inst'.
12275
12276         * metadata.c (mono_metadata_load_generic_params): Move
12277         initialization of 'context' field here from ...
12278         * class.c (mono_class_create_from_typedef): ... here, and ...
12279         * loader.c (mono_get_method_from_token): ... here.
12280
12281         * class.c (get_shared_generic_class): Rename from
12282         mono_get_shared_generic_class and make static.
12283         (mono_get_shared_generic_inst): Move to metadata.c.
12284         * loader.c (mono_get_shared_generic_method): Likewise.
12285         * class-internals.h, metadata-internals.h: Update to changes.
12286
12287         Fix #81830
12288         * class.c (mono_class_from_generic_parameter): Don't assume a
12289         generic container owner exists.  Generic containers from monodis
12290         don't have any.
12291
12292 2007-06-06  Rodrigo Kumpera  <kumpera@gmail.com>
12293
12294         * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
12295         * verify.h: new typedefs to returns the non-verifiable status
12296         * verify.c: initial implementation of generics, stack merging and object compatibility check
12297
12298 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12299
12300         * class.c, image.c, class-internals.h (MonoImage): class_cache is
12301         a MonoInternalHashTable again (fixed bug in internal hash table
12302         code).
12303
12304 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12305
12306         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12307         MonoInternalHashTable again (fixed bug in internal hash table
12308         code).
12309
12310 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12311
12312         * class.c, image.c, class-internals.h, domain.c,
12313         domain-internals.h (MonoImage): Reverting MonoInternalHashTable
12314         changes.  Have to figure out what makes them break the SWF
12315         regression.
12316
12317 2007-06-04  Mark Probst  <mark.probst@gmail.com>
12318
12319         * class.c, image.c, class-internals.h (MonoImage): class_cache is
12320         a MonoInternalHashTable now.
12321
12322 2007-06-04  Mark Probst  <mark.probst@gmail.com>
12323
12324         * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
12325         MonoInternalHashTable now.
12326
12327 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
12328
12329         * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
12330         invoke_impl code.
12331
12332         * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
12333
12334         * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
12335         dependent trampoline.
12336
12337         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12338
12339         * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
12340
12341 2007-05-29  Robert Jordan  <robertj@gmx.net>
12342
12343         * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
12344
12345 2007-05-28  Zoltan Varga  <vargaz@gmail.com>
12346
12347         * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
12348
12349 2007-05-25  Jonathan Chambers  <joncham@gmail.com>
12350
12351        * marshal.c: Fix interface lookup loops for
12352        cominterop_get_com_slot_for_method and 
12353        cominterop_get_method_interface. Only need to lookup
12354        if type is a class, else use interface type method is on.
12355
12356        Code is contributed under MIT/X11 license.
12357
12358 2007-05-25  Sebastien Pouliot  <sebastien@ximian.com>
12359
12360         * reflection.c: HasSecurity can be present even if no specially 
12361         encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
12362         SecurityAttribute). Fix CAS regression tests on buildbot.
12363
12364 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
12365
12366        * appdomain.c: Add configure checks for header files.
12367        * image.c: Add configure checks for header files.
12368        * file-io.c: Add configure checks for header files.
12369        * debug-mono-symfile.c: Add configure checks for header files.
12370        * threadpool.c: Add configure checks for header files.
12371        * console-io.c: Add configure checks for header files.
12372        * profiler.c: Add configure checks for header files.
12373        * rawbuffer.c: Add configure checks for header files.
12374        * icall.c: Add configure checks for header files.
12375        * rand.c: Add configure checks for header files.
12376        * socket-io.c: Add configure checks for header files.
12377
12378        Code is contributed under MIT/X11 license.
12379
12380 2007-05-24  Zoltan Varga  <vargaz@gmail.com>
12381
12382         * reflection.c (mono_custom_attrs_from_builders): Remove the 
12383         assertion as it breaks the build.
12384         
12385         * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
12386
12387         * reflection.c (lookup_custom_attr): Make a copy here too.
12388
12389         * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
12390         dynamic images.
12391
12392         * class.c (mono_class_init): Avoid accessing the metadata in dynamic
12393         images.
12394
12395         * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
12396         info.
12397
12398 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
12399
12400         * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
12401         (load_cattr_value): Ditto.
12402
12403 2007-05-20  Zoltan Varga  <vargaz@gmail.com>
12404
12405         * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
12406
12407 2007-05-19  Gert Driesen  <drieseng@users.sourceforge.net>
12408
12409         * threads.c: In "start_wrapper", set apartment_state to MTA if
12410         apartment_state is Unknown and we're running on 2.0 profile or
12411         higher.
12412         * object.c: In "mono_runtime_exec_main", if STAThread is not applied
12413         to main method, then set apartment_state to Unknown on 1.0 profile,
12414         and MTA on 2.0 profile.
12415
12416 2007-05-16  Jb Evain  <jb@nurv.fr>
12417
12418         * class-internals.h (MonoDefaults): Add an attribute_class and
12419           customattribute_data_class.
12420         * domain.c (mono_init_internal): Populate them.
12421         * reflection.c: Use them to remove duplicates. Make a vew
12422         MonoClass variables `static'.
12423
12424 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
12425
12426         * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
12427         step in implementing IMT, so that all isinst checks now can go
12428         through the bitmap.
12429         This was needed because vtables for TransparentProxy need to look
12430         like the vtable of the "target" class, so they need to point to
12431         its interface bitmap directly.
12432
12433         * object.c: inside "mono_class_create_runtime_vtable" and
12434         "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
12435
12436 2007-05-15  Atsushi Enomoto  <atsushi@ximian.com>
12437
12438         * object-internals.h
12439           culture-info.h : added territory field in MonoCulture and
12440           CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
12441         * locales.c : fill territory field above too.
12442         * culture-info-table.h : regenerated.
12443
12444 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
12445
12446         * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
12447         Fixes #81599.
12448
12449 2007-05-11  Jonathan Chambers  <joncham@gmail.com>
12450
12451         * object.c: Always initialize apartment, even if 
12452         there is no custom attributes on entry point.
12453         
12454         Code is contributed under MIT/X11 license.
12455
12456 2007-05-10  Jonathan Chambers  <joncham@gmail.com>
12457
12458         * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
12459         * metadata.c: If no encoding is set, check for unicode
12460         on class.
12461         
12462         Code is contributed under MIT/X11 license.
12463
12464 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
12465
12466         * threads.c: Handle if mono_thread_current returns NULL 
12467         
12468         Code is contributed under MIT/X11 license.
12469
12470 2007-05-09  Jonathan Chambers  <joncham@gmail.com>
12471
12472         * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
12473         in start_wrapper. Added mono_thread_init_apartment_state and
12474         mono_thread_cleanup_apartment_state.
12475         * object.c: Initialize thread apartment state on main thread
12476         by checking for STAThreadAttribute on entry point.
12477         * object-internals.h: Add apartment_state field to MonoThread.
12478         * threads-types.h: Add unmanaged definition of 
12479         System.Threading.ApartmentState, MonoThreadApartmentState.
12480         
12481         Code is contributed under MIT/X11 license.
12482         
12483 2007-05-08  Jonathan Chambers  <joncham@gmail.com>
12484
12485         * class.c: Fix windows build.
12486         * class-internals.h: Fix windows build.
12487         
12488         Code is contributed under MIT/X11 license.
12489
12490 2007-05-08  Robert Jordan  <robertj@gmx.net>
12491
12492         * process.c (CreateProcess_internal):
12493         Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
12494         .CreateNoWindow was specified. Fixes #81496.
12495
12496 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
12497
12498         * class-internals.h: Removed "MonoClass.interface_offsets" as a first
12499         step in implementing IMT, replaced it with two compact arrays
12500         (interfaces_packed and interface_offsets_packed) and a bitmap that
12501         is used for isinst checks (interface_bitmap).
12502
12503         * class.c: (compare_interface_ids): compare function to pass to
12504         bsearch when looking for an interface with a given id.
12505         (mono_class_interface_offset): reimplemented using bsearch on
12506         interfaces_packed, getting the offset from interface_offsets_packed.
12507         (print_implemented_interfaces): utility debugging function.
12508         (setup_interface_offsets): reworked to initialize interfaces_packed,
12509         interface_offsets_packed and interface_bitmap.
12510
12511         * object.c: replaced all accesses to "MonoClass.interface_offsets"
12512         with uses of interfaces_packed and interface_offsets_packed.
12513
12514 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
12515
12516         * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
12517         mono_class_interface_offset prototype to wrap all accesses to
12518         "MonoClass.interface_offsets".
12519
12520         * class.c: Implemented mono_class_interface_offset, and wrapped all
12521         accesses to "MonoClass.interface_offsets".
12522
12523         * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
12524         "MonoClass.interface_offsets".
12525
12526 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
12527
12528         * icall.c, icall-def.h: implemented new GetFieldFromHandle and
12529         GetMethodFromHandle overloads (bug #78637).
12530
12531 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
12532
12533         * assembly.c: parse ProcessorArchitecture in assembly name and ignore
12534         it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
12535
12536 2007-05-01  Zoltan Varga  <vargaz@gmail.com>
12537
12538         * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
12539         #81498.
12540
12541         * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
12542         gracefully.
12543         (mono_custom_attrs_from_index): Ditto.
12544
12545         * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes. 
12546         Fixes #81501.
12547
12548 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
12549
12550         * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
12551         is now allocated from a mempool.
12552
12553 2007-04-28  Zoltan Varga  <vargaz@gmail.com>
12554
12555         * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
12556         caller holds threads_lock, leading to deadlocks. Fixes #81476.
12557
12558 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
12559
12560         * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
12561         mono_loader_clear_error () too late. Fixes #81463.
12562
12563 2007-04-26  Atsushi Enomoto  <atsushi@ximian.com>
12564
12565         * culture-info-table.h : regenerated.
12566
12567 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
12568
12569         * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
12570         is missing.
12571
12572 2007-04-25  Dick Porter  <dick@ximian.com>
12573
12574         * Makefile.am: Put the mingw enforced-optimisation back into the
12575         PLATFORM_WIN32 section.
12576
12577 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
12578
12579         * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
12580         patch.
12581
12582         * image.c (mono_image_load_module): New API function to load a module reference.
12583
12584         * image.c (load_modules): Load modules lazily. Fixes #80812.
12585
12586         * class.c (mono_class_from_typeref): Use mono_image_load_module.
12587         
12588         * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
12589
12590         * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this 
12591         to mono_image_load_module_dynamic.
12592
12593 2007-04-23  Jonathan Chambers  <joncham@gmail.com>
12594
12595         * marshal.c: Fix calling convention for CCW on non-windows
12596         platforms. STDCALL on windows, CDECL everywhere else to work 
12597         with XPCOM and MainWin COM.
12598         
12599         Code is contributed under MIT/X11 license.
12600
12601 2007-04-23  Martin Baulig  <martin@ximian.com>
12602
12603         Fix #80969.
12604
12605         * loader.c
12606         (method_from_memberref): Added `gboolean *used_context' argument.
12607         (mono_get_method_from_token): Likewise.
12608         (mono_get_method_full): Don't insert the method in the cache when
12609         `used_context' is true.
12610
12611 2007-04-23  Raja R Harinath  <rharinath@novell.com>
12612
12613         * monodiet.c (add_types_from_method): Fix "wrong type" warning.
12614
12615         * reflection.c (mono_reflection_bind_generic_parameters): Don't
12616         create new MonoTypes for returned types.
12617         * class.c (mono_generic_class_get_class): Export mono-internal.
12618         * class-internals.h: Update to changes.
12619
12620 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
12621
12622         * threadpool.c, threadpool.h, icall-def.h: patch from
12623         Robert Jordan to implemnt ThreadPool.SetMaxThreads.
12624
12625 2007-04-18  Zoltan Varga  <vargaz@gmail.com>
12626
12627         * threads.c (mono_thread_get_stack_bounds): Fix windows build.
12628         
12629         * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
12630
12631         * threads.c (mono_thread_get_stack_bounds): New helper function.
12632
12633         * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
12634         Correctly compute stack bounds when attaching. Fixes #81394.
12635
12636 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
12637
12638         * reflection.c: fix handling of doubles in custom attributes
12639         for the arm-fpa format (bug #81368).
12640
12641 2007-04-18  Raja R Harinath  <rharinath@novell.com>
12642
12643         * reflection.c (assembly_add_win32_resources): Mildly relax an
12644         bounds check to let the end pointer point just past the end of the
12645         allocated buffer.  (may fix #81384)
12646
12647 2007-04-17  Atsushi Enomoto  <atsushi@ximian.com>
12648
12649         * culture-info-table.h : regenerated.
12650
12651 2007-04-07  Zoltan Varga  <vargaz@gmail.com>
12652
12653         * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
12654         the thread is aborted early.
12655
12656 2007-04-05  Dick Porter  <dick@ximian.com>
12657
12658         * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
12659         FindFirstFile()/FindNextFile() to find entries.  This lets the
12660         io-layer versions use MONO_IOMAP compatibility helpers.  Fixes bug
12661         81038.
12662
12663         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
12664         the parameters of
12665         ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
12666
12667 2007-04-04  Martin Baulig  <martin@ximian.com>
12668
12669         * debug-helpers.c
12670         (mono_method_desc_full_match): Add support for nested classes.
12671
12672 2007-04-02  Zoltan Varga  <vargaz@gmail.com>
12673
12674         * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
12675
12676 2007-04-01  Zoltan Varga  <vargaz@gmail.com>
12677
12678         * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
12679         waiting for too many threads.
12680
12681 2007-03-28  Sebastien Pouliot  <sebastien@ximian.com>
12682
12683         * environment.c: Fix return value check on uname so we can get the 
12684         executing version on Solaris operating systems.
12685
12686 2007-03-28  Jb Evain  <jbevain@gmail.com>
12687
12688         * class.c (mono_type_get_name_recurse): Complete the
12689         fix for the creation of assembly qualified names for
12690         pointer types. Fixes #81208.
12691
12692 2007-03-27  Dick Porter  <dick@ximian.com>
12693
12694         * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
12695         of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
12696         changed.
12697
12698         * threads.c
12699         (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
12700         the value of ReleaseMutex().
12701
12702 2007-03-27  Dick Porter  <dick@ximian.com>
12703
12704         * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
12705         in little-endian order, not network endian, so must be converted
12706         to host endian here.  Fixes bug 80593.
12707
12708 2007-03-22  Jb Evain  <jbevain@gmail.com>
12709
12710         * class.c (mono_type_get_name_recurse): Fix the creation of assembly
12711         qualified names for pointer types. Fixes #81208.
12712
12713 2007-03-21  Jonathan Chambers  <joncham@gmail.com>
12714
12715         * marshal.c: Add support for PreserveSigAttribute. 
12716         
12717         Code is contributed under MIT/X11 license.
12718
12719 2007-03-14  Zoltan Varga  <vargaz@gmail.com>
12720
12721         * process.c: Fix endianness issues. Fixes #81126.
12722
12723         * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
12724         multiple circular calls made from the same DynamicMethod work. Fixes #81141.
12725
12726         * image.c (mono_image_lookup_resource): Make this work on big-endian
12727         machines.Change API contract so the caller needs to free the return value.
12728         
12729         * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
12730         API change.
12731         
12732 2007-03-14  Martin Baulig  <martin@ximian.com>
12733
12734         * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
12735         mono_type_get_desc() as well.
12736
12737 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12738
12739         * icall.c:  Fix environ access in VS.  
12740         
12741 2007-03-13  Alp Toker  <alp@atoker.com>
12742
12743         * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
12744         rather than the underlying type. Based on a patch by Ben Maurer. Fixes
12745         #63841.
12746
12747 2007-03-12  Zoltan Varga  <vargaz@gmail.com>
12748
12749         * reflection.c (mono_reflection_create_dynamic_method): Add support for 
12750         circular references among dynamic methods. Fixes #81091.
12751
12752         * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
12753
12754 2007-03-09  Martin Baulig  <martin@ximian.com>
12755
12756         * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
12757
12758 2007-03-09  Jonathan Chambers  <joncham@gmail.com>
12759
12760         * appdomain.c:  Fix shadow copy on Windows. Use g_snprintf instead
12761         of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.  
12762         
12763         Code is contributed under MIT/X11 license.
12764         
12765 2007-03-09  Gert Driesen  <drieseng@users.souceforge.net>
12766
12767         * loader.c: Reapply patch for bug #79424.
12768
12769 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
12770
12771         * metadata.c (mono_type_to_unmanaged): Only convert object to
12772         MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
12773
12774 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
12775
12776         * class-internals.h, class.c, metadata.c, reflection.c: removed unused
12777         (and incorrectly set) is_reference field from MonoGenericInst.
12778
12779 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
12780
12781         * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
12782         a little earlier.
12783
12784         * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
12785
12786         * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
12787
12788 2007-03-05  Miguel de Icaza  <miguel@novell.com>
12789
12790         * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
12791         FileOptions.1 value to mean "temporary", map that to
12792         FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
12793
12794         Fixes 80688
12795
12796 2007-03-03  Marek Habersack  <mhabersack@novell.com>
12797
12798         * appdomain.c: implement MS .Net style shadow copying. Copies of
12799         the assemblies are made in a subdirectory of the dynamic base
12800         directory, the assembly names are preserved.
12801         Copy .mdb and .config files along with the assemblies being shadowed.
12802
12803 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
12804
12805         * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
12806         (emit_marshal_handleref): Ditto.
12807
12808         * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
12809         on Visual C++. Fixes #80671.
12810
12811 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12812
12813         * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
12814         for clone operations.
12815
12816 2007-02-28  Zoltan Varga  <vargaz@gmail.com>
12817
12818         * marshal.c: Fix warnings.
12819
12820 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
12821
12822         * loader.c: allow case-insensitive matching of the dll name
12823         in dllmap handling when prefixed with "i:".
12824
12825 2007-02-20  Jonathan Chambers  <joncham@gmail.com>
12826
12827         * threads.c: Fix #ifdef for dummy_apc function for VS.
12828
12829 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12830
12831         * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
12832
12833 2007-02-19  Massimiliano Mantione  <massi@ximian.com>
12834         * class.c (mono_class_setup_vtable_general): Fix bug 75903,
12835         giving precedence to the methods with a fully qualified name
12836         (InterfaceName.MethodName) when building the interface sections
12837         of the vtable.
12838
12839 2007-02-16  Dick Porter  <dick@ximian.com>
12840
12841         * threadpool.c (append_job): Fix fast-path array handling, so it's
12842         less likely the array will grow exponentially when the load is
12843         heavy.
12844
12845 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
12846
12847         * metadata-internals.h, loader.c: fix dllmap lookup order
12848         for non-function maps, too, and prepare for fallback code.
12849
12850 2007-02-12  Robert Jordan  <robertj@gmx.net>
12851
12852         * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
12853         to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
12854         and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
12855         GlobalFree. Fixes a part of bug #77075.
12856
12857 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
12858
12859         * loader.c: implemented typedef parent in field memberref.
12860
12861 2007-02-11  Jonathan Chambers  <joncham@gmail.com>
12862
12863         * marshal.c: Fix warnings and remember to call Release on
12864         IUnknown of RCW.
12865         
12866         Code is contributed under MIT/X11 license.
12867
12868 2007-02-10  Miguel de Icaza  <miguel@novell.com>
12869
12870         * class-internals.h: Add MonoHandleRef definition, and
12871         handleref_class to mono_defaults. 
12872
12873         * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
12874         structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
12875
12876         * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
12877         (do nothing on this stage)
12878         (emit_object_to_ptr_conv): Extract the handle from the HandleRef.  
12879         (emit_marshal_handleref): New method, used for argument handling
12880         of HandleRefs. 
12881
12882 2007-02-08  Jonathan Chambers  <joncham@gmail.com>
12883
12884         * class.c (mono_class_setup_parent): Lazily init com types.
12885         * domain.c (mono_init_internal, mono_init_com_types): Lazily 
12886         init com types.
12887         * object.c (mono_remote_class_vtable): Lazily init com types.
12888         * class-internals.h: Add iunknown and idispatch to MonoDefaults.
12889         * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
12890         * domain-internals.h: Expose mono_init_com_types.
12891         * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
12892         * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
12893         Add support for COM Callable Wrapper marshalling.
12894         * marshal.h: Add icall definitions.
12895         * gc.c: Handle freeing of CCWs in finalizer code.
12896         
12897         Code is contributed under MIT/X11 license.
12898
12899 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
12900
12901         * reflection.c: changed all the signature encoding code to use
12902         a variable-sized buffer.
12903
12904 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12905
12906         * marshal.c: locking fixes: never take the loader lock
12907         or other runtime locks when holding the marshal lock
12908         (fixes bug#80664).
12909
12910 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
12911
12912         * marshal.c: make the delegate function pointer mapping
12913         work for the moving GC.
12914
12915 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
12916
12917         * marshal.c: fix from Robert Jordan (robertj@gmx.net)
12918         for bug #80618.
12919
12920 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12921
12922         * image.h, loader.c, metadata-internals.h: use mono-dl instead of
12923         gmodule.
12924
12925 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12926
12927         * threadpool.c: made the code moving-GC safe.
12928
12929 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
12930
12931         * assembly.c, boehm-gc.c, class-internals.h, class.c,
12932         debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
12933         monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
12934         warning cleanup.
12935         * reflection.c: warning cleanup, some threading and moving GC fixes.
12936
12937 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
12938
12939         * class.c, loader.c: create the needed Set/Get/Address array methods
12940         as well as the .ctors in mono_class_init (), fixes bug #80567.
12941
12942 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
12943
12944         * class.c (mono_class_layout_fields): When force-aligning a field, make sure
12945         we doesn't decrease its alignment. Should fix the sparc build.
12946
12947 2007-01-24  Dick Porter  <dick@ximian.com>
12948
12949         * socket-io.c
12950         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
12951         Create the returned object if we need to ignore an unsupported
12952         socket option.  Fixes a segfault reported by Atsushi.
12953
12954 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
12955
12956         * class.c, object.c: restrict GC-tracked fields to
12957         UIntPtr fields used inside corlib, so we provide better
12958         type info to the GC and also allow broken packing as in
12959         bug #80580.
12960
12961 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
12962
12963         * sgen-gc.c: removed duplicated function.
12964
12965 2007-01-19  Miguel de Icaza  <miguel@novell.com>
12966
12967         *  socket-io.c (convert_sockopt_level_and_name): return -2 as a
12968         value that means that the value is not supported, but that we
12969         should not return a failure, but instead report this as a
12970         successful operation.
12971
12972 2007-01-19  Raja R Harinath  <rharinath@novell.com>
12973
12974         Fix tests/bug79956.2.il
12975         * class.c (mono_type_get_underlying_type): Handle genericinst enums.
12976         (mono_generic_class_get_class): If the generic definition in an
12977         enum, copy over other fields related to it.
12978
12979 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12980
12981         * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
12982         genericinst enums (bug #79215).
12983
12984 2007-01-17  Massimiliano Mantione  <massi@ximian.com>
12985         * class.c: Fix bug 80307.
12986
12987 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
12988
12989         * image.c: if the file table is not present, try to load
12990         all the modules, since we don't have info about them
12991         having or not metadata (bug #80517).
12992         * assembly.c: allow mono_assembly_load_references () to
12993         work for netmodules.
12994
12995 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
12996
12997         * image.c, metadata-internals.h, object.c: execute module
12998         cctors when running on the 2 runtime if present (bug #80487).
12999
13000 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13001
13002         * icall.c: optimized InitializeArray() on bigendian.
13003
13004 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
13005
13006         * icall.c: fix for the broken ARM FPA double format.
13007
13008 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
13009
13010         * icall.c: handle endian issues for r4 and r8 types, too, in
13011         the InitializeArray() icall.
13012
13013 2007-01-15  Miguel de Icaza  <miguel@novell.com>
13014
13015         * loader.c (mono_loader_error_prepare_exception): Clear the error
13016         once we have extracted the information from it, do this before we
13017         call into the JIT's class loading mechanisms.
13018
13019         * object.c (mono_class_create_runtime_vtable): Do not clear the
13020         loader error before calling mono_class_get_exception_for_failure
13021         as the loader error is needed inside
13022         mono_class_get_exception_for_failure to throw the error (thinko).
13023
13024         Fixes #80521
13025         
13026 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
13027
13028         * reflection.c: align fields rva data so it's faster to load at
13029         runtime.
13030
13031 2007-01-12  Raja R Harinath  <rharinath@novell.com>
13032
13033         Prepare to simplify GenericMethod handling.
13034         * class-internals.h (mono_method_get_context): New accessor function.
13035         * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
13036         rather than directly accessing '->context' field.
13037
13038         * class-internals.h (_MonoGenericParam.method): Move ...
13039         (_MonoGenericContainer): ... here.  Add into union with klass field.
13040         * class.c, icall.c, loader.c, metadata.c, reflection.c:
13041         Update to changes.
13042
13043 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
13044
13045         * Makefile.am, class-internals.h, debug-helpers.c: consolidate
13046         the wrapper type enum and reduce relocations.
13047
13048 2007-01-12  Raja R Harinath  <rharinath@novell.com>
13049
13050         * reflection.c (inflate_mono_method): Reuse method instantiation
13051         from the generic method, if available.
13052
13053 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13054
13055         * marshal.c (emit_marshal_variant): Fix conv_arg
13056         type in last commit, based on whether parameter is byref.
13057         
13058 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13059
13060         * marshal.c (emit_marshal_variant): Handle unmanaged->managed
13061         marshalling.
13062         (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
13063         MONO_TYPE_OBJECT back for VARIANT support.
13064
13065 2007-01-11  Jonathan Chambers  <joncham@gmail.com>
13066
13067         * marshal.c, marshal.h, icall-def.h: Implement 
13068         Marshal.ReAllocCoTaskMem.
13069
13070 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
13071
13072         * marshal.c: memory retention fixes: use the proper
13073         image cache for runtime_invoke method lookups.
13074
13075 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
13076
13077         * mempool.c: added code to help debug mempool allocations.
13078
13079 2007-01-11  Dick Porter  <dick@ximian.com>
13080
13081         * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
13082         support (experimenting with faking it with IP_MTU_DISCOVER for
13083         systems that don't have IP_DONTFRAGMENT.)
13084         (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
13085         icall.
13086
13087         * icall-def.h: new System.Net.Sockets.Disconnect icall.
13088
13089         * socket-io.h: Add new fields to MonoSocketAsyncResult
13090         corresponding to the new ones in Socket.cs.
13091
13092 2007-01-11  Raja R Harinath  <rharinath@novell.com>
13093
13094         Fix IronPython regression mentioned in #80249
13095         * metadata.c (do_mono_metadata_parse_generic_class): Clear
13096         'cached_context' field, since it may have been initialized as a
13097         side-effect of metadata parsing.
13098
13099         * class-internals.h (_MonoGenericClass.is_inflated): Remove.
13100         (_MonoGenericClass.cached_class): Move here and rename from lone
13101         remaining field of ...
13102         (_MonoInflatedGenericClass): ... this.  Remove.
13103         * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
13104         to changes.
13105
13106         Fix mcs/tests/test-128.cs regression.
13107         * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
13108         2007-01-10 change below.
13109         [MONO_TYPE_OBJECT]: Recurse into array case.
13110
13111 2007-01-11  Raja R Harinath  <harinath@gmail.com>
13112
13113         * class-internals.h (mono_get_inflated_generic_class): Remove.
13114         * class.c (mono_get_inflated_generic_class): Remove.
13115         (mono_generic_class_get_class): Rename from
13116         mono_class_create_generic.
13117         (mono_class_from_mono_type) [GENERICINST]: Use it.
13118         * reflection.c, metadata.c: Update to changes.  Use
13119         'mono_class_from_mono_type'.
13120
13121 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
13122
13123         * reflection.c: use passed type when encoding an array element
13124         in custom attributes (patch from David Mitchell, dmitchell@logos.com).
13125
13126 2007-01-09  Robert Jordan  <robertj@gmx.net>
13127
13128         * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
13129         result arguments (someDelegate.EndInvoke (unrelatedAres)).
13130         Fixes bug #80392.
13131
13132 2007-01-09  Raja R Harinath  <rharinath@novell.com>
13133
13134         * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
13135
13136         * object.c (set_value): Avoid aliasing between type->data.klass
13137         and type->data.generic_class.
13138
13139         * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
13140
13141 2007-01-08  Raja R Harinath  <rharinath@novell.com>
13142
13143         * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
13144         between type->data.klass and type->data.generic_class.
13145
13146 2007-01-08  Lluis Sanchez  <lluis@ximian.com>
13147
13148         * marshal.c: In MS.NET, StringBuilder objects are not copied by
13149         value in out parameters.
13150
13151 2007-01-08  Raja R Harinath  <rharinath@novell.com>
13152
13153         Simplify invariant for MonoGenericClass::klass field.
13154         * class.c (mono_class_create_generic): Verify 'klass' is null.
13155         * metadata.c (do_mono_metadata_parse_generic_class): Don't
13156         initialize 'klass' field.
13157
13158 2007-01-05  Raja R Harinath  <rharinath@novell.com>
13159
13160         Ongoing work to avoid redundant data and simplify invariants.
13161         * class-internals.h (_MonoGenericMethod.class_inst): Rename from
13162         'generic_class', and change type to a GenericInst.
13163         (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
13164         * class.c, loader.c, metadata.c, reflection.c: Update to changes.
13165
13166 2007-01-05  Atsushi Enomoto  <atsushi@ximian.com>
13167
13168         * class.c : skip io-layer under PLATFORM_WIN32.
13169
13170 2007-01-03  Tor Lillqvist  <tml@novell.com>
13171
13172         Fix #80305: In a bundled executable, look in the bundled exe
13173         assembly to determine the runtime version. Add the possibility to
13174         bundle also the machine.config file.
13175         
13176         * assembly.c (mono_assembly_open_from_bundle): Make
13177         non-static. Allow being called even if we have no bundled
13178         assemblies, and return NULL right away in that case.
13179
13180         * domain-internals.h: Declare mono_assembly_open_from_bundle()
13181         here.
13182
13183         * domain.c (app_config_parse): Take an assembly exe file name as
13184         parameter instead of a config file name. Check for a bundled
13185         config file for that assembly by calling
13186         mono_config_string_for_assembly_file() (see below) before looking
13187         for one in the file system.
13188         (get_runtimes_from_exe): Corrsponding change to call of
13189         app_config_parse().
13190         (get_runtimes_from_exe): Check for bundled assembly exe file first
13191         by calling mono_assembly_open_from_bundle(). If no bundled
13192         assembly exe file is found, call mono_image_open() as before to
13193         look it up in the file system.
13194
13195         * mono-config.c: Add variable bundled_machinec_onfig.
13196         (mono_config_string_for_assembly_file): New function.
13197         (mono_config_for_assembly): Move code snippet that looks for a
13198         bundled assembly .config file into the above new function. Call
13199         it.
13200         (mono_register_machine_config, mono_get_machine_config): New
13201         functions to set and retrieve
13202
13203         * assembly.h: Declare mono_register_machine_config().
13204
13205         * mono-config.h: Declare mono_get_machine_config() and
13206         mono_config_string_for_assembly_file().
13207
13208         * icall.c: No declaration of environ necessary on Win32. It is
13209         declared (as a macro expanding to a function call) in stdlib.h.
13210         (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
13211         New internal mono function. Returns the value of
13212         mono_get_machine_config() as a Mono string.
13213
13214         * icall-def.h: Add get_bundled_machine_config().
13215
13216 2007-01-04  Raja R Harinath  <rharinath@novell.com>
13217
13218         Remove redundant field
13219         * class-internals.h (_MonoGenericContext.container): Remove field.
13220         * loader.c (mono_method_get_signature_full): Don't parse a
13221         "container" for a signature parse when the signature is inflated
13222         immediately.
13223         (method_from_methodspec): Likewise, for a generic_inst.
13224         * class.c, metadata.c, reflection.c: Update to changes.
13225
13226 2006-01-04  Raja R Harinath  <rharinath@novell.com>
13227
13228         * class-internals.h (_MonoGenericClass): Rename 'context' field to
13229         'cached_context', and change semantics -- it starts off NULL, and
13230         is initialized on demand.
13231         * class.c (mono_generic_class_get_context): New accessor to
13232         replace 'context' field accesses.
13233         (mono_class_get_context): New helper.
13234         (*): Update to changes.
13235         * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
13236
13237 2007-01-03  Miguel de Icaza  <miguel@novell.com>
13238
13239         * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
13240         before the memcpy.   Fixes Marshal2 regression.
13241
13242 2007-01-02  Jb Evain  <jbevain@gmail.com>
13243
13244         * blob.h: add a MONO_TYPE_ENUM definition
13245         * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
13246         fix the encoding of arrays of enums in custom attributes.
13247
13248         Fixes #79666.
13249
13250 2007-01-01  Miguel de Icaza  <miguel@novell.com>
13251
13252         * marshal.c (mono_string_to_byvalwstr): Fix this routine.   The
13253         string is null terminated, but only cut the string short if it
13254         overflows the buffer.   
13255         
13256         (mono_string_to_byvalstr): Also fix this routine.   The code here
13257         was not properly terminating a string (it was only terminated
13258         because of the previous catch-all memset). 
13259
13260         I left the memset, because I do not know if applications expect
13261         the runtime to clear this region. 
13262
13263         Fixes #79944.
13264
13265         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
13266         Clear the error before returning to unmanaged code to prevent the
13267         runtime from being confused later on (fixes  80420).
13268         (ves_icall_type_from_name): Always call mono_loader_clear_error
13269         after parsing a type that could have failed.
13270         (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
13271
13272         * loader.c (mono_loader_clear_error): Fix indentation.
13273
13274 2006-12-28  Martin Baulig  <martin@ximian.com>
13275
13276         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
13277
13278 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
13279
13280         * reflection.c: patch from Rolf Bjarne Kvinge to fix
13281         getting a token for an EnumBuilder.
13282
13283 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
13284
13285         * reflection.c: be more careful in case resource generation
13286         fails to create the data array.
13287
13288 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
13289
13290         * sgen-gc.c: write barrier for clone and fix unregister handles.
13291
13292 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13293
13294         * reflection.c: some fixes needed in the generics code for the moving GC.
13295
13296 2006-12-22  Robert Jordan  <robertj@gmx.net>
13297
13298         * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
13299         account. Fixes bug #80299.
13300
13301 2006-12-21  Raja R Harinath  <rharinath@novell.com>
13302
13303         Fix WaitHandle usage in delegates.
13304         * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
13305         * object.c (mono_wait_handle_new): Use the property set method to
13306         initialize the handle.
13307         (mono_wait_handle_get_handle): New.
13308         * threadpool.c (mono_async_invoke): Use it.
13309         * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
13310         Likewise.
13311         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
13312
13313 2006-12-21  Jonathan Chambers  <joncham@gmail.com>
13314
13315         * marshal.c (emit_marshal): Call emit_marshal_variant and
13316         emit_marshal_com_interface when applicable.
13317         (emit_marshal_variant, emit_marshal_com_interface): Add
13318         methods for this case and remove if's from emit_marshal_object.
13319         
13320 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
13321
13322         * filewatcher.c: updated to use the mono-dl API instead of gmodule.
13323
13324 2006-12-19  Jonathan Chambers  <joncham@gmail.com>
13325
13326         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
13327         ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
13328         and GlobalFree on Windows. Remove FIXME.
13329
13330 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13331
13332         * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
13333         implementation for managed objects.
13334
13335 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13336
13337         * object.c: implemented code to be used for checking
13338         that no reference field overlaps with non-references.
13339
13340 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13341
13342         * threadpool.c: fix queue code to be compatible with the
13343         moving GC.
13344
13345 2006-12-18  Miguel de Icaza  <miguel@novell.com>
13346
13347         * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
13348         in structures by throwing ArgumentNullException.
13349
13350         (emit_marshal_safehandle): Also when they are null parameters.
13351
13352         (emit_marshal_safehandle): Add support for ref
13353         SafeHandles parameters
13354
13355 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13356
13357         * profiler.c: updated to use the mono-dl API instead of
13358         gmodule.
13359
13360 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13361
13362         * profiler.c: updated to use the mono-dl dynamic loading
13363         API instead of gmodule.
13364
13365 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
13366
13367         * profiler.c: use readlink, older versions of glib don't have
13368         g_file_read_link ().
13369
13370 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13371
13372         * profiler.c: try to detect the path to mono if libc fails to provide
13373         a useful name (bug #80286).
13374
13375 2006-12-16  Raja R Harinath  <rharinath@novell.com>
13376
13377         Fix #80242
13378         * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
13379         instance, use the generic type definition instead.
13380         (ves_icall_Type_GetNestedTypes): Likewise.
13381         * class.c (mono_class_create_generic): Always set the
13382         nested_classes of a generic instance to NULL, even if the generic
13383         type definition has nested types.
13384
13385 2006-12-15  Jonathan Chambers  <joncham@gmail.com>
13386
13387         * marshal.c (mono_string_from_bstr): Revert previous Windows change
13388         and fix on Linux.
13389         
13390 2006-12-15  Miguel de Icaza  <miguel@novell.com>
13391
13392         * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
13393         my arguments were in the wrong order.   I also fixed the Windows
13394         version which seems to have had the same issue.
13395
13396         (mono_free_bstr): On Unix, this is g_free.
13397         (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
13398         conversions (for the tests in corlib to pass).
13399
13400 2006-12-14  Miguel de Icaza  <miguel@novell.com>
13401
13402         * marshal.c (emit_ptr_to_object_conv): For now, ignore
13403         MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
13404         exception if a ref SafeHandle in a struct has changed).
13405         
13406         (emit_struct_conv): Do not perform layout checks for classes
13407         derived from SafeHandle, as those are specially handled. 
13408
13409         (emit_object_to_ptr_conv): Add support for
13410         MONO_MARSHAL_CONV_SAFEHANDLE conversion. 
13411
13412         (emit_marshal_safehandle): Implement conversion of return values
13413         of safehandles (MARSHAL_ACTION_CONV_RESULT).
13414         
13415         * threads.c: WaitHandle now is compiled with two different handles
13416         "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
13417         for 2.0.
13418         
13419         (ves_icall_System_Threading_WaitHandle_WaitAll_internal) 
13420         (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
13421         these routines to cope with both kinds of fields.
13422
13423 2006-12-12  Miguel de Icaza  <miguel@novell.com>
13424
13425         * metadata.c (mono_type_to_unmanaged): Handle the case where
13426         type->data.klass is a SafeHandle, and in that case, return the
13427         size of a pointer (MONO_NATIVE_INT) and set the conversion to be
13428         MONO_MARSHAL_CONV_SAFEHANDLE. 
13429
13430 2006-12-11  Miguel de Icaza  <miguel@novell.com>
13431
13432         * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
13433         MONO_TYPE_OBJECT cases and check for a SafeHandle here before
13434         calling emit_marshal_object.
13435
13436         (emit_marshal_safehandle): Implement marshalling of
13437         SafeHandle parameters (no ref support yet).
13438
13439         (MarshalAction): Document the defines as I implement
13440         them for SafeHandle.
13441
13442         (emit_marshal_object): indentation police.
13443
13444         * class-internals.h: Define MonoSafeHandle.
13445         Add safehandle_class to MonoDefaults type.
13446
13447         * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
13448         list of classes to check for fields. 
13449
13450         * domain.c (mono_init_internal): Add SafeHandle to the list of
13451         mono_defaults loaded.
13452
13453 2006-12-15  Raja R Harinath  <rharinath@novell.com>
13454
13455         Fix #80253
13456         * reflection.c (mono_reflection_bind_generic_parameters): If the
13457         generic type definition is a type builder, ensure that it is fully
13458         initialized before instantiating it.  Kill some dead code.
13459
13460 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
13461
13462         * object.c: clear the loader_error () before loading
13463         more metadata stuff (bug #80258).
13464
13465 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
13466
13467         * icall.c, icall-defs.h: type modifiers icalls for
13468         parameters and properties.
13469
13470 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
13471
13472         * object.c, icall.c: fixed warnings.
13473
13474 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13475
13476         * marshal.c: fixed a couple of leaks and coding style in a few places.
13477
13478 2006-12-08  Dick Porter  <dick@ximian.com>
13479
13480         * process.c: Cope with NULL ProcessStartInfo arguments on windows
13481         too.  Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
13482         80173.
13483
13484 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
13485
13486         * process.c: ProcessStartInfo may have only filename set and
13487         arguments can be NULL.
13488
13489 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
13490
13491         * icall.c: fix leak found by Robert Jordan.
13492
13493 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13494
13495         * marshal.c, marshal.h: generate managed method to access an element
13496         of a multi-dimensional array.
13497
13498 2006-11-30  Paolo Molaro (lupus@ximian.com)
13499
13500         * metadata.c, marshal.c: locking fixes when writing to image->mempool.
13501
13502 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13503
13504         * icall.c: back out GetFields () fix until the serialization code is
13505         fixed to not depend on the incorrect behaviour.
13506
13507 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
13508
13509         * profiler.c: provide defaults if none are set.
13510
13511 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13512
13513         * Makefile.am, attrdefs.h: new public header file with
13514         constants for attributes for use by embedders.
13515
13516 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
13517
13518         * icall.c: GetFields () fix for bug #80064.
13519
13520 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
13521
13522         * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
13523         removed long unused icalls.
13524
13525 2006-11-27  Jonathan Chambers  <joncham@gmail.com>
13526   
13527         * marshal.c: 
13528                 (mono_marshal_emit_managed_wrapper): Level of indirection for 
13529                 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
13530                 can be generated without a delegate class.
13531                 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
13532         
13533         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
13534
13535 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13536
13537         * console-io.c: add the 'signal' call removed by mistake. Fixes bug
13538         #80069.
13539
13540 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13541
13542         * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
13543         icall-def.h: added icalls needed by System.GC.
13544
13545 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
13546
13547         * loader.c: ensure the class in catch clauses is handled
13548         correctly for generics methods (fixes bug#79980).
13549
13550 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13551
13552         * monitor.h, monitor.c: added mono_locks_dump () function
13553         to help debug deadlocks involving managed locks.
13554
13555 2006-11-13  Dick Porter  <dick@ximian.com>
13556
13557         * file-io.c (get_file_attributes): If the file is a symlink try
13558         and get the stat data for the target, but also add the
13559         FILE_ATTRIBUTE_REPARSE_POINT flag.  This is an attempt to follow
13560         the specs for the windows symlink support, but will probably have
13561         to be reworked when I have test data from a vista machine.  Fixes
13562         bug 79887.
13563
13564 2006-11-13  Dick Porter  <dick@ximian.com>
13565
13566         * gc.c (mono_domain_finalize): 
13567         * marshal.c (mono_delegate_begin_invoke): 
13568         * threadpool.c (socket_io_init, mono_thread_pool_init)
13569         (mono_thread_pool_finish): 
13570         * monitor.c (mono_monitor_try_enter_internal): 
13571         * threads.c (mono_thread_resume, mono_thread_init)
13572         (mono_thread_suspend_all_other_threads)
13573         (mono_thread_execute_interruption): 
13574         * appdomain.c (mono_domain_unload): Check for NULL error returns
13575         from CreateThread(), CreateEvent() and CreateSemaphore().  See bug
13576         75733.
13577
13578 2006-11-11  Miguel de Icaza  <miguel@novell.com>
13579
13580         * process.c
13581         (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
13582         Only close the handle if the value of the handle is not
13583         INVALID_HANDLE_VALUE.  This just makes the process a bit more
13584         robust.
13585
13586         Improvement for #75733, so that we do not run into this problem. 
13587
13588         
13589         * assembly.c (check_path_env, check_extra_gac_path_env): Do not
13590         include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
13591         internal variables.  Fixes #79462 
13592         
13593
13594 2006-11-09  Dick Porter  <dick@ximian.com>
13595
13596         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
13597         Use poll() not select().  Fixes bug 79397.
13598
13599 2006-11-09  Raja R Harinath  <rharinath@novell.com>
13600
13601         Fix #79872
13602         * assembly.c (mono_assembly_load_from_full): Check that the given
13603         image has an assembly manifest.
13604
13605 2006-11-09  Ankit Jain  <jankit@novell.com>
13606
13607         * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
13608         (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
13609         (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
13610
13611 2006-11-07  Dick Porter  <dick@ximian.com>
13612
13613         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13614         Put the old resolver behaviour back for pre-2.0 profiles.
13615
13616 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
13617
13618         * threadpool.c: precise GC and locking fixes.
13619
13620 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
13621
13622         * class.c: don't load types that have an explicit unaligned
13623         managed reference. Provide better info in the TypeLoad exception.
13624         Part of the fix for bug #79744.
13625         * object.c: use the correct check for class type load issues.
13626
13627 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
13628
13629         * class.c: enforce alignment of fields with managed references
13630         even when Pack=1 is forced by the user (bug #77788).
13631
13632 2006-11-03  Dick Porter  <dick@ximian.com>
13633
13634         * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
13635         If the address reverse lookup fails, return it as the hostname
13636         anyway.  Fixes bug 79721.
13637
13638 2006-11-03  Dick Porter  <dick@ximian.com>
13639
13640         * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
13641         Fix build on Windows.
13642
13643 2006-11-02  Dick Porter  <dick@ximian.com>
13644
13645         * icall-def.h: 
13646         * object-internals.h: 
13647         * exception.c (mono_get_exception_thread_interrupted): 
13648         * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
13649         Fixes bug 74525.
13650
13651         * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
13652         Check for pending Thread.Interrupt.
13653
13654 2006-10-27  Massimiliano Mantione  <massi@ximian.com>
13655         * loader.c: Fixed bug 79684.
13656
13657 2006-10-27  Dick Porter  <dick@ximian.com>
13658
13659         * file-io.c (get_file_attributes): Force symlinks to directories
13660         to be returned as a regular file.  Fixes bug 79733.
13661 2006-10-26  Dick Porter  <dick@ximian.com>
13662
13663         * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
13664         CreateFile to open a directory then we need to set the
13665         FILE_FLAG_BACKUP_SEMANTICS flag.  Fixes bug 75285.
13666
13667 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
13668
13669         * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
13670         friends.
13671
13672 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13673
13674         * sgengc.c: small cleanup of timer code.
13675
13676 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13677
13678         * sgen-gc.c: fix some warnings and start adding support for
13679         complete object removal on domain unload.
13680
13681 2006-10-22  Gert Driesen  <drieseng@users.sourceforge.net>
13682
13683         * assembly.c: build_assembly_name should not consider a version
13684         number without build or revision number invalid. Fixes bug #79715.
13685
13686 2006-10-18  Jonathan Chambers  <joncham@gmail.com>
13687
13688         * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
13689         call kernel32 function OutputDebugString directly.
13690         
13691         Signed-off-by: Jonathan Chambers <joncham@gmail.com>
13692         
13693 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
13694
13695         * reflection.c: small cleanup, using a function to insert a MonoString
13696         in the string heap.
13697
13698 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
13699
13700         * reflection.c: moving GC fixes.
13701
13702 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13703
13704         * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
13705         all the objects with finalizers belonging to an unloading appdomain.
13706
13707 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13708
13709         * sgen-gc.c: added ability to allocate even when the nursery is fully
13710         pinned and fixed a couple of bugs.
13711
13712 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
13713
13714         * threads.h: Revert the last change for now.
13715
13716         * threads.h (mono_thread_get_pending_exception): Rename this to
13717         mono_thread_get_undeniable_exception ().
13718
13719 2006-10-15  Gert Driesen  <drieseng@users.sourceforge.net>
13720
13721         * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
13722         BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
13723         when fname does not refer to valid assembly. This result in a more
13724         meaningful error message.
13725         * exception.c: added mono_get_exception_bad_image_format2 which 
13726         constructs a BadImageFormatException using the ctor taking a custom
13727         message and the file name. Passing in a NULL msg results in a default
13728         message.
13729         * exception.h: define mono_get_exception_bad_image_format2 function.
13730         * icall.c: in InternalGetAssemblyName, throw BadImageFormatException 
13731         when file name pointed to an invalid IL image. Use 
13732         mono_get_exception_file_not_found2 to construct FileNotFoundException,
13733         as this results in a more meaningful error message.
13734
13735 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
13736
13737         * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
13738         #79465.
13739
13740 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
13741
13742         * metadata.c (mono_type_size): Change the align parameter to guint32 for
13743         consistency with the other _size functions.
13744         (mono_type_stack_size): Ditto.
13745
13746         * class.c object.c icall.c: Fix warnings caused by the above change.
13747
13748         * class.c (mono_class_get_method_from_name_flags): Fix a typo.
13749
13750         * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
13751
13752         * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
13753
13754 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
13755
13756         * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
13757         process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
13758         socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
13759         threadpool.h, threads-types.h: mark more internal functions.
13760
13761 2006-10-11  Dick Porter  <dick@ximian.com>
13762
13763         * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
13764         Fix typo spotted by Robert Jordan in bug 79352 (though I can't
13765         reproduce the bug even before applying the fix.)
13766
13767 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
13768
13769         * reflection.c: allow retrieving attributes for arguments in generic
13770         methods (bug #79241).
13771
13772 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
13773
13774         * debug-mono-symfile.c: properly check fopen () result (found by
13775         coverity).
13776
13777 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
13778
13779         * reflection.c: make error message clearer and fixed two
13780         issuelets found by Coverity.
13781
13782 2006-10-10  Zoltan Varga  <vargaz@gmail.com>
13783
13784         * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
13785
13786 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
13787
13788         * object-internals.h, gc-internal.h, profiler-private.h:
13789         mark internal functions.
13790
13791 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13792
13793         * reflection.c: put data in the text section.
13794         * icall.c: recognize more types in type_from_typename ().
13795         * process.c, marshal.c: added some GC FIXMEs.
13796
13797 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13798
13799         * loader.c: check for NULL before initializing.
13800
13801 2006-10-09  Zoltan Varga  <vargaz@gmail.com>
13802
13803         * gc.c (finalizer_thread): Use a non-alertable wait here.
13804
13805         * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
13806         until the correct solution is found.
13807
13808 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
13809
13810         * reflection.c (mono_module_get_object): Avoid an assert when operating on
13811         modules with no metadata. Fixes #79596.
13812
13813         * image.c (load_metadata_ptrs): Put back the error message when
13814         the #- heap is encountered since the support is not complete yet.
13815
13816 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13817
13818         * gc.c: do not allow the user to SuppressFinalize () a
13819         delegate because it would leak the trampoline if present.
13820
13821 2006-10-06  Zoltan Varga  <vargaz@gmail.com>
13822
13823         * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
13824         PropertyPtr table.
13825
13826 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
13827
13828         * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
13829
13830         * metadata.c (mono_metadata_get_param_attrs): Ditto.
13831
13832         * row-indexes.h: Add definitions for *Ptr tables.
13833
13834         * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
13835
13836         * metadata.c (mono_metadata_translate_token_index): New helper function to
13837         translate table indexes used in uncompressed metadata.
13838         (mono_metadata_decode_table_row): Ditto.
13839         (mono_metadata_decode_table_row_col): Ditto.
13840
13841         * metadata.c: Add table schema for *Ptr tables.
13842
13843         * class.c loader.c: Use the new helper function to access the affected metadata
13844         tables.
13845         
13846         * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
13847         #38532.
13848         
13849 2006-10-04  Zoltan Varga  <vargaz@gmail.com>
13850
13851         * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
13852         sequences which can be unbounded in size. Fixes #79583.
13853
13854 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
13855
13856         * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
13857         static initialization.
13858
13859         * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
13860
13861         * class-internals.h (MonoVTable): Add an 'init_failed' flag.
13862
13863         * domain.c (mono_domain_free): Free up type_init_exception_hash.
13864
13865         * object.c (mono_runtime_class_init): Implement correct semantics when a static
13866         ctor fails, i.e. throw the same exception on subsequent accesses.
13867         
13868 2006-09-0  Jonathan Chambers  <joncham@gmail.com>
13869
13870         * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
13871         * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
13872         Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
13873         Handle marshalling of interfaces and VARIANTs contained in structs.
13874         
13875         Code is contributed under MIT/X11 license.
13876         
13877 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
13878
13879         * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
13880         
13881         * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
13882         mempool.
13883
13884 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13885
13886         * console-io.c: ignore previous SIGINT handler.
13887
13888 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
13889
13890         * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual 
13891         (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
13892         #79460, #79461, #79485.
13893
13894         * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
13895
13896         * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
13897         #79217.
13898
13899 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13900
13901         * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
13902         could be generated from it.
13903
13904 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
13905
13906         * rand.c: fix read loop to correctly handle EINTR.
13907
13908 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13909
13910         * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
13911         internal calls are defined to keep methods closer to the declaring
13912         type and allow a significant reduction in runtime relocations and
13913         memory usage.
13914
13915 2006-09-21 Gert Driesen  <drieseng@users.sourceforge.net>
13916
13917         * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
13918         exception message to have FileNotFoundException use the default
13919         assembly load error message. Fixes bug #79426.
13920         * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
13921
13922 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13923
13924         * threadpool.c: (start_thread_or_queue) use the root domain when
13925         creating the thread instead of the async object one.
13926
13927 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
13928
13929         * class.c, object.c, class-internals.h, reflection.c:
13930         for arrays, store element_size inside MonoClass (speedup
13931         for array object creation).
13932
13933 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
13934
13935         * icall.c: fixed CodeBase to use the file name and not the module
13936         name (bug #79365).
13937
13938 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
13939
13940         * mono-debug.c, mono-debug.h: export find_method as
13941         mono_debug_find_method ().
13942
13943 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
13944
13945         * debug-helpers.c, class-internals.h: added a few functions useful
13946         when debugging under gdb.
13947
13948 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13949
13950         * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
13951         characters that need special handling.
13952
13953 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13954
13955         * mono-config.c: make the os/cpu specification more flexible,
13956         allowing lists and negation.
13957
13958 2006-09-18  Jonathan Chambers  <joncham@gmail.com>
13959
13960         * marshal.c: COM Interop fixes. Handle case where method->klass.
13961         is interface. Handle BSTR/MonoString when null. Use CDECL as 
13962         calling convention on non-windows platforms. This is for
13963         compatibility with XPCOM and MainWin COM.
13964         
13965         Code is contributed under MIT/X11 license.
13966         
13967
13968 2006-09-18  Zoltan Varga  <vargaz@gmail.com>
13969
13970         * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
13971         correctly. Fixes #79217.
13972
13973         * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
13974
13975 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
13976
13977         * mono-config.c: allow both an os and cpu attribute for dllmap
13978         and dllentry elemnets to enable a single config file to be used
13979         for multiple architectures.
13980
13981 2006-09-18  Gert Driesen  <drieseng@users.sourceforge.net>
13982
13983         * loader.c: MonoLoaderError was cleared too soon on load failure.
13984         Fixes bug #79424.
13985
13986 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
13987
13988         * icall.c: use the defining class vtable when accessing a
13989         static field, not a pobblibly derived class.
13990
13991 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
13992
13993         * icall.c string-icalls.c: Remove references to unicode.h.
13994
13995         * unicode.h unicode.c Makefile.am: Remove these unused source files.
13996
13997         * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
13998
13999         * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument, 
14000         indicating the image where custom marshaller types should be looked up.
14001         (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
14002         custom marshallers, instead of corlib. Fixes #79425.
14003
14004 2006-09-14  Zoltan Varga  <vargaz@gmail.com>
14005
14006         * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
14007
14008 2006-09-14  Jonathan Chambers  <joncham@gmail.com>
14009
14010         * environment.c (ves_icall_System_Environment_get_ProcessorCount): 
14011         Implement Environment.ProcessorCount.
14012         
14013         * environment.h (ves_icall_System_Environment_get_ProcessorCount): 
14014         Implement Environment.ProcessorCount.
14015         
14016         * icall.c: 
14017         Add Environment.ProcessorCount icall.
14018         
14019         Patch by Jason McFall.
14020
14021 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14022
14023         * assembly.c: don't append .exe/.dll when the filename already contains
14024         one of those extensions.
14025
14026 2006-09-12  Martin Baulig  <martin@ximian.com>
14027
14028         * class.c (mono_bounded_array_class_get): Also add `IList<object>'
14029         to array interfaces.
14030
14031 2006-09-11  Martin Baulig  <martin@ximian.com>
14032
14033         * reflection.c (mono_image_build_metadata): Create the
14034         MethodImpl's after emitting all types and methods, so we don't
14035         need another fixup pass for them.
14036
14037 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
14038
14039         * class.c (mono_class_from_name_case): Fix regression introduced by the last
14040         change.
14041
14042 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
14043
14044         * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
14045         unload.
14046
14047 2006-09-10  Zoltan Varga  <vargaz@gmail.com>
14048
14049         * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
14050         args is not set. Fixes #78926.
14051
14052 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
14053
14054         * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
14055
14056         * image.c (load_class_names): Move this to class.c, and rename it to 
14057         'mono_image_init_name_cache'.
14058         (load_modules): Fix a warning.
14059
14060         * class.c icall.c image.c: Initialize image->name_cache lazily.
14061
14062         * class-internals.h (MonoGetClassFromName): New hook function to find a class based
14063         on its name using information in the AOT file.
14064
14065         * class.c (mono_class_from_name): Use the new hook function.
14066
14067 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
14068
14069         * reflection.c (mono_param_get_objects): Handle enum default parameter values
14070         correctly.
14071
14072         * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
14073         Fixes #79289.
14074         
14075 2006-09-06  Martin Baulig  <martin@ximian.com>
14076
14077         * icall.c (mono_lookup_internal_call): Small fix.
14078
14079 2006-09-05  Raja R Harinath  <rharinath@novell.com>
14080
14081         * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
14082         double g_free.
14083
14084 2006-09-04  Sebastien Pouliot  <sebastien@ximian.com>
14085
14086         * debug-mono-symfile.c: Fix *some* memory leaks that happens only 
14087         when --debug is specified.
14088
14089 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
14090
14091         * class.c (setup_generic_array_ifaces): Fix a warning.
14092
14093 2006-09-04  Miguel de Icaza  <miguel@novell.com>
14094
14095         * Temporarily remove the patch to assemly.c that checks the
14096         assembly versions as it breaks our gacutil.
14097
14098 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
14099
14100         * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
14101
14102         * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
14103         a net 1.0 runtime.
14104
14105         * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
14106         created using the default ctor. Fixes #79152.
14107         (mono_string_builder_to_utf16): Ditto.
14108
14109 2006-09-01  Martin Baulig  <martin@ximian.com>
14110
14111         Fix handling of the generic array interfaces.
14112
14113         * class-internals.h
14114         (MonoDefaults): Removed `generic_array_class' and added
14115         `generic_ilist' class.
14116
14117         * class.c
14118         (mono_bounded_array_class_get): Add the new generic array interfaces.
14119         (setup_generic_array_ifaces): New static method; create vtable
14120         entries for each method in the generic array interfaces.
14121
14122         * metadata.c
14123         (select_container): Allow "parent-less" generic methods.
14124
14125         * marshal.c
14126         (mono_marshal_get_generic_array_helper): New public method.
14127
14128         * icall.c
14129         (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
14130         Renamed into ves_icall_System_Array_GetGenericValueImpl() and
14131         moved the interncall into System.Array.
14132
14133 2006-09-01  Raja R Harinath  <rharinath@novell.com>
14134
14135         A few more cases of avoiding work on types with ->byref set.
14136         Has the real fix for #79238
14137         * icall.c (is_generic_parameter): New helper.
14138         (ves_icall_Type_GetGenericParameterPosition): Use it.
14139         (ves_icall_Type_GetGenericParameterAttributes): Likewise.
14140         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
14141         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
14142         (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
14143         reference types.
14144         (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
14145         reference types.
14146         (ves_icall_Type_get_IsGenericInstance): Likewise.
14147         (ves_icall_Type_get_IsGenericType): Likewise.
14148
14149 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
14150
14151         * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
14152         class if possible.
14153
14154         * mempool.h (mono_mempool_get_allocated): New helper function.
14155
14156         * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
14157         change.
14158
14159         * mempool.c: Fix warnings and the calculation of stats.
14160
14161         * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
14162
14163         * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
14164
14165         * loader.c (mono_get_method_from_token): Update method_count stat.
14166
14167         * class-internals.h (MonoStats): Add some stats.
14168
14169 2006-08-31 Robert Jordan  <robertj@gmx.net>
14170
14171         * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
14172         with managed variants.
14173         All code is contributed under the MIT/X11 license.
14174         
14175 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
14176
14177         * reflection.c (reflection_methodbuilder_to_mono_method): Set 
14178         method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
14179
14180         * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
14181
14182         * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
14183         with cycles in classes.
14184
14185         * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
14186
14187         * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is 
14188         missing a [MarshalAs] directive. Fixes #79203.
14189
14190         * marshal.c (mono_marshal_load_type_info): Fix a race in initializing 
14191         klass->marshal_info. Fixes #79217.
14192
14193 2006-08-30  Martin Baulig  <martin@ximian.com>
14194
14195         Committing a patch from Joachim Ante <joe@otee.dk>:
14196         Add support for binary data symbol stores.
14197
14198         * debug-mono-symfile.c
14199         (mono_debug_open_mono_symbol_file): Renamed into
14200         mono_debug_open_mono_symbols() and added `raw_contents' and `size'
14201         arguments.
14202
14203         * mono-debug.c
14204         (mono_debug_open_image): Added `raw_contents' and `size' args.
14205         (mono_debug_init_2_memory): New public function.
14206
14207 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
14208
14209         * icall.c: handle TypedReference in GetTypeCode (bug #79150).
14210
14211 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14212
14213         * appdomain.c: implement support for ShadowCopyFiles.
14214
14215 2006-08-22  Sebastien Pouliot  <sebastien@ximian.com>
14216
14217         * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
14218         when value is NULL (and should remove CID #51).
14219
14220 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14221
14222         * image.c: moved 2 functions to ../utils.
14223
14224 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
14225
14226         * gc.c: cope with the target object of a GC handle being NULL
14227         (bug #78877).
14228
14229 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14230
14231         * class.c: recursively check parent's explicit implementations
14232         of interface methods (fixes bug #79125).
14233
14234 2006-08-19  Miguel de Icaza  <miguel@novell.com>
14235
14236         * filewatcher.c: Avoid warnings when building, do not redefine
14237         constants that are defined.
14238
14239         Remove warnings.
14240
14241 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14242
14243         * image.c: don't fail when the link points to an absolute path.
14244
14245 2006-08-18  Sebastien Pouliot  <sebastien@ximian.com>
14246
14247         * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
14248         Fix CID #3.
14249
14250 2006-08-17  Miguel de Icaza  <miguel@novell.com>
14251
14252         * image.c (full_path): A new method used to obtain the actual path
14253         of an assembly even in the presence of symbolic links.  
14254
14255         This is necessary for the case where we are running a binary that
14256         has been GACed, but we are using the "published" path name
14257         ($prefix/mono/1.0/blah.exe) which happens to point to the real
14258         file in the GAC.
14259
14260         This was the source of the failure for the `xsp' command with the
14261         recent AppDomain changes, as far as the runtime was concerned,
14262         there were two different assemblies: $prefix/mono/1.0/blah.exe and
14263         $prefix/mono/gac/blah/version/blah.exe.
14264
14265         (do_mono_image_open): use full path
14266
14267 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
14268
14269         * object.c (mono_class_create_runtime_vtable): Add a FIXME.
14270
14271 2006-08-17  Sebastien Pouliot  <sebastien@ximian.com>
14272
14273         * marshal.c: Fix mono_marshal_check_domain_image if an invalid 
14274         domain_id is supplied. Fix CID #241 and corlib's unit tests.
14275
14276 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
14277
14278         * class.c (mono_class_layout_fields): Set min_align to a bigger value for
14279         small structures. Fixes #78990.
14280
14281 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
14282
14283         * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
14284
14285         * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
14286
14287 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14288
14289         * appdomain.c:
14290         * marshal.c: don't load all the assemblies from a domain into newly
14291         created ones. The new domains might have different rules and load
14292         assemblies from different locations. Fixes bug #76757.
14293
14294         Patch by Lluis. Conflicts resolved by Brian Crowell.
14295
14296 2006-08-16  Alp Toker  <alp@atoker.com>
14297
14298         * socket-io.c: First half of the fix for #79084.
14299         Set sa_size to the length of the content, not that of the struct.
14300         Don't add NULL suffix to the content, this should be done in
14301         managed code if needed.
14302
14303 2006-08-14  Raja R Harinath  <rharinath@novell.com>
14304
14305         Fix part of #79012
14306         * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
14307         mono_metadata_parse_type returns NULL.
14308
14309 2006-08-13  Atsushi Enomoto  <atsushi@ximian.com>
14310
14311         * normalization-tables.h : new file for string normalization data.
14312         * locales.c, locales.h, icall.c :
14313           added load_normalization_resource() for string normalization,
14314           and icall as well.
14315         * Makefile.am : added normalization-tables.h to the sources.
14316
14317 2006-08-13  Zoltan Varga  <vargaz@gmail.com>
14318
14319         * marshal.c: Add more helper functions to reduce code duplication and use them
14320         everywhere.
14321
14322 2006-08-12  Zoltan Varga  <vargaz@gmail.com>
14323
14324         * marshal.c: Fix non-x86 stdcall warnings.
14325         
14326         * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use 
14327         them everywhere.
14328
14329 2006-08-11  Jonathan Chambers  <joncham@gmail.com>
14330
14331         * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
14332         type check on multi-dimensional arrays. Fixes #79000.
14333
14334 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
14335
14336         * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
14337         * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
14338         to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
14339         * class-internals.h: add is_com_object to class structure.
14340         * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
14341         null checks to COM object marshalling. Fix .ctor call on RCW.
14342         * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
14343         
14344         All code is contributed under the MIT/X11 license.
14345
14346 2006-08-09  Dick Porter  <dick@ximian.com>
14347
14348         * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
14349         racing mono_monitor_allocator_lock() somewhere, so don't delete
14350         the critical section for now.  Found by running and exiting
14351         monodevelop.
14352
14353 2006-08-10  Zoltan Varga  <vargaz@gmail.com>
14354
14355         * marshal.c (cominterop_get_native_wrapper): Fix a warning.
14356         (ves_icall_System_ComObject_FindInterface): Ditto.
14357         (ves_icall_System_ComObject_CacheInterface): Ditto.
14358
14359         * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
14360         (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
14361
14362 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14363
14364         * threadpool.c: treat pipes from process asynchronous reads as sockets
14365         when reading from them, so we get select/poll or epoll to wait for
14366         data.
14367
14368 2006-08-07  Sebastien Pouliot  <sebatien@ximian.com>
14369
14370         * loader.c: Fix a typo (CID #233) in the null check.
14371
14372 2006-08-07  Zoltan Varga  <vargaz@gmail.com>
14373
14374         * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
14375         Hopefully fixes #78949.
14376         
14377         * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from 
14378         Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
14379         bytes. Fixes #78972.
14380
14381 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14382
14383         * filewatcher.c: we need to set errno here.
14384
14385 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14386
14387         * filewatcher.c: let Win32Exception get the error value.
14388
14389 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14390
14391         * filewatcher.c: translate errno into win32 errors for Win32Exception
14392         to know what happened.
14393
14394 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
14395
14396         * threadpool.c: Fix more warnings.
14397
14398         * assembly.c (search_loaded): Fix warnings.
14399
14400         * threadpool.c (mono_thread_pool_finish): Fix warnings.
14401         (mono_async_invoke): Ditto.
14402
14403 2006-07-28  Jonathan Chambers  <joncham@gmail.com>
14404
14405         * object.c (mono_remote_class_vtable): Need to create proxy vtable
14406         entries for __ComObject type in addition to ComImport types.
14407         * marshal.c: Added support for marshalling COM RCWs. Fixed warning
14408         about hash table.
14409         
14410         All code is contributed under the MIT/X11 license.
14411
14412 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
14413
14414         * image.c: avoid tentative loading of modulerefs that contain
14415         no metadata (P/Invoke library names).
14416
14417 2006-07-28  Dick Porter  <dick@ximian.com>
14418
14419         * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
14420         mono_loader_lock() somewhere, so don't delete the critical section
14421         for now.  Found by running and exiting monodevelop.
14422
14423 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14424
14425         * filewatcher.c: define the inotify syscalls when we're building on
14426         linux and have sys/syscall.h. The build system might not have support
14427         for inotify but the target system might have it.
14428
14429 2006-07-26  Miguel de Icaza  <miguel@novell.com>
14430
14431         * domain.c: Documentation updates.
14432
14433         * loader.c (mono_free_method): Do not release the method
14434         information if we are being profiled, as profilers will use this
14435         information at shut down to present some data to the user.
14436
14437         This is needed so that the profiler does not crash, as the
14438         profiler tends to keep MonoMethods around, and they might become
14439         invalid if we free these.
14440
14441         (mono_get_method_constrained): Return the original CIL stream
14442         method as well, so verification can be performed against it.
14443
14444 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14445
14446         * filewatcher.[ch]: support for inotify file system watcher.
14447         * icall.c: add new internal calls for the inotify file system watcher.
14448
14449 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14450
14451         * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
14452         #78888.
14453
14454 2006-07-20  Dick Porter  <dick@ximian.com>
14455
14456         * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
14457         warning.
14458
14459 2006-07-20  Dick Porter  <dick@ximian.com>
14460
14461         * threads.c (start_wrapper): Do the thread cleanup while we still
14462         hold a reference to its object.  Fixes bug 78123.
14463
14464 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
14465
14466         * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
14467         * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
14468           "managed-to-managed".
14469         * icall.c: Redirect string constructors that take sbyte* to
14470           ves_icall_System_String_ctor_RedirectToCreateString.
14471         * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
14472           to CreateString () methods with matching signature.
14473         * reflection.c: Use original security informations for
14474           MONO_WRAPPER_MANAGED_TO_MANAGED.
14475         * security-manager.c: Use original security informations for
14476           MONO_WRAPPER_MANAGED_TO_MANAGED.
14477         * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
14478           that is a placeholder and only its address should be used.
14479         * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
14480           that is a placeholder and only its address should be used.
14481
14482 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
14483
14484         Begin implementing COM Interop.
14485         * appdomain.c: Increment corlib version.
14486         * class.c: Set ComImport classes' parent to __ComObject.
14487         * loader.c: Mark cominterop methods as such.
14488         * domain.c: Add __ComObject class to MonoDefaults structure.
14489         * image.c: Add 2 hashtables to the image for COM Interop related methods
14490         * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
14491         using the mempool allocator
14492         
14493         * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
14494         * metadata.h: Added cominterop field to _MonoMethodSignature struct and
14495         declaration for mono_metadata_type_dup_mp.
14496         
14497         * debug-helpers.c: Added strings for two additional wrapper types
14498         * object.c: Create proxy objects for ComImport classes
14499         * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
14500         and added __ComObject class to MonoDefaults structure.
14501         
14502         * object-internals.h: Finish MonoRealProxy definition, and add definition of
14503         MonoComInteropProxy and MonoComObject.
14504         
14505         * marshal.c: Added support for COM Interop
14506         (signature_cominterop): Converts managed signature to corresponding
14507         unmanaged COM signature.
14508         (cominterop_get_function_pointer): gets unmanaged function pointer via
14509         COM object vtable
14510         (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
14511         (cominterop_get_method_interface): returns interface type that method is defined on
14512         (mono_mb_emit_cominterop_call): emits native call to function pointer
14513         gotten from vtable
14514         (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
14515         that matches signature of unmanaged function.
14516         (cominterop_get_native_wrapper): wrapper around adjusted method call.
14517         (cominterop_get_invoke): forwards call from proxy to __ComObject
14518         (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef 
14519         (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface 
14520         (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release 
14521         
14522         * marshal.h: Added Marshal icall declarations.
14523         * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
14524         so we can access them in finalizer
14525         
14526 2006-07-14  Dick Porter  <dick@ximian.com>
14527
14528         * object.c (mono_type_initialization_cleanup): Fix a race
14529         condition by temporarily commenting out the critical section
14530         deletion.
14531
14532 2006-07-14  Zoltan Varga  <vargaz@gmail.com>
14533
14534         * reflection.c (create_custom_attr): Fix some warnings.
14535         (create_custom_attr_data): Ditto.
14536         (typebuilder_setup_properties): Save custom attrs for properties in dynamic
14537         types. Fixes #78855.
14538
14539 2006-07-11  Zoltan Varga  <vargaz@gmail.com>
14540
14541         * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
14542
14543         * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
14544
14545 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
14546
14547         * reflection.c (resolve_object): Add support for DynamicMethod.
14548
14549         * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
14550         Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
14551
14552 2006-07-06  Sebastien Pouliot  <sebastien@ximian.com>
14553
14554         * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal 
14555         don't leak GPtrArray's pdata has we have no use (nor free) for it.
14556
14557 2006-07-01  Zoltan Varga  <vargaz@gmail.com>
14558
14559         * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
14560         Fixes #77888.
14561
14562 2006-06-30  Raja R Harinath  <rharinath@novell.com>
14563
14564         * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
14565         slightly: remove a shadow local variable.
14566
14567 2006-06-29  Raja R Harinath  <rharinath@novell.com>
14568
14569         * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
14570         definition that introduces the virtual function slot.
14571         Also fix Coverity #105.
14572
14573 2006-06-29  Zoltan Varga  <vargaz@gmail.com>
14574
14575         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
14576         for dynamic assemblies. Fixes #78724.
14577
14578 2006-06-28  Zoltan Varga  <vargaz@gmail.com>
14579
14580         * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
14581         Fixes #78722.
14582
14583 2006-06-21  Martin Baulig  <martin@ximian.com>
14584
14585         * reflection.c
14586         (method_encode_clauses): Don't assert on `ex_info->handlers' here;
14587         fixes #76484.
14588
14589 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
14590
14591         * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
14592
14593 2006-06-20  Raja R Harinath  <rharinath@novell.com>
14594
14595         Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
14596         nor TYPEREFs.
14597         * class.c (mono_class_create_from_typespec): Add 'context' argument.
14598         Inflate result if necessary.
14599         (mono_class_get_full): Remove old version.  Rename from
14600         'mono_class_get' and add 'context' argument.  Pass it to
14601         ..._create_from_typespec.
14602         (mono_class_get): New.  Simple wrapper to mono_class_get_full.
14603         (mono_ldtoken): Revert change below.
14604
14605 2006-06-20  Martin Baulig  <martin@ximian.com>
14606
14607         * class.c (mono_ldtoken): Don't pass the generic context to
14608         mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF.  Fixes #78053.
14609
14610 2006-06-15  Zoltan Varga  <vargaz@gmail.com>
14611
14612         * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
14613         and later freeing it. Fixes #78638.
14614
14615 2006-06-15  Miguel de Icaza  <miguel@novell.com>
14616
14617         * icall.c (mono_class_get_throw): Revert over-zealous error
14618         throwing, the caller for mono_class_get_throw will cope with
14619         errors when classes are not properly initialized already.
14620
14621         The code still copes with loader exceptions though.
14622
14623         Fixes the regression in reftype1 and reftype3 from the CAS tests.
14624         
14625 2006-06-14  Miguel de Icaza  <miguel@novell.com>
14626
14627         Fixes the `make run1' version of RuntimeAbort (to be commited,
14628         source is in Bugzilla).
14629         
14630         * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
14631         FALSE on class loading failure instead of returning true.
14632
14633         * class.c (mono_class_create_from_typedef): It is possible for
14634         mono_metadata_interfaces_from_typedef_full to fail if a class is
14635         not found, cope with this.
14636         
14637
14638 2006-06-14  Dick Porter  <dick@ximian.com>
14639
14640         * socket-io.c: 
14641         * process.c: Fix a bunch of signed/unsigned warnings from gcc
14642         4.1.1
14643
14644 2006-06-12  Atsushi Enomoto  <atsushi@ximian.com>
14645
14646         * culture-info-table.h : oops, forgot to make it nsync with r61548.
14647
14648 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
14649
14650         * icall.c: Another fix for building mono in Visual Studio.
14651
14652 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
14653
14654         * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
14655         
14656 2006-06-09  Martin Baulig  <martin@ximian.com>
14657
14658         * debug-mono-symfile.c: Put this back and really fix it this
14659         time. Sorry for all the trouble.
14660
14661 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
14662
14663         * icall.c (mono_class_get_throw): Fix a warning.
14664         (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw 
14665         ReflectionTypeLoadException if needed. Fixes #78606.
14666
14667         * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
14668         (mono_class_init): Ditto.
14669
14670         * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
14671         ref_only exceptions.
14672         (mono_loader_clear_error): Make this work even if there is no error.
14673
14674 2006-06-08  Jonathan Chambers  <jonathan.chambers@ansys.com>
14675
14676         * object-internals.h marshal.c marshal.h icall.c: Implement method 
14677         Marshal.GetComSlotForMethodInfo using internal call.
14678
14679 2006-06-07  Zoltan Varga  <vargaz@gmail.com>
14680
14681         * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
14682         a function for signalling it.
14683
14684         * class.c (mono_class_from_typeref): Use the new kind of loader error when
14685         a referenced assembly is not found.
14686
14687         * loader.c (mono_loader_error_prepare_exception): Add support for 
14688         LOADER_ERROR_ASSEMBLY. Fix formatting.
14689
14690 2006-06-05  Jonathan Chambers  <jonathan.chambers@ansys.com>
14691
14692         * domain.c appdomain.c class-internals.h marshal.c: Add support 
14693         for VARIANT marshalling on windows and increment corlib version
14694         since Variant struct was added.
14695
14696 2006-06-03  Miguel de Icaza  <miguel@novell.com>
14697
14698         * debug-mono-symfile.c: Revert Martin's previous patch which broke
14699         stack trace line information:
14700
14701         (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
14702         (Martin) when looking up B which is between A and C, return A not C.
14703
14704         Bug is #78573.
14705
14706         Thanks to Alexander Olk for tracking this down.
14707
14708 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
14709
14710         * marshal.c (mono_marshal_set_last_error_windows): Fix build.
14711         
14712         * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
14713         avoid clobbering its value.
14714         (mono_string_to_lpstr): Fix a warning on windows.
14715
14716 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
14717
14718         * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
14719
14720         * reflection.c loader.c: Removed references to 'dummy' flag.
14721
14722         * loader.c (mono_loader_error_prepare_exception): Fix a warning.
14723
14724         * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
14725         it gets GC tracking.
14726
14727         * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
14728         GC tracking.
14729         
14730         * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
14731
14732         * marshal.c threadpool.c: Update callers of mono_async_result_new.
14733
14734         * appdomain.c: Bump corlib version.
14735
14736 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
14737
14738         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
14739         CEE_STIND_REF when working with object references.
14740
14741 2006-05-31  Zoltan Varga  <vargaz@gmail.com>
14742
14743         * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
14744         Fixes #78539.
14745
14746 2006-05-30  Miguel de Icaza  <miguel@novell.com>
14747
14748         * loader.c (method_from_memberref): Fix argument value for
14749         mono_loader_set_error_method_load (I was passing the MonoClass
14750         instead of the class name char *).
14751
14752 2006-05-30  Zoltan Varga  <vargaz@gmail.com>
14753
14754         * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
14755         CEE_STIND_REF when working with object references.
14756
14757 2006-05-30  Martin Baulig  <martin@ximian.com>
14758
14759         * mono-debug.c (mono_debug_print_stack_frame): Reverted the
14760         mono_method_full_name() change and replace the ':' with a '.'
14761         here.
14762
14763 2006-05-30  Martin Baulig  <martin@ximian.com>
14764
14765         * debug-mono-symfile.c
14766         (mono_debug_symfile_lookup_location): Fix the algorithm:
14767         when looking up B which is between A and C, return A not C.
14768
14769 2006-05-29  Martin Baulig  <martin@ximian.com>
14770
14771         * mono-debug.h
14772         (MonoDebugMethodInfo): Make the typedef public.
14773         (MonoDebugSourceLocation): New public struct.
14774
14775         * mono-debug.c
14776         (mono_debug_source_location_from_address): Removed.
14777         (mono_debug_source_location_from_il_offset): Removed.
14778         (mono_debug_il_offset_from_address): Removed.
14779         (mono_debug_address_from_il_offset): Removed.
14780         (mono_debug_lookup_method): New public function.
14781         (mono_debug_lookup_source_location): New public function; replaces
14782         the old mono_debug_source_location_from_*() functions; see the
14783         inline documentation.
14784         (mono_debug_free_source_location): New public function.
14785         (mono_debug_print_stack_frame): New public function; see the
14786         inline documentation.
14787
14788         * debug-mono-symfile.c
14789         (mono_debug_find_source_location): Renamed into
14790         mono_debug_symfile_lookup_location(); only take a
14791         `MonoDebugMethodInfo *' and an `offset' argument; added inline
14792         documentation.
14793         (mono_debug_find_method): Renamed into
14794         mono_debug_symfile_lookup_method().
14795
14796 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
14797
14798         * assembly.c (mono_assembly_open_full): Dont overwrite the status
14799         returned by mono_image_open_full ().
14800
14801         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
14802         MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
14803         #78517.
14804
14805         * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
14806         #78518.
14807
14808 2006-05-27  Miguel de Icaza  <miguel@novell.com>
14809
14810         * class.c (mono_class_from_typeref): handle missing images
14811         earlier, deals with bug #78418.   Refactor code; 
14812
14813         Fix a warning introduced in my previous commit (some stale code
14814         from before I revisited my patch).
14815
14816         * class.c (mono_class_create_from_typedef): On failure, remove the
14817         class from the MonoImage->class_cache as the class is not
14818         initialized;   Fixes the leak pointed out by Paolo.
14819
14820 2006-05-25  Dick Porter  <dick@ximian.com>
14821
14822         * threads.c (mono_thread_cleanup): Build fix.  Comment out the
14823         DeleteCriticalSections until I figure out which one may still be
14824         sometimes locked when mono_thread_cleanup is called.
14825
14826 2006-05-24  Dick Porter  <dick@ximian.com>
14827
14828         * threads.c (mono_thread_cleanup): Move the threading cleanup out
14829         of mono_thread_manage and back into its own function, so it can be
14830         called after the finalizer thread has finished.
14831
14832         * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
14833
14834 2006-05-24  Zoltan Varga  <vargaz@gmail.com>
14835
14836         * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
14837         Fixes #78495.
14838
14839         * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
14840         with non-blittable elements.
14841         (emit_object_to_ptr_conv): Ditto. Fixes #78492.
14842
14843 2006-05-24  Martin Baulig  <martin@ximian.com>
14844
14845         * mono-debug-debugger.h (MonoDebuggerEvent): Added
14846         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.    
14847
14848         * mono-debug-debugger.c (mono_debugger_cleanup): Send a
14849         `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
14850         `mono_debugger_event_handler' to NULL.
14851
14852 2006-05-24  Martin Baulig  <martin@ximian.com>
14853
14854         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
14855
14856 2006-05-24  Martin Baulig  <martin@ximian.com>
14857
14858         * mono-debug-debugger.h
14859         (mono_debugger_create_notification_function): Added
14860         `MonoCodeManager *' argument.
14861
14862 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
14863
14864         * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
14865
14866 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
14867
14868         * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
14869         * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
14870         implementation.
14871
14872 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
14873
14874         * icall.c: precise GC support: objects can't be stored in unmanaged
14875         memory anymore, even if they are kept alive by other references: since
14876         they can move the GC needs to be able to always find them.
14877
14878 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14879
14880         * object.c: precise GC support for static fields. Support
14881         for moving GCs: write barriers and pinned allocation for interned
14882         strings.
14883
14884 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
14885
14886         * domain.c, domain-internals.h: precise GC support for the MonoDomain
14887         structure.
14888
14889 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14890
14891         * class.c, gc.c: sgen and precise GC updates.
14892
14893 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
14894
14895         * marshal.h, marshal.c: added write barrier wrapper and precise type
14896         fixes.
14897
14898 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
14899
14900         * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
14901         support.
14902
14903 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
14904
14905         * reflection.c: precise and sgen GC updates.
14906
14907 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
14908
14909         * debug-helpers.c, class-internals.h: added write barrier wrapper type.
14910
14911 2006-05-22  Zoltan Varga  <vargaz@gmail.com>
14912
14913         * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
14914
14915 2006-05-20  Zoltan Varga  <vargaz@gmail.com>
14916
14917         * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
14918         MONO_TYPE_OBJECT. Fixes #78462.
14919
14920 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
14921
14922         * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct 
14923         and blittable types.
14924
14925 2006-05-17  Miguel de Icaza  <miguel@novell.com>
14926
14927         * class.c (mono_class_get_exception_for_failure): Implement parts
14928         of a TODO: if the loader error is set (instead of the class
14929         error), we return a Loader exception that can be properly thrown
14930         elsewhere.
14931
14932         This was exposed by some Winforms 2.0 code that I tried to run
14933         (Atsushi pointed me to it).
14934
14935 2006-05-17  Zoltan Varga  <vargaz@gmail.com>
14936
14937         * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
14938         uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
14939         
14940         * marshal.c (emit_marshal_vtype): Add limited support for 
14941         UnmanagedType.LPStruct. Fixes #78427.
14942
14943         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure): 
14944         Applied a patch from kangaroo to fix #77523.
14945
14946 2006-05-17  Martin Baulig  <martin@ximian.com>
14947
14948         * threads.c
14949         (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
14950         (debugger_thread_created): Removed.
14951         (debugger_thread_exited): Removed.
14952
14953 2006-05-15  Zoltan Varga  <vargaz@gmail.com>
14954
14955         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14956
14957         * object-internals.h (MonoReflectionResource): Sync with managed version.
14958
14959 2006-05-12  Wade Berrier <wberrier@novell.com>
14960
14961         * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
14962
14963 2006-05-12  Zoltan Varga  <vargaz@gmail.com>
14964
14965         * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
14966         functions try to allocate from the image mempool.
14967
14968 2006-05-12  Dick Porter  <dick@ximian.com>
14969
14970         * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
14971
14972 2006-05-12  Lluis Sanchez  <lluis@ximian.com>
14973
14974         * object.c: The FieldGetter and FieldSetter methods require the full
14975         name of the class, not only the name. Fixes bug #78277.
14976
14977 2006-05-11  Miguel de Icaza  <miguel@novell.com>
14978
14979         * loader.c (method_from_memberref): Do not pass the NULL klass to
14980         mono_loader_set_error_() methods.  Pass the non-NULL value
14981         (class). 
14982
14983 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
14984
14985         * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
14986         (mono_assembly_close): Null out assembly->image->references after freeing it.
14987
14988         * image.c (mono_image_close): Free image->references.
14989         
14990         * reflection.c (mono_image_basic_init): Fix a small memory leak.
14991
14992 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
14993
14994         * marshal.c: In function mono_mb_add_local don't use the mb pointer 
14995         before checking if it's NULL (g_assert).
14996
14997 2006-05-10  Martin Baulig  <martin@ximian.com>
14998
14999         * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
15000         I thought I already killed that two months ago, but now it somehow reappeared.
15001
15002 2006-05-10  Martin Baulig  <martin@ximian.com>
15003
15004         * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
15005
15006 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
15007
15008         * reflection.c: Allocate memory for dynamically created methods in the image
15009         mempools.
15010
15011 2006-05-10  Sebastien Pouliot  <sebastien@ximian.com>
15012
15013         * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions, 
15014         don't use the ad pointer before checking if it's NULL (g_assert).
15015
15016 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
15017
15018         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
15019         a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
15020
15021         * marshal.c: Allocate all signatures from mempools.
15022
15023         * marshal.c: Allocate some more signatures from mempools.
15024
15025 2006-05-09  Miguel de Icaza  <miguel@novell.com>
15026
15027         * object.c (mono_load_remote_field): The code used to provide a
15028         temporary variable for returning results if the user did not
15029         provide a result pointer.  But our temporary variable was allocted
15030         on the satck.
15031
15032         Fix calling code to always pass a result area.   Coverity ID 103.
15033
15034 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
15035
15036         * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
15037         value, not the old. Fixes #78312.
15038         (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
15039
15040         * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
15041         (mono_ptr_class_get): Ditto. Also change the cache from a global one to a 
15042         per-image cache.
15043
15044         * assembly.c (mono_assembly_close): Free image->references.
15045
15046         * assembly.c (mono_assembly_names_equal): Fix a warning.
15047         (mono_assemblies_cleanup): Cleanup more global data.
15048
15049         * metadata-internals.h (MonoImage): Add 'ptr_cache'.
15050
15051         * image.c (mono_image_close): Free up the contents of 'array_cache', free up
15052         ptr_cache and image->modules.
15053
15054         * image.c (mono_image_init): Allocate array_cache lazily.
15055         
15056 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15057
15058         * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
15059         behavior was changed recently and has bad side effects.
15060
15061 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
15062
15063         * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
15064         
15065         * assembly.c (mono_assembly_close): Remove a debug printf.
15066
15067         * profiler.c (create_profiler): Use mono_aligned_addr_hash.
15068
15069         * metadata-internals.h image.c assembly.c: Change the reference counting scheme
15070         to also allow for temporary references between mono_image_open ()/close ().
15071
15072         * domain.c (get_runtimes_from_exe): Add a FIXME.        
15073
15074 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
15075
15076         * marshal.c: Fix support for dynamic methods.
15077
15078         * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
15079
15080         * marshal.c (mono_marshal_cleanup): New cleanup function.
15081
15082         * marshal.c: Rewrite the wrapper code to allocate most of its memory from the 
15083         image mempools.
15084
15085         * class.c (mono_class_init): Fix leaking class->nested_classes.
15086
15087         * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
15088
15089         * image.c (mono_image_init): Initialize the new cashes.
15090
15091         * image.c (mono_image_close): Destroy the new cashes.
15092
15093         * marshal.c: Get rid of most of the static caches in favor of per-image caches.
15094
15095         * mempool.c (mono_mempool_strdup): New helper function.
15096
15097         * class-internals.h: Add prototype for mono_loader_unlock ().
15098
15099         * domain.c (mono_jit_info_table_find): Fix a warning.
15100         (mono_debugger_check_runtime_version): Ditto.
15101
15102         * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h 
15103         class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
15104         functions to these modules.
15105
15106         * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
15107         metadata modules.
15108         
15109         * marshal.c (mono_free_bstr): Fix a warning.
15110
15111         * assembly.c (mono_assembly_open_full): Fix another small leak.
15112
15113         * object.c: Fix some unload leaks in the remoting code.
15114
15115         * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
15116         function.
15117
15118         * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
15119
15120         * reflection.c: Fix some unload leaks in dynamic assemblies.
15121
15122 2006-05-02  Jonathan Chambers  <jonathan.chambers@ansys.com>
15123
15124         * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
15125         * marshal.h: Add BSTR support on Win32
15126         * icall.c: Add BSTR icalls
15127         * metadata.h: Add BSTR enums
15128
15129 2006-04-28  Miguel de Icaza  <miguel@novell.com>
15130
15131         Work to catch the crash from #76795 and turn it into an
15132         exception.   As I stubbed out pieces of the VisualBasic support,
15133         I found a number of places where the code was failing and I added
15134         checks to those places. 
15135         
15136         * metadata.c (do_mono_metadata_parse_generic_class): Make this
15137         function return a status code.  If we fail to parse the signature
15138         from mono_metadata_parse_generic_inst, return FALSE.
15139
15140         * loader.c (mono_get_method_from_token): If we fail to load the
15141         method (mono_class_get) return NULL.   
15142
15143         * (method_from_memberref): Return NULL if we are unable to parse
15144         the method signature
15145
15146         (mono_loader_error_prepare_exception): Since we now use the
15147         loader_error flag internally to stop processing, and obtaining
15148         exceptions that might be thrown will walk this code path the
15149         proper way of going from a MonoLoaderError into a
15150         MonoException was convoluted.   This new routine encapsulates the
15151         process of turning the error into an exception and *clearing* the
15152         error afterwards.
15153         
15154 2006-04-27  Miguel de Icaza  <miguel@novell.com>
15155
15156         Work to catch the crashes from 75075 (cope in Assembly.GetTypes
15157         with missing assemblies), and to cope with:
15158
15159                 * Missing fieldref from a non-existing assembly.
15160                 * Missing methodref from a non-existing assembly.
15161
15162         The first batch of work to address *some* of the issues from 76661.
15163         
15164         * object.c (mono_class_create_runtime_vtable): If we fail to
15165         initialize the class raise the exception here. 
15166
15167         * metadata.c (mono_class_get_overrides_full): If any methods fail
15168         to load return the failure to the caller.
15169
15170         * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
15171         flagging assemblies that failed to load.   
15172
15173         Do not crash if we are unable to load the assembly.
15174
15175         (mono_assembly_close): Do nothing with REFERENCE_MISSING
15176         assemblies. 
15177
15178         * loader.c (mono_loader_set_error_type_load): Change the
15179         convention to always pass unallocated strings, so we make our own
15180         copies (I know our own code had duplicated strings before, but
15181         this keeps the normal conventions).
15182         (method_from_memberref): Call mono_loader_set_error_method_load
15183         for all possible failures of loading the class. 
15184         Remove assert, turn into a loader error.
15185
15186         (mono_loader_error_to_exception): Move this routine from mini
15187         (mini_loader_error_to_exception) there was no need to have that in
15188         mini. 
15189
15190         * class.c (mono_class_from_typeref): If we were not able to load
15191         the assembly with mono_assembly_load_reference, call the
15192         mono_loader_set_error_type_load to register the problem.
15193
15194         (mono_class_setup_fields): If we fail to load the type from
15195         mono_metadata_parse_type_full, call mono_class_set_failure and
15196         break from the loop.
15197
15198         If class->exception_type is set, we do not layout the fields as
15199         that might crash the runtime, and instead return (from breaking
15200         from the previous loop).
15201
15202         (mono_class_setup_vtable): This now returns a boolean indicating
15203         whether the table was properly setup.   The decision is driven by
15204         mono_class_get_overrides_full which might run into non-existing
15205         methods. 
15206         
15207         (mono_class_init): Returns TRUE on success or FALSE if there was a
15208         problem in loading the type (incorrect assemblies, missing
15209         assemblies, methods, etc).
15210
15211         When we call mono_class_setup_fields we also check for a potential
15212         error inside this call (either a class exception or a general
15213         loader exception).
15214
15215         (mono_class_create_from_typedef): If the parent fails to load
15216         (calling mono_class_get_full) return NULL.
15217         
15218         ** Important **
15219
15220         calls to mono_metadata_parse_type_full should be checked
15221         everywhere and set the mono_class_set_failure
15222         (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
15223
15224         The current patch checks the places where my manually constructed
15225         tests show the errors are showing up, but we should do it
15226         everywhere. 
15227
15228         ** Important2 **
15229
15230         mono_class_init return values should be tested everywhere, like
15231         the previous case this is something that we should audit
15232         everywhere and not only on the cases exposed by the tests I
15233         created. 
15234
15235 2006-04-26  Miguel de Icaza  <miguel@novell.com>
15236
15237         * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
15238         boolean parameter and instead pass the information on `options'
15239         parameter (FileOptions).
15240
15241         * icall.c: Register the new signature for MonoIO.Open.
15242
15243         * debug-helpers.c (dis_one): Trying to understand how coverity
15244         works.  Fix Run 5, item 78.
15245
15246 2006-04-26  Dick Porter  <dick@ximian.com>
15247
15248         * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
15249         dereference.
15250
15251 2006-04-25  Martin Baulig  <martin@ximian.com>
15252
15253         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
15254
15255         * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
15256         debugger_thread_created().
15257         (debugger_gc_push_all_stacks): Don't handle the main thread in any
15258         special way.
15259         (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
15260         (mono_debugger_finalize_threads): New function; undo the effects
15261         of mono_debugger_init_threads().
15262         (mono_debugger_create_all_threads): Removed.
15263
15264 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
15265
15266         * image.c (mono_image_close): Tidy up trace messages.
15267
15268         * assembly.c (mono_assembly_close): Ditto.
15269
15270         * assembly.c (mono_assembly_close): Clear out image->assembly so the image
15271         no longer references an already freed assembly. Fixes #78168.
15272
15273 2006-04-21  Dick Porter  <dick@ximian.com>
15274
15275         * threads.c (mono_thread_detach): Fix reference counting when
15276         detaching threads.
15277
15278 2006-04-21  Zoltan Varga  <vargaz@gmail.com>
15279
15280         * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
15281         #78155.
15282
15283 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
15284
15285         * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
15286         (mono_type_to_stind): Ditto.
15287
15288         * marshal.c: Use the new helper functions to simplify code.
15289
15290         * image.c (mono_image_close): Add some code for help debug assembly unloading
15291         problems.
15292
15293         * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
15294         image mempool.
15295
15296         * assembly.c (mono_assembly_open_full): Invoke the load hook when the
15297         assembly was already loaded in another appdomain. Fixes #78083.
15298
15299 2006-04-13  Zoltan Varga  <vargaz@gmail.com>
15300
15301         * assembly.c (mono_assembly_load_reference): Increase the refcount of the
15302         referenced assemblies.
15303         (mono_assembly_close): Decrease the refcount of the referenced assemblies.
15304
15305         * domain.c (mono_domain_free): Add a trace message.
15306
15307         * appdomain.c (add_assemblies_to_domain): Ditto.        
15308
15309         * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
15310         field.  
15311
15312 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
15313
15314         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
15315
15316 2006-04-12  Martin Baulig  <martin@ximian.com>
15317
15318         * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
15319         `USE_INCLUDED_LIBGC'.   
15320
15321 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
15322
15323         * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
15324         the patch contains ../ and a small directory name later. Hopefully fixes
15325         #78035.
15326
15327 2006-04-10  Martin Baulig  <martin@ximian.com>
15328
15329         Clean up the debugger's thread-handling code.
15330
15331         The debugger's thread-handling code has been moved from
15332         ../mini/debug-debugger.c to threads.c.  We now iterate directly
15333         over the `threads' hash, keep track of exiting threads and also
15334         use proper locking.
15335
15336         We can now debug XSP and XSP based applications with the debugger.
15337
15338         * object-internals.h (MonoThread): Added `gpointer end_stack'.
15339
15340         * threads.h
15341         (MonoThreadCallbacks): Removed; this was only used by the debugger.
15342         (mono_install_thread_callbacks): Likewise.      
15343
15344         * threads.c (mono_thread_callbacks): Removed.
15345         (debugger_thread_created, debugger_thread_exited): New static functions.
15346         (start_wrapper): Call debugger_thread_created().
15347         (thread_cleanup): Call debugger_thread_exited().
15348         (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
15349         (mono_debugger_init_threads): New public function.
15350         (debugger_thread_vtable): Moved here from debug-debugger.c; we now
15351         iterate directly over the `threads' hash and also use proper locking.
15352
15353         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
15354
15355         * mono-debug-debugger.h
15356         (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
15357
15358 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
15359
15360         * reflection.c (encode_cattr_value): Fix handling of parameter type=object, 
15361         argument type=array. Fixes #78057.
15362
15363 2006-04-10  Atsushi Enomoto  <atsushi@ximian.com>
15364
15365         * culture-info-table.h : regenerated. Fixed bug #69652.
15366
15367 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
15368
15369         * loader.c metadata.c: Reapply a variant r59116.
15370         
15371         * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
15372
15373         * class.c (mono_class_setup_interface_offsets): New internal function.
15374
15375         * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
15376         interfaces too. Fixes #77398.
15377
15378         * reflection.c (encode_cattr_value): Add support for 
15379         parameter type=object, argument type=array.
15380         (load_cattr_value): Ditto. Fixes #77916.
15381
15382         * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
15383         (emit_ptr_to_object_conv): Ditto. Fixes #77960.
15384
15385         * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
15386         a byval char array and CharSet is Ansi.
15387
15388         * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
15389
15390 2006-04-06  Zoltan Varga  <vargaz@gmail.com>
15391
15392         * metadata.c: Add some locking comments.
15393         
15394         * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
15395         mempool.
15396         (mono_metadata_free_method_signature): Don't free the signature itself.
15397
15398         * loader.c (mono_free_method): Don't free the signature in non-dynamic methods. 
15399
15400         * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
15401         reference the same MonoImage.
15402         (mono_assembly_load_from_full): Add an assert.
15403
15404 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
15405
15406         * image.c (mono_image_close): Don't put the image we are about to free into the
15407         loaded_images_guid_hash.
15408
15409         * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
15410         to reduce code duplication.
15411
15412         * marshal.c: Register the native functions called by this module as icalls, to
15413         somewhat centralize the creation of MonoMethodSignature's.
15414
15415         * loader.c (mono_method_signature): Add a cache for method signatures.
15416
15417         * metadata.c (mono_metadata_get_param_attrs): New helper function to return
15418         the parameter attributes of a method.
15419         (mono_metadata_parse_method_signature_full): Refactored the computation of
15420         parameter attributes into a separate function. Also avoid one allocation in
15421         most cases.
15422
15423         * assembly.c (mono_assembly_close): Ditto.
15424
15425         * image.c (mono_image_close): Log trace messages with INFO level.
15426
15427         * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
15428
15429         * image.c reflection.c: Correct reference counting of image modules.
15430         
15431         * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
15432         of this function from the image mempool.
15433         
15434         (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
15435         to allow more cached types to be used.
15436
15437         * mono-debug.c (mono_debug_add_method): Appled patch from
15438         David S. Miller  <davem@sunset.davemloft.net>: Access 
15439         minfo->lexical_blocks[] entry elements using read32().
15440
15441 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
15442
15443         * loader.c (mono_free_method): No longer free the method header for non-dynamic
15444         methods as it is allocated from the mempool.
15445
15446         * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
15447         image mempool.
15448
15449         * metadata-internals.h: Add comments describing the reference counting scheme
15450         used for MonoImage and MonoAssembly.
15451
15452         * image.c assembly.c reflection.c: Rework reference counting of images and 
15453         assemblies so they are freed when the runtime is shut down. Free some 
15454         additional memory structures when an image is unloaded.
15455         
15456 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
15457
15458         * class.c loader.c reflection.c: Allocate more data structures in
15459         the image mempool.
15460
15461 2006-03-31  Miguel de Icaza  <miguel@novell.com>
15462
15463         * icall.c
15464         (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
15465         build on pre glib 2.4 systems.
15466
15467 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
15468
15469         * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
15470
15471         * icall.c: Fix some warnings.
15472
15473 2006-03-29  Atsushi Enomoto  <atsushi@ximian.com>
15474
15475         * culture-info-table.h : regenerated.
15476
15477 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
15478
15479         * threads.c, object-internals.h, verify.c: changed the culture caching
15480         code to use a normal MonoArray for storage so the GC can keep track of
15481         them easily. Fixed bits of the cache logic, too and simplified the
15482         code.
15483
15484 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
15485
15486         * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
15487         thread for non-Boehm GCs.
15488
15489 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
15490
15491         * domain.c, object.c, domain-internals.h: reduce the amount of memory
15492         needed to keep track of the data for static fields.
15493
15494 2006-03-29  Raja R Harinath  <rharinath@novell.com>
15495
15496         Fix #75172
15497         * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
15498         for interface classes.  Use 'num_methods' instead.
15499         (ves_icall_Type_GetPropertiesByName): Likewise.  Setup vtable
15500         before using '->vtable_size' field.
15501
15502 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
15503
15504         * domain.c, object.c, domain-internals.h: proxy_vtable_hash
15505         doesn't contain managed pointers, so use a normal hashtable.
15506
15507 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
15508
15509         * reflection.c, class-internals.h, domain.c: fixed handling of types
15510         used as values for objects in custom attributes (bug #77915):
15511
15512 2006-03-24  Martin Baulig  <martin@ximian.com>
15513
15514         * class.c (mono_class_setup_fields): Added support for generic
15515         instances; fixes #77580.
15516
15517 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15518
15519         * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
15520
15521 2006-03-24  Dick Porter  <dick@ximian.com>
15522
15523         * file-io.c (get_file_attributes): More stat macro breakage.
15524         Fixes bug 77759.
15525
15526 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
15527
15528         * profiler.c: added the file=filename option in the default profiler
15529         to output the profile data to filename.
15530
15531 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15532
15533         * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
15534         bug #77877.
15535
15536 2006-03-22  Martin Baulig  <martin@ximian.com>
15537
15538         * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
15539         allocated `MonoClassField *' in `fb->handle'.
15540
15541 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
15542
15543         * class.c, image.c, metadata-internals.h: implemented new mechanism to
15544         allocate interface ID to save memory and allow better ID reuse on
15545         appdomain unload. setup_generic_vtable () removal from Martin.
15546
15547 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
15548
15549         * object.h, appdomain.c, domain.c, exception.c, icall.c,
15550         locales.c, marshal.c, object.c, reflection.c, threadpool.c,
15551         threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
15552         write barriers for reference stores with managed objects accessed with
15553         C structures in the runtime and in embedding programs.
15554
15555 2006-03-20  Raja R Harinath  <rharinath@novell.com>
15556
15557         * icall.c (ves_icall_Type_GetInterfaces): Avoid using
15558         'interface_id' and 'max_interface_id' fields of MonoClasses
15559         representing open generic types.
15560
15561 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
15562
15563         * object.h, object.c, icall.c: added functions to deal with
15564         storing valuetypes that contain references in managed objects.
15565         * reflection.c, string-icalls.c, threads.c, marshal.c: small
15566         fixes and comments around uses of mono_array_addr ().
15567
15568 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
15569
15570         * object.h, icall.c, monitor.c: object.GetHashCode ()
15571         implementation that supports the moving garbage collector.
15572
15573 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
15574
15575         * icall.c, threads-types.h, threads.c: implemented finalizer for
15576         LocalDataStoreSlot.
15577
15578 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
15579
15580         * metadata.c (mono_type_size): Add a fixme.
15581         (mono_type_stack_size): Ditto.
15582
15583         * object-internals.h (MonoReflectionAssemblyBuilder): Added 
15584         'type_forwarders' field.
15585
15586         * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
15587         attribute from net 2.0.
15588
15589         * object.c (mono_vtable_get_static_field_data): Moved this to object.c
15590         from class.c.
15591
15592         * class.c (mono_class_setup_fields): Fix a warning.
15593         
15594         * class.c (mono_class_from_name): Add support for assemblyref entries
15595         in the EXPORTEDTYPE table.
15596
15597         * reflection.c: Add support for handling type forwarders under net 2.0.
15598
15599         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.       
15600         
15601 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
15602
15603         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
15604         overwriting entries in ModuleBuild->types, also clean up the code
15605         a little. Fixes #77774.
15606
15607 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15608
15609         * domain.c, assembly.c, metadata-internals.h, class-internals.h:
15610         load friend assembly info when present.
15611
15612 2006-03-14  Raja R Harinath  <rharinath@novell.com>
15613
15614         Fix crasher on gtest-158.cs.
15615         * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
15616         the return value if the MonoClass we want is yet in an
15617         inconsistent state.
15618         * class.c (mono_class_create_from_typedef): Add an comment
15619         explaining an order dependency between mono_class_setup_parent and
15620         mono_class_setup_mono_type.
15621
15622 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
15623
15624         * class.c: documentation updates and events bug fix.
15625
15626 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
15627
15628         * class.c: some cleanup, locking fixes.
15629
15630 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
15631
15632         * class.c: fix the generics code to setup nested
15633         type info to the instantiated type (bug #77770).
15634
15635 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
15636
15637         * marshal.c: fixed a few type correctness issues.
15638
15639 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15640
15641         * loader.c: the Set/Get/Addrtess array methods should be public.
15642
15643 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
15644
15645         * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
15646         
15647         * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
15648         info->wrapper.
15649
15650 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
15651
15652         * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
15653
15654         * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
15655
15656         * mempool.c (mono_mempool_alloc): Speed this up a bit.
15657         (mono_mempool_alloc0): Ditto.
15658
15659 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15660
15661         * socket-io.c:
15662         (create_object_from_sockaddr): it was allocating 4 extra bytes
15663         for the AF_UNIX data. Fixes bug #77747.
15664
15665 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
15666
15667         * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
15668
15669 2006-03-09  Dick Porter  <dick@ximian.com>
15670
15671         * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
15672         Fixes bug 76966 again.
15673
15674 2006-03-07  Peter Dennis Bartok  <pbartok@novell.com>
15675
15676         * verify.c (dtfinfo_fields): Updated to match new (serializable) field
15677         names from r57532
15678         * appdomain.c: Bumped corlib version to 48 (due to r57532)
15679
15680 2006-03-07  Martin Baulig  <martin@ximian.com>
15681
15682         * object.c
15683         (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
15684
15685 2006-03-07  Martin Baulig  <martin@ximian.com>
15686
15687         * class.c
15688         (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
15689         regression introduced in r56970; see gtest-252.cs.
15690
15691         * loader.c (mono_get_method_constrained): Correctly handle generic
15692         methods; see gtest-253.cs.
15693
15694 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
15695
15696         * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
15697
15698 2006-03-04  Martin Baulig  <martin@ximian.com>
15699
15700         * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
15701         compute the parent type at runtime, just like we're already doing
15702         it for interfaces.
15703
15704         * reflection.c
15705         (mono_reflection_bind_generic_parameters): Don't compute the
15706         parent type anymore.
15707
15708         * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
15709
15710 2006-03-04  Martin Baulig  <martin@ximian.com>
15711
15712         * mono-debug-debugger.h
15713         (mono_debugger_create_notification_function): Allocate memory at
15714         runtime and return a pointer to it.
15715
15716 2006-03-03  Zoltan Varga  <vargaz@gmail.com>
15717
15718         * assembly.c: Fix windows build.
15719         
15720         * assembly.c: Fix build.
15721
15722         * assembly.c: Move the contents of os/{unix,win32}/util.c to this file. 
15723
15724         * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
15725         
15726 2006-03-03  Dick Porter  <dick@ximian.com>
15727
15728         * process.c
15729         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
15730         Check parameters before dereferencing them.  Fixes Aaron's part of
15731         bug 77393.
15732
15733 2006-03-03  Raja R Harinath  <rharinath@novell.com>
15734
15735         Fix performance regression.
15736         * loader.c (find_method_in_class): Add 'from_class' argument.
15737         Rename 'klass' argument to 'in_class'.  The signature is compared
15738         against the method in 'in_class', and the corresponding method is
15739         returned from 'from_class'.
15740         (find_method): Walk both 'in_class' and 'from_class' in parallel.
15741         (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
15742         type definition and generic instantiation in parallel.
15743         (mono_get_method_constrained): Update to changes.
15744
15745 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
15746
15747         * threads.c: make sure the domain is correct, too when doing
15748         mono_thread_attach ().
15749
15750 2006-03-01  Zoltan Varga  <vargaz@gmail.com>
15751
15752         * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
15753         windows. Fixes #77683.
15754
15755 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
15756
15757         * object.h, *: introduced specific way to set elements of an array
15758         of references to be used as write barrier. Still need to audit the
15759         uses of mono_array_addr.
15760
15761 2006-03-01  Miguel de Icaza  <miguel@novell.com>
15762
15763         * object-internals.h: New field to cache the assmebly name, patch
15764         from Tambet Ingo (tambet@ximian.com)
15765
15766 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
15767
15768         * decimal.h, class-internals.h, metadata-internals.h,
15769         file-io.h: mark a few function declarations as internal, to
15770         reduce the number of PLT entries.
15771
15772 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15773
15774         * file-io.c: fix typo in warning message.
15775
15776 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
15777
15778         * loader.c: on unix, lookup the "*A" version of a function
15779         if charset is auto as a second option before failing.
15780
15781 2006-02-28  Raja R Harinath  <rharinath@novell.com>
15782
15783         * class.h (mono_class_inflate_generic_method): Revert to two
15784         argument version.
15785         * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
15786         (mono_class_inflate_generic_method_full): Add.
15787         * class.c (mono_class_inflate_generic_method_full): Rename from
15788         'mono_class_inflate_generic_method'.  Don't set 'inflated' field.
15789         (mono_class_inflate_generic_method): New.  Wrapper around ..._full.
15790         * loader.c, reflection.c: Update to changes.
15791
15792 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
15793
15794         * icall.c: const fixes and small improvements.
15795
15796 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15797
15798         * threadpool.c: for asynchronous connect(), enable the same workaround
15799         for BSD 6 as for the Mac. Fixes bug #77637.
15800
15801 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
15802
15803         * marshal.c (mono_marshal_free_asany): Fix handling of blittable
15804         formatted classes. Fixes #77524.
15805
15806 2006-02-24  Raja R Harinath  <rharinath@novell.com>
15807
15808         * class.c (inflate_generic_type): Add a couple more
15809         micro-optimizations.
15810         (inflate_generic_context): Don't use the 'gmethod' from
15811         'inflate_with'.
15812         (mono_class_inflate_generic_method): If the method has generic
15813         parameters, but the passed-in context doesn't have a 'gmethod',
15814         create one.  Use the possibly simplified generic instantiation
15815         from the declaring class instead of the one passed in.
15816
15817 2006-02-24  Raja R Harinath  <harinath@gmail.com>
15818
15819         Make generic method signature and method header handling lazy.
15820         * class.c (mono_class_inflate_generic_signature): Move to loader.c.
15821         (inflate_generic_header): Likewise.
15822         (mono_class_inflate_generic_method): Rewrite.  Add a 'klass_hint'
15823         parameter to avoid inflating types.
15824         (mono_get_inflated_method): Empty out.
15825         * class.h (mono_class_inflate_generic_method): Update to changes.
15826         * loader.c (mono_get_method_from_token): Don't parse signature for
15827         generic methods, nor methods of generic classes.
15828         (mono_method_signature): Rename from 'mono_method_signature'.
15829         Inflate signature on demand.
15830         (mono_method_get_header): Inflate method header on demand.
15831         * reflection.c: Update to changes.
15832
15833 2006-02-23  Raja R Harinath  <rharinath@novell.com>
15834
15835         * metadata.c (mono_metadata_inflate_generic_inst): If the
15836         instantiation is closed, don't bother expanding it in the new
15837         context.
15838         * class.c (inflate_generic_class): If the generic instantiation
15839         doesn't change after inflation, return the argument itself.
15840         (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
15841         Add bounds checks.
15842         (inflate_generic_context): If neither the generic class nor the
15843         generic method instantiations change, return the original context.
15844         * reflection.c (mono_method_get_object): Do
15845         'mono_get_inflated_method' before accessing the ->klass field.
15846         (inflate_mono_method): Don't create a MonoGenericMethod unless
15847         necessary.
15848         (inflate_method): Don't pass a constructed type as the declaring
15849         type of a methodbuilder.
15850
15851 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
15852
15853         * object.c: fix memory overwrite.
15854
15855 2006-02-22  Dick Porter  <dick@ximian.com>
15856
15857         * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
15858         it doesn't work any more.
15859         (mono_threads_request_thread_dump): Fix unused variable warnings.
15860
15861 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
15862
15863         * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
15864         mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
15865         the public header file.
15866
15867 2006-02-21  Zoltan Varga  <vargaz@gmail.com>
15868
15869         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
15870
15871 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
15872
15873         * class-internals.h, object.c: reduce the size of MonoVTable
15874         and store the interface_offsets array at negative offsets.
15875
15876 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
15877
15878         * metadata.c: tweak table descriptors data structures to reduce
15879         size and runtime relocations.
15880
15881 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
15882
15883         * marshal.c: fix some types and opcodes to be type-safe
15884         in marshaling wrappers.
15885
15886 2006-02-21  Ankit Jain  <jankit@novell.com>
15887
15888         * metadata.h (mono_metadata_decode_signed_value): Add declaration.
15889
15890 2006-02-21  Raja R Harinath  <rharinath@novell.com>
15891
15892         * metadata.c (get_constraints): Relax debugging checks for monodis.
15893
15894 2006-02-21  Ankit Jain  <jankit@novell.com>
15895
15896         * metadata.c (mono_metadata_load_generic_params): Move the code
15897         checking for ambiguous generic params from here to mono/dis/get.c
15898         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
15899
15900 2006-02-21  Raja R Harinath  <harinath@gmail.com>
15901
15902         Fix assertion triggered when compiling nemerle.
15903         * class.c (mono_get_shared_generic_inst): Rename from
15904         get_shared_inst and make non-static.
15905         * loader.c (mono_get_shared_generic_method): New.  Used to create
15906         the MonoGenericContext-equivalent of a MonoGenericContainer.
15907         (mono_get_method_from_token): Initialize the 'context' field of
15908         the created MonoGenericContainer.
15909         * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
15910         * metadata.c (get_constraints): Add sanity check.
15911         * class-internals.h: Add new internal methods.
15912
15913         * reflection.c (verify_safe_for_managed_space): New sanity check.
15914         Currently checks that owner-less generic parameters aren't allowed
15915         in managed space.
15916         (mono_type_get_object): Use it.
15917         * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
15918         that are now in mono_type_get_object.
15919         (ves_icall_MonoMethod_GetGenericArguments): Likewise.
15920
15921 2006-02-19  Raja R Harinath  <harinath@gmail.com>
15922
15923         * metadata.c (mono_type_create_from_typespec): Rename from
15924         mono_type_create_from_typespec_full.  Remove MonoGenericContainer*
15925         argument and caching of types in the generic container.
15926         (unwrap_arrays, find_generic_param): Remove.
15927         * metadata-internals.h: Update.
15928         * class-internals.h (_MonoGenericContainer): Remove 'types' field.
15929
15930 2006-02-18  Zoltan Varga  <vargaz@gmail.com>
15931
15932         * class.c (mono_class_get_exception_for_failure): Fix a warning.
15933
15934         * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
15935         return values. Fixes #77581.
15936
15937         * class.c (mono_fnptr_class_get): Switch name and name_space.
15938
15939         * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
15940         classes and add support for [In, Out] attributes.
15941         (mono_marshal_free_asany): Ditto. Fixes #77524.
15942
15943 2006-02-18  Raja R Harinath  <harinath@gmail.com>
15944
15945         * class.c (mono_class_from_generic_parameter): Make more robust to
15946         incomplete MonoGenericContainers from monodis.
15947
15948 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
15949
15950         * class-internals.h: added some more exception types.
15951         * class.c, metadata.c: added a few checks to handle missing
15952         types.
15953
15954 2006-02-17  Raja R Harinath  <rharinath@novell.com>
15955
15956         Use owner-less generic-params some more.
15957         * class.c (my_mono_class_from_generic_parameter): Remove.
15958         (mono_class_from_generic_parameter): Handle null image,
15959         param->name and param->owner.
15960         (mono_class_from_mono_type): Update.
15961         (mono_class_create_from_typespec): Remove 'container' parameter.
15962         If that parameter is non-null, the result is always inflated by
15963         'mono_class_get_full' anyway.
15964         (mono_class_get): Rename from _mono_class_get.  Remove 'container'
15965         parameter.
15966         (mono_class_get_full): Update.
15967
15968         * class.c (inflate_generic_type) [GENERICINST]: If the generic
15969         instance is not open, don't bother inflating.
15970         (mono_class_setup_fields): Hoist some loop-invariants.  Don't
15971         parse metadata for inflated classes.
15972         (_mono_class_get): Change GenericContext* parameter to
15973         GenericContainer*.
15974         (mono_class_create_from_typespec): Likewise.  Simplify, and
15975         implement trivially.  All the cases are handled in
15976         mono_class_from_mono_type.  Don't inflate returned class.
15977         (mono_class_get_full): Delegate GENERICINST optimization to
15978         inflate_generic_type.
15979         (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
15980
15981 2006-02-16  Dick Porter  <dick@ximian.com>
15982
15983         * socket-io.c (create_object_from_sockaddr): Fix typo.
15984         (create_sockaddr_from_object): Check array lengths before
15985         potentially accessing items off the end.
15986         (ves_icall_System_Net_Sockets_Socket_Receive_internal)
15987         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
15988         (ves_icall_System_Net_Sockets_Socket_Send_internal)
15989         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
15990         length checks to avoid wraparound overflows.
15991         (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
15992         contents of the array of sockets
15993         (hostent_to_IPHostEntry2)
15994         (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
15995         Check return value of inet_ntop ().
15996         (addrinfo_to_IPHostEntry): Fix typo
15997
15998 2006-02-16  Raja R Harinath  <rharinath@novell.com>
15999
16000         Type metadata parsing doesn't use generic-instantiation information.
16001         * metadata.c (mono_metadata_parse_array_full): Change
16002         MonoGenericContext* parameter to MonoGenericContainer*.
16003         (mono_metadata_parse_type_full): Likewise.
16004         (mono_type_create_from_typespec_full): Likewise.
16005         (mono_metadata_parse_mh_full): Likewise.
16006         (mono_metadata_parse_generic_inst): Likewise.
16007         (do_mono_metadata_parse_generic_class): Likewise.
16008         (do_mono_metadata_parse_type): Likewise.
16009         * metadata-internals.h: Update to changes.
16010         * class.c (mono_class_find_enum_basetype): Likewise.
16011         (mono_class_setup_fields): Likewise.
16012         (mono_class_create_from_typespec): Likewise.
16013         * loader.c (method_from_methodspec): Likewise.
16014         (mono_get_method_from_token): Likewise.
16015         (mono_method_get_header): Likewise.
16016
16017 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16018
16019         * marshal.c: handle additional GENERICINST case (patch from
16020         Thong Nguyen <tum@veridicus.com>).
16021         Fix a few cases where LDIND_I/STIND_I was used for references.
16022
16023 2006-02-16  Raja R Harinath  <rharinath@novell.com>
16024
16025         * reflection.c (mono_reflection_get_token): Remove unused variable.
16026
16027 2006-02-16  Martin Baulig  <martin@ximian.com>
16028
16029         * reflection.c (mono_reflection_get_token): Add support for fields
16030         in instantiated generic types.
16031
16032         * icall.c
16033         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
16034
16035 2006-02-15  Martin Baulig  <martin@ximian.com>
16036
16037         * icall.c
16038         (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
16039         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
16040         (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
16041         (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
16042
16043 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16044
16045         * class.c, metadata.c, metadata.h, object.c, icall.c,
16046         marshal.c: changed mono_type_get_underlying_type () to do
16047         the sensible thing and introduced mono_type_generic_inst_is_valuetype().
16048         Fixed handling of instantiated generic valuetypes (bug #75479).
16049
16050 2006-02-15  Raja R Harinath  <rharinath@novell.com>
16051
16052         * metadata.c (mono_metadata_decode_signed_value): Simplify.
16053         Delegate to mono_metadata_decode_value, and work on the returned value.
16054
16055         * icall.c (ves_icall_MonoType_GetGenericArguments):
16056         Add consistency check here too.
16057         
16058 2006-02-15  Ankit Jain  <jankit@novell.com>
16059
16060         * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
16061         char/short etc.
16062
16063 2006-02-15  Ankit Jain  <jankit@novell.com>
16064
16065         * metadata.c (mono_metadata_decode_signed_value): New function to decode
16066         signed values, used only for representing lower bounds of arrays.
16067         (mono_metadata_parse_array_full): Use new
16068         mono_metadata_decode_signed_value to decode lower bounds.
16069
16070 2006-02-14  Martin Baulig  <martin@ximian.com>
16071
16072         * reflection.c
16073         (mono_reflection_get_token): Support "MonoGenericMethod" and
16074         "MonoGenericCMethod" and allow generic instances / methods.
16075
16076 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
16077
16078         * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
16079         to obtain the terminal size using an ioctl.
16080
16081         * object.c (mono_nullable_init): Revert this as nullable reference
16082         types are not valid.
16083         (mono_nullable_box): Ditto.
16084
16085 2006-02-09  Dick Porter  <dick@ximian.com>
16086
16087         * threads.c (mono_thread_detach): Drop a reference to the thread
16088         we're detaching.
16089
16090 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
16091
16092         * object.c (mono_nullable_init): Handle nullable reference types.
16093         (mono_nullable_box): Ditto. Fixes #77446.
16094
16095 2006-02-07  Martin Baulig  <martin@ximian.com>
16096
16097         * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
16098
16099 2006-02-07  Ankit Jain  <jankit@novell.com>
16100
16101         * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
16102         * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
16103         (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
16104         (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
16105         (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
16106         (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
16107
16108 2006-02-02  Zoltan Varga  <vargaz@gmail.com>
16109
16110         * class.c (mono_class_create_generic): Set type_token as well.
16111
16112         * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
16113         compatible with MS.
16114
16115 2006-02-02  Martin Baulig  <martin@ximian.com>
16116
16117         * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
16118         has never been used so far.
16119
16120 2006-02-02  Martin Baulig  <martin@ximian.com>
16121
16122         * mono-debug-debugger.h: Changed comment at the top of this file;
16123         the header is not installed, but it's safe to #include it from
16124         within the JIT.
16125
16126         * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
16127         * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
16128
16129 2006-02-02  Martin Baulig  <martin@ximian.com>
16130
16131         * mono-debug.h
16132         (MonoSymbolTable): Removed the `metadata_info' field.
16133
16134         * mono-debug.c
16135         (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
16136
16137         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16138         (mono_debugger_add_builtin_types): Removed.
16139         (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
16140         (mono_debugger_create_notification_function): We now operate on a
16141         pre-allocated area; take a `gpointer' and return `void'.
16142
16143         * mono-debug-debugger.c
16144         (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
16145         (mono_debugger_add_builtin_types): Removed.
16146
16147 2006-02-02  Martin Baulig  <martin@ximian.com>
16148
16149         * threads.c (mono_debugger_create_all_threads): New public method.
16150
16151 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16152
16153         * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
16154         breaks on several platforms.
16155
16156 2006-02-01  Sebastien Pouliot  <sebastien@ximian.com>
16157
16158         * assembly.c: the VS.NET build doesn't supply default values for
16159         MONO_ASSEMBLIES and MONO_CFG_DIR.
16160
16161 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
16162
16163         * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
16164         helper function.
16165
16166         * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
16167
16168         * loader.c (method_from_memberref): Fix a warning.
16169
16170         * metadata.c (mono_metadata_load_generic_params): Fix a warning.
16171
16172         * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
16173         with explicit layout. Fixes #77433.
16174
16175 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
16176
16177         * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure 
16178         max_interface_id is initialized before using it. Fixes #77398.
16179         (ves_icall_Type_GetInterfaces): Ditto.
16180
16181 2006-01-30  Raja R Harinath  <rharinath@novell.com>
16182
16183         * metadata.c (mono_metadata_parse_method_signature_full): Don't
16184         allocate memory for parameter attributes when parsing memberref
16185         signatures.
16186         * loader.c (mono_loader_set_error_method_load): Don't warn.
16187         (method_from_memberref): Ensure MissingMethodException gets thrown
16188         if method is not found.  Make warning more informative.
16189
16190 2006-01-29  Raja R Harinath  <harinath@gmail.com>
16191
16192         Fix #77397
16193         * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
16194         return true if is byref.
16195         (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
16196         (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
16197         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
16198
16199 2006-01-27  Raja R Harinath  <rharinath@novell.com>
16200
16201         Fix tests/find-method.2.il
16202         * loader.c (find_method, find_method_in_class): Remove is_inflated
16203         argument.  Revert 2006-01-18 change.
16204         (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
16205         is generic, search for method in its generic definition.
16206         * class.c (mono_class_setup_vtable_general): Print generic
16207         arguments of generic types in debugging printf.
16208
16209 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
16210
16211         * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
16212
16213         * threads.c (mono_threads_request_thread_dump): New helper function.
16214
16215 2006-01-25  Raja R Harinath  <rharinath@novell.com>
16216
16217         * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
16218
16219 2006-01-25  Ankit Jain  <jankit@novell.com>
16220
16221         * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
16222         move definition to ..
16223         * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
16224         
16225 2006-01-25  Ankit Jain  <jankit@novell.com>
16226             Raja R Harinath  <rharinath@novell.com>
16227
16228         * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
16229         * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
16230         as necessary.
16231
16232 2006-01-25  Martin Baulig  <martin@ximian.com>
16233
16234         * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
16235         `MonoDebuggerThread' into debug-debugger.c.
16236
16237 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16238
16239         * profiler.c: fix printing of data.
16240
16241 2006-01-24  Atsushi Enomoto  <atsushi@ximian.com>
16242
16243         * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
16244           invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
16245
16246 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16247
16248         * object.c: fix deadlock related to string interning.
16249
16250 2006-01-23  Martin Baulig  <martin@ximian.com>
16251
16252         * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
16253
16254         * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
16255
16256 2006-01-23  Martin Baulig  <martin@ximian.com>
16257
16258         * mono-debug.h: Moved the prototypes of some functions which are
16259         used by the JIT here from mono-debug-debugger.h.
16260
16261 2006-01-21  Martin Baulig  <martin@ximian.com>
16262
16263         * Makefile.am: Don't install mono-debug-debugger.h.
16264
16265 2006-01-21  Martin Baulig  <martin@ximian.com>
16266
16267         * mono-debug-debugger.h: Enforce the private status of this header
16268         file and removed unneccessary #include's in metadata/*.c and mini/*.c.
16269         Moved some stuff from mono-debugger-jit-wrapper.h here.
16270
16271 2006-01-20  Raja R Harinath  <rharinath@novell.com>
16272
16273         * class.c (mono_class_from_typeref): Add a sanity test to help
16274         catch lack of assembly load/search hooks.
16275
16276 2006-01-19  Zoltan Varga  <vargaz@gmail.com>
16277
16278         * marshal.c (emit_struct_conv): Relax the fields with same offset
16279         check even more. Fixes #77230.
16280
16281 2006-01-18  Martin Baulig  <martin@ximian.com>
16282
16283         * loader.c (find_method_in_class): Added `gboolean is_inflated'
16284         argument; if false, we compare the uninstantiated signatures.
16285         (method_from_memberref): Compare the uninstantiated signatures;
16286         fixes #76417.
16287
16288 2006-01-18  Robert Jordan  <robertj@gmx.net>
16289
16290         * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
16291         Clear the weak link. Fixes bug #77170.
16292
16293         * gc.c (mono_gchandle_free):
16294         Reflect *-gc.c changes (tiny optimization).
16295
16296 2006-01-18  Zoltan Varga  <vargaz@gmail.com>
16297
16298         * metadata.c (mono_metadata_signature_dup): Applied patch from
16299         Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
16300         Fixes #77288.
16301
16302 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
16303
16304         * marshal.c (emit_struct_conv): Allow fields with the same offset when
16305         marshalling from native to managed code. Fixes #77230.
16306
16307 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16308
16309         * threadpool.c: fix problem (Mac only) when more than one asynchronous
16310         connect. Fixes bug #77020.
16311
16312 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16313
16314         * class.c: fixed id assignement for nested interfaces (bug #77275).
16315         Added also better info for --print-vtable debugging.
16316
16317 2006-01-12  Martin Baulig  <martin@ximian.com>
16318
16319         * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
16320         interfaces on-the-fly; fixes #76625.
16321
16322         * class-internals.h
16323         (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
16324         don't need that anymore.
16325
16326 2006-01-12  Miguel de Icaza  <miguel@novell.com>
16327
16328         * socket-io.c
16329         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16330         To avoid initing the nested_classes when not needed I turned the
16331         PeerCredData as a toplevel internal class, as it has to be shared
16332         anyways. 
16333
16334         Fixes the CASA issue.
16335
16336 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
16337
16338         * domain.c: Accessors for MonoJitInfo
16339
16340         * profiler-private.h: Add jitinfo to the end jit hook
16341
16342         * profiler.[ch]: Define new hooks, called after jitting which give
16343         the MonoJitInfo that was compiled
16344
16345 2006-01-10  Martin Baulig  <martin@ximian.com>
16346
16347         * class.c (mono_class_setup_events): Add support for generic
16348         classes; fixes #76440.
16349
16350 2006-01-06  Raja R Harinath  <rharinath@novell.com>
16351
16352         Fix #77160.
16353         * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
16354         on passed-in method.
16355
16356 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
16357
16358         * object.c (mono_runtime_invoke_array): Add Nullable support.
16359
16360         * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
16361
16362 2006-01-03  Sebastien Pouliot  <sebastien@ximian.com>
16363
16364         * file-io.c: Don't consider sockets as directory and avoid an endless
16365         loop. Fix bug #76966.
16366
16367 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
16368
16369         * object.c (mono_nullable_init): New helper function.
16370         (mono_nullable_box): Ditto.
16371
16372         * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
16373
16374         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
16375
16376         * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
16377         
16378 2006-01-02  Zoltan Varga  <vargaz@gmail.com>
16379
16380         * class.c (mono_class_is_assignable_from): Make T assignable to 
16381         Nullable<T>.
16382
16383 2005-12-23  Sebastien Pouliot  <sebastien@ximian.com>
16384
16385         * appdomain.c: Bump corlib version to 46.
16386         * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
16387         serialization purpose) and changed ves_icall_System_Reflection_
16388         Assembly_get_code_base signature to accept a boolean (to escape, or 
16389         not, the assembly code base).
16390
16391 2005-12-23  Dick Porter  <dick@ximian.com>
16392
16393         * icall.c: 
16394         * threads-types.h: 
16395         * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
16396         CreateEvent icall now returns "created" boolean parameter.
16397
16398 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
16399
16400         * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
16401         #76967.
16402
16403         * reflection.c (mono_custom_attrs_construct_by_type): Handle the case 
16404         when attr_klass is an interface. Fixes #77045.
16405
16406 2005-12-20  Zoltan Varga  <vargaz@gmail.com>
16407
16408         * marshal.c (emit_struct_conv): Fix previous patch.
16409         
16410         * marshal.c (emit_struct_conv): Add a check for fields with the same
16411         offset.
16412
16413 2005-12-20  Raja R Harinath  <rharinath@novell.com>
16414
16415         Fix regression in Mono.C5.
16416         * class.c (mono_class_create_generic): If 'klass' is an interface
16417         set up the interface offsets.
16418         (mono_class_is_assignable_from): Don't throw away generic arguments.
16419
16420 2005-12-19  Raja R Harinath  <rharinath@novell.com>
16421
16422         * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
16423         type parameters.
16424
16425 2005-12-15  Raja R Harinath  <rharinath@novell.com>
16426
16427         * metadata.c (mono_metadata_parse_method_signature_full): Remove a
16428         dead store.
16429         (do_mono_metadata_parse_generic_class): Don't pass the current
16430         generic context when parsing the type being instantiated: it
16431         cannot use it, anyway.
16432
16433         * loader.c (method_from_memberref): Don't inflate a signature if
16434         it doesn't contain any type parameters.
16435
16436 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
16437
16438         * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
16439
16440 2005-12-14  Martin Baulig  <martin@ximian.com>
16441
16442         * class.c
16443         (mono_type_get_name_recurse): Don't return null for type
16444         parameters and open generic classes.
16445         (mono_class_setup_methods): Don't exclude generic instances.
16446         (mono_get_unique_iid): Use different IDs for different
16447         instantiations of the same generic type.
16448         (mono_class_setup_vtable): Only use setup_generic_vtable() for
16449         open generic instances; create a normal vtable for closed generic
16450         instances.
16451         (mono_class_setup_vtable_general): We're now also called for
16452         closed generic instances.
16453
16454         * reflection.c
16455         (mono_reflection_bind_generic_parameters): Correctly use
16456         mono_metadata_lookup_generic_inst() everywhere.
16457
16458 2005-12-14  Zoltan Varga  <vargaz@gmail.com>
16459
16460         * object.c (mono_class_create_runtime_vtable): Call 
16461         mono_class_setup_vtable ().
16462
16463         * reflection.c (mono_reflection_get_dynamic_overrides): New helper
16464         function.
16465         (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
16466         #76959.
16467
16468         * loader.c (mono_loader_set_error_type_load): Print the type load
16469         warnings to the console so they are more visible to the user.
16470         (mono_loader_set_error_method_load): Ditto.
16471
16472         * reflection.c (ensure_runtime_vtable): Revert the last change as it
16473         is still broken.
16474         
16475         * reflection.c (ensure_runtime_vtable): Fix build.
16476
16477         * reflection.c (ensure_runtime_vtable): Disable an optimization which
16478         doesn't work in all cases.
16479
16480 2005-12-13  Zoltan Varga  <vargaz@gmail.com>
16481
16482         * object.c (mono_array_new_full): Treat a single dimensional array
16483         with 0 lower bounds as an szarray. Fixes #76973.
16484
16485         * reflection.c (custom_attr_visible): Really fix this.
16486
16487 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
16488
16489         * reflection.c (custom_attr_visible): Allow nested public attributes
16490         as well.
16491
16492         * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
16493         interface check.
16494
16495 2005-12-12  Raja R Harinath  <harinath@gmail.com>
16496
16497         * class.c (set_generic_param_owner): Delete.
16498         (mono_class_create_from_typedef): Don't set ->owner field of
16499         generic parameters to "param containers" of enclosing classes.
16500         * reflection.c (mono_reflection_initialize_generic_parameter):
16501         Likewise.
16502
16503 2005-12-11  Zoltan Varga  <vargaz@gmail.com>
16504
16505         * reflection.c (custom_attr_visible): Fix build.
16506
16507 2005-12-10  Zoltan Varga  <vargaz@gmail.com>
16508
16509         * reflection.c (mono_custom_attrs_from_builders): Avoid returning
16510         private attributes.
16511         
16512         * reflection.c (reflection_methodbuilder_to_mono_method): Fix
16513         handling of null parameter defaults.
16514
16515 2005-12-09  Raja R Harinath  <rharinath@novell.com>
16516
16517         * class.c (mono_class_from_generic_parameter): Don't set
16518         klass->generic_container.
16519         (my_mono_class_from_generic_parameter): Likewise.
16520
16521 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
16522
16523         * reflection.c (load_public_key): Fix a warning.
16524         (method_encode_code): Fix unaligned accesses.
16525
16526 2005-12-07  Martin Baulig  <martin@ximian.com>
16527
16528         * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
16529
16530         * reflection.c
16531         (write_generic_param_entry): Encode our custom attrs.
16532
16533         * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
16534
16535 2005-12-07  Martin Baulig  <martin@ximian.com>
16536
16537         * reflection.c (encode_new_constraint): Removed; we don't use the
16538         `NewConstraintAttribute' anymore.
16539
16540 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
16541
16542         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
16543         not fire a TypeResolve event when Assembly.GetType () is called.
16544
16545 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
16546
16547         Beginning of support for nullable types in the runtime. Parts of
16548         this patch are from Martin.
16549
16550         * appdomain.c (MONO_CORLIB_VERSION): Bump
16551
16552         * domain.c (mono_init_internal): get the nullable type
16553
16554         * class.c (mono_class_is_nullable): New method
16555         (mono_class_get_nullable_param): New mehod
16556         (mono_class_create_generic): In types T? set cast_class to T
16557
16558         * class-internals.h (MonoDefaults): new nullable default class
16559         (mono_class_get_nullable_param, mono_class_get_nullable_param):
16560         new methods.
16561
16562 2005-12-05  Raja R Harinath  <rharinath@novell.com>
16563
16564         * metadata.c (select_container): New.  Refactor code to select the
16565         appropriate GenericContainer given the type of generic parameter
16566         we are looking for.
16567         (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
16568         not a MonoGenericContext.  Use select_container.  Update parameters.
16569         (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
16570         and MONO_TYPE_MVAR.
16571         (unwrap_arrays): Remove duplicate tests.
16572         (find_generic_param): Rename from 'has_same_context'.  Now walks a
16573         generic instantiated class to find any arguments that are generic
16574         parameters.
16575         (mono_type_create_from_typespec_full): Use find_generic_param to
16576         avoid evicting some generic instantiations from the typespec
16577         cache.
16578
16579 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
16580
16581         * reflection.c: fixed writing of doubles on ARM FPA.
16582
16583 2005-12-02  Robert Jordan  <robertj@gmx.net>
16584
16585         * icall.c: Fixed EventInfo.ReflectedType (#76829).
16586
16587 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16588
16589         * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
16590         least on SUSE 10 they are not the same (on debian, they are just the
16591         same thing).
16592
16593 2005-12-01  Raja R Harinath  <rharinath@novell.com>
16594
16595         * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
16596         DeclaringType for VARs and MVARs.
16597         * class.c (set_generic_param_owner): Fix initialization of owner
16598         fields.
16599
16600 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
16601
16602         * icall.c: fixed Enum.ToObject() to correctly convert the values.
16603
16604 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16605
16606         * threadpool.c: workaround for a bug that shows up on the Mac:
16607         select()+connect() on a blocking socket is not like it should
16608         be, so we proceed to connect() in that case, wasting the I/O
16609         threadpool thread until connect succeedes. Fixes bug #75436.
16610
16611 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16612
16613         * threadpool.c: fix typo when setting file descriptor states.
16614
16615 2005-11-28  Raja R Harinath  <rharinath@novell.com>
16616
16617         * class-internals.h (MonoGenericContainer.is_signature): Remove.        
16618         * metadata.c (mono_metadata_parse_method_signature_full): Don't
16619         create a temporary signature container.
16620         (mono_metadata_parse_generic_param): Update to changes.
16621         (mono_type_create_from_typespec_full): Update to changes.
16622         * loader.c (method_from_memberref): Don't use a
16623         MonoGenericContainer while parsing a memberref signature.
16624         (method_from_methodspec): Remove dead-store of the 'container'
16625         variable.  It's overwritten before use.
16626
16627         * metadata.c (mono_type_create_from_typespec_full): Make debugging
16628         checks tighter.
16629         (mono_metadata_parse_generic_param): Likewise.
16630         * loader.c (find_method_in_class): Does not need a
16631         MonoGenericContainer.  Use 'mono_method_signature' rather than
16632         'mono_method_signature_full'.
16633         (find_method, mono_get_method_constrained, method_from_memberref):
16634         Update to changes.
16635
16636         * metadata.c (mono_type_create_from_typespec_full): Ensure that
16637         owner-less generic-parameters are never evicted from the typespec
16638         cache.
16639
16640         * loader.c (method_from_memberref): Don't use the current context
16641         when parsing signatures.
16642         (method_from_methodspec, mono_get_method_from_token): Update to changes.
16643
16644         * metadata.c (do_mono_metadata_parse_generic_class): Avoid
16645         side-effects in g_assert.
16646         * loader.c (mono_get_method_from_token): Resolve klass earlier so
16647         that we don't potentially lose information.
16648
16649 2005-11-26  Dick Porter  <dick@ximian.com>
16650
16651         * icall.c:
16652         * threads.c: icalls to implement basic (ie, not named)
16653         System.Threading.Semaphore.
16654
16655 2005-11-24  Dick Porter  <dick@ximian.com>
16656
16657         * process.c
16658         (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
16659         Use GetProcessId() if it's available.
16660
16661 2005-11-23  Zoltan Varga  <vargaz@gmail.com>
16662
16663         * icall.c threads-types.h threads.c: Add Exchange<T> icall.
16664
16665 2005-11-23  Raja R Harinath  <rharinath@novell.com>
16666             Ankit Jain  <jankit@novell.com>
16667
16668         * loader.c (mono_get_method_from_token): Initialize 'method' field
16669         of all generic parameters before parsing the signature.  Remove
16670         code that "fixed"-up MVAR references.
16671
16672 2005-11-23  Ankit Jain  <jankit@novell.com>
16673
16674         * metadata.c (mono_metadata_has_generic_params):
16675         (mono_metadata_load_generic_param_constraints):
16676         (mono_metadata_load_generic_params): Move duplicate code ...
16677         (mono_metadata_get_generic_param_row): ... here. Returns the
16678         first row-id in GenericParam table for a given owner (token).
16679         * metadata-internals.h (mono_metadata_get_generic_param_row): Add
16680         prototype.
16681
16682 2005-11-23  Raja R Harinath  <rharinath@novell.com>
16683             Ankit Jain  <jankit@novell.com>
16684
16685         * metadata.c (mono_metadata_class_equal): Pass signature_only when
16686         comparing VARs too.
16687         * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at 
16688         type->data.generic_param only if the type is an MVAR.
16689         (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
16690         leak owner-less VARs and MVARs into managed space.
16691
16692 2005-11-21  Martin Baulig  <martin@ximian.com>
16693
16694         * class-internals.h
16695         (MonoMethod): Moved the `generic_container' here from
16696         `MonoMethodNormal' since we now also need it for
16697         `MonoMethodPInvoke';
16698         (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
16699         (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
16700         an union containing both `MonoMethodNormal' and
16701         `MonoMethodPInvoke'.
16702
16703         * loader.c
16704         (mono_get_method_from_token): Allow implementing generic methods
16705         as interncalls.
16706
16707         * threads.c
16708         (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
16709         icall.
16710
16711 2005-11-17  Dick Porter  <dick@ximian.com>
16712
16713         * icall.c: 
16714         * process.h: 
16715         * process.c: Split the Process Start_internal icall into
16716         ShellExecuteEx_internal and CreateProcess_internal, which are
16717         called depending on whether UseShellExecute is true.  Fixes bug
16718         76670.
16719
16720         * appdomain.c (MONO_CORLIB_VERSION): Incremented
16721
16722 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
16723
16724         * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
16725         'msize' parameters, use the information in 'mspec' instead.
16726         (emit_object_to_ptr_conv): Ditto.
16727
16728         * marshal.c (emit_struct_conv): Handle explicit layout structs with
16729         fields out of order. Fixes #76733.
16730
16731 2005-11-17  Ankit Jain  <jankit@novell.com>
16732
16733         * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
16734
16735 2005-11-16  Atsushi Enomoto  <atsushi@ximian.com>
16736
16737         * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
16738           bug #76575.
16739
16740 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
16741
16742         * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
16743         for types with non-auto layout. Fixes #76717.
16744
16745 2005-11-16  Ankit Jain  <jankit@novell.com>
16746
16747         * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
16748         * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam 
16749         if generic_context is null.
16750           (mono_metadata_generic_param_equal): param->owner can be null.
16751           (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
16752         null.
16753
16754 2005-11-16  Zoltan Varga  <vargaz@gmail.com>
16755
16756         * reflection.c (create_dynamic_mono_image): Set md_version_minor to
16757         the correct value.
16758
16759 2005-11-15  Martin Baulig  <martin@ximian.com>
16760
16761         * object.c (set_value): Use mono_class_from_mono_type() instead of
16762         the hack for generic instances; fixes #76136.
16763
16764 2005-11-15  Zoltan Varga  <vargaz@gmail.com>
16765
16766         * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
16767         fields.
16768
16769         * image.c (load_metadata_ptrs): Initialize the new fields.
16770
16771         * reflection.c (create_dynamic_mono_image): Ditto.
16772
16773         * reflection.c (build_compressed_metadata): Use the new fields.
16774
16775         * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
16776         icall.
16777
16778         * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
16779         icall.
16780         
16781 2005-11-15  Ankit Jain  <jankit@novell.com>
16782             Raja R Harinath  <harinath@gmail.com>
16783
16784         * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
16785         * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
16786         new per-generic_container cache if the cached MonoType's context matches
16787         the current context.
16788           (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
16789         to the expected context.
16790           (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
16791
16792 2005-11-14  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16793
16794         * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
16795         we changed the signature of an icall.
16796         * icall.c: Modify to mono_double_ParseImpl return true/false 
16797         depending on the success, instead of throwing the exception. This will
16798         help us in Double.TryParse methods.
16799         
16800 2005-11-14  Zoltan Varga  <vargaz@gmail.com>
16801
16802         * marshal.c (emit_marshal_object): Throw an exception when
16803         marshalling 'object' instead of crashing. Fixes #76696.
16804
16805 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
16806
16807         * class-internals.h: Add prototype for mono_type_get_full_name ().
16808
16809 2005-11-11  Dick Porter  <dick@ximian.com>
16810
16811         * threads.c (mono_thread_manage): Make sure the main thread has
16812         abandoned all its mutexes when cleaning up.  Fixes bug 74680.
16813
16814 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
16815
16816         * loader.c (mono_loader_set_error_type_load): Log a warning to the
16817         console about the missing type.
16818         (mono_loader_set_error_method_load): Ditto.
16819
16820 2005-11-09  Miguel de Icaza  <miguel@novell.com>
16821
16822         * mono-config.c (mono_get_config_dir): Set the system defaults if
16823         none is specified.
16824
16825         * assembly.c (mono_set_dirs): New API entry point to set the
16826         assembly and the config directory in one call
16827
16828 2005-11-09  Zoltan Varga  <vargaz@gmail.com>
16829
16830         * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
16831         the ftnptr was created from a delegate in a domain other than the
16832         current domain. Fixes #75377.
16833
16834         * exception.h exception.c: Add mono_get_exception_not_supported ().
16835
16836 2005-11-08  Martin Baulig  <martin@ximian.com>
16837
16838         * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
16839
16840 2005-11-07  Sebastien Pouliot  <sebastien@ximian.com>
16841
16842         * security-manager.h: Added definitions to deal with strongname key 
16843         pairs bigger (and smaller) than 1024 bits.
16844         * reflection.c: Remove hardcoded strongname size (128 bytes) and 
16845         adjust wrt the public key length being used.
16846
16847 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com>
16848
16849         * marshal.c, icall.c : reverted sig->pinvoke changes which broke
16850           Windows build (r51396-51397).
16851
16852 2005-11-03  Martin Baulig  <martin@ximian.com>
16853
16854         * class.c (mono_class_setup_vtable_general): Also add generic
16855         methods to the vtable; fixes #76581.
16856
16857 2005-11-01  Miguel de Icaza  <miguel@novell.com>
16858
16859         * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
16860         sure that we lookup GetString method from the System.Text.Encoding
16861         class, not the derived class or we get an empty method.
16862
16863         Fixed class #76612.
16864
16865 2005-10-25  Miguel de Icaza  <miguel@novell.com>
16866
16867         * assembly.c (mono_assemblies_init): Do not set the Mono root dir
16868         if it has been previously set (embedders). 
16869
16870         Make mono_set_rootdir available also on Unix.
16871
16872 005-10-24  Robert Jordan  <robertj@gmx.net>
16873
16874         * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
16875
16876 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
16877
16878         * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
16879         only calls which are made to native code use this flag.
16880
16881         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
16882
16883 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
16884
16885         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
16886         Add support for FieldBuilders.
16887
16888 2005-10-29  Martin Baulig  <martin@ximian.com>
16889
16890         * mono-debug.c
16891         (mono_debug_using_mono_debugger): New public method; returns
16892         whether we're running inside the debugger.
16893
16894 2005-10-27  Zoltan Varga  <vargaz@gmail.com>
16895
16896         * reflection.c (mono_reflection_get_custom_attrs_info): Add support
16897         for Method/Constructor/FieldBuilders.
16898
16899 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
16900
16901         * reflection.c (module_add_cattrs): Save custom attributes for global methods
16902         and fields as well.
16903
16904 2005-10-26  Martin Baulig  <martin@ximian.com>
16905
16906         * mono-debug-debugger.c
16907         (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
16908
16909 2005-10-24  Raja R Harinath  <harinath@gmail.com>
16910
16911         * icall.c (base64_to_byte_array): Don't pass an out-of-range
16912         integer to isspace.
16913
16914 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
16915
16916         * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
16917         when passing valuetypes byref. Fixes #76502.
16918
16919 2005-10-19  Jackson Harper  <jackson@ximian.com>
16920
16921         * profiler.c: Don't put a . in front of types that are not in a
16922         namespace.
16923
16924 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
16925
16926         * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
16927
16928 2005-10-15  Zoltan Varga  <vargaz@freemail.hu>
16929
16930         * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
16931         #76436.
16932         (mono_marshal_get_ldflda_wrapper): Fix a warning.
16933
16934 2005-10-13  Carlos Alberto Cortez <calberto.cortez@gmail.com>
16935
16936         * assembly.c metadata-internals.h icall.c: Define an additional
16937         parameter for mono_assembly_name_parse_full, so we can avoid creating
16938         S.R.AssemblyName.Version when no version info wasn't passed.
16939         
16940 2005-10-09  Miguel de Icaza  <miguel@novell.com>
16941
16942         * class.c (mono_type_get_full_name): Reimplement method that was
16943         removed. 
16944
16945         * image.c: Some docs
16946
16947 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
16948
16949         * profiler.c (output_newobj_profile): Fix printing of Total memory
16950         on x86.
16951
16952 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
16953
16954         * profiler.c: Add support for allocations > 2GB. Fixes #74886.
16955
16956 2005-10-08  Gert Driesen  <drieseng@users.sourceforge.net>
16957
16958         * threads.c: remove debug output.
16959
16960 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
16961
16962         * threads.c (mono_thread_manage): Fix crashes if more than 64
16963         threads need to be aborted. Hopefully fixes #75899.
16964
16965         * assembly.c (mono_stringify_assembly_name): New helper function.
16966
16967         * class.c: Use mono_stringify_assembly_name instead of the similar
16968         static function.
16969
16970         * assembly.h assembly.c: Add support for calling a postload search 
16971         hook if an assembly cannot be loaded.
16972
16973         * appdomain.c: Register new search hooks which call the AssemblyResolve
16974         events in AppDomain. Fixes #75231
16975
16976 2005-10-07  Martin Baulig  <martin@ximian.com>
16977
16978         * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
16979         methods without debug info.
16980
16981 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
16982
16983         * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
16984         wrappers.
16985
16986 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16987
16988         * file-io.c: now that we return symlinks, use lstat and, when the file
16989         is a symbolic link, stat, to get the file attributes. Also avoid the
16990         conversion to/from utf16/external.
16991
16992 2005-10-06  Zoltan Varga  <vargaz@gmail.com>
16993
16994         * class.c (mono_class_layout_fields): Compute klass->has_references
16995         correctly if an embedded valuetype is not yet initialized. Fixes
16996         #76331.
16997
16998 2005-10-04  Martin Baulig  <martin@ximian.com>
16999
17000         * metadata.c
17001         (mono_metadata_load_generic_param_constraints): New public
17002         function; splitted the constraints loading out from
17003         mono_metadata_load_generic_params().
17004
17005         * class.c (mono_class_create_from_typedef): Call
17006         mono_metadata_load_generic_param_constraints() after setting up
17007         the type and creating our parent; fixes #75329.
17008
17009 2005-10-04  Martin Baulig  <martin@ximian.com>
17010
17011         * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
17012         non-dynamic parent classes.
17013
17014 2005-10-04  Atsushi Enomoto  <atsushi@ximian.com>
17015
17016         * file-io.c : win32 build fix (ETXTBSY seems not found).
17017
17018 2005-10-04  Martin Baulig  <martin@ximian.com>
17019
17020         * reflection.c
17021         (mono_image_get_methodspec_token): Make the cache actually work;
17022         fixes #75974.
17023
17024 2005-10-04  Martin Baulig  <martin@ximian.com>
17025
17026         * class.c (mono_class_name_from_token): Removed the unneccessary
17027         `MonoGenericContext *' argument.
17028
17029 2005-10-04  Martin Baulig  <martin@ximian.com>
17030
17031         * loader.c
17032         (method_from_methodspec): Make the caching work again; fixes the
17033         performance regression from #76262.
17034
17035 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17036
17037         * file-io.c:
17038         * file-io.h:
17039         * icall.c: replace FindFirst/FindNext/FindClose calls with a new
17040         GetFileSystemEntries that performs the same work but without going
17041         into io-layer, locking, etc.
17042
17043 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
17044
17045         * threads.c (ves_icall_System_Threading_Thread_Abort): Handle 
17046         ThreadState_Stopped as well. Fixes #76047.
17047
17048 2005-09-29  Martin Baulig  <martin@ximian.com>
17049
17050         * class.c
17051         (inflate_generic_context): If the new context has a `gmethod', set
17052         its `container' that that gmethod's `container'.
17053
17054         * metadata.c
17055         (mono_metadata_parse_generic_param): Simplify things;
17056         `generic_container = generic_context->container;' is just fine.
17057
17058         * loader.c (method_from_methodspec): Code cleanups.
17059
17060 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
17061
17062         * decimal.c: fix warning (and let gcc generate correct
17063         code on ARM with optimizations).
17064
17065 2005-09-28  Martin Baulig  <martin@ximian.com>
17066
17067         * loader.c
17068         (method_from_memberref): Added `MonoGenericContext *class_context'
17069         argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
17070         (method_from_methodspec): If we're a memberref, use the enclosing
17071         context when parsing its parent.  Fixes #76262; see gtest-206.cs.
17072
17073 2005-09-28  Martin Baulig  <martin@ximian.com>
17074
17075         * object.c (mono_runtime_invoke_array): Added support for
17076         MONO_TYPE_GENERICINST; fixes #75917.
17077
17078 2005-09-27  Martin Baulig  <martin@ximian.com>
17079
17080         * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
17081         `k->byval_arg.type' to determine the actual type.
17082
17083         * loader.c (method_from_methodspec): Removed some hacks.
17084
17085 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
17086
17087         * class-internals.h (mono_field_is_deleted): Do the test for
17088         rtspecialname before we check the actual name of the field. This
17089         prevents us from dereferencing a pointer into the string table,
17090         saving us from accessing a few pages
17091
17092         * *.c: Replace the use of {Enter,Leave}CriticalSection with
17093         macros. This will allow a deadlock debugger to easily be plugged
17094         in.
17095
17096 2005-09-27  Martin Baulig  <martin@ximian.com>
17097
17098         * loader.c (method_from_methodspec): Create a "signature"
17099         MonoGenericContainer and use mono_get_method_full().  Fixes #75584.
17100
17101 2005-09-27  Martin Baulig  <martin@ximian.com>
17102
17103         * class.c
17104         (inflate_generic_class): Correctly set the new context's
17105         container.
17106
17107         * loader.c
17108         (find_method, find_method_in_class): Take a `MonoGenericContainer *'
17109         instead of a `MonoGenericContext *'.
17110         (mono_method_signature_full): Take a `MonoGenericContainer *'
17111         instead of a `MonoGenericContext *'.
17112
17113         * metadata.c
17114         (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
17115         instead of a `MonoGenericContext *'.
17116         (mono_metadata_parse_method_signature_full): Likewise.
17117
17118 2005-09-26  Martin Baulig  <martin@ximian.com>
17119
17120         * class.c
17121         (mono_class_from_generic_parameter): Set `klass->generic_container'
17122         (mono_class_from_generic_parameter): Likewise.
17123         (mono_bounded_array_class_get): We inherit the generic container
17124         from the element class.
17125
17126         * loader.c
17127         (find_method, find_method_in_class): Take a `MonoGenericContext *'
17128         argument rather than computing it here.
17129         (method_from_memberref): Correctly set the generic context before
17130         parsing the signature.  Fixes #75681.
17131
17132 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
17133
17134         * object.c (mono_class_has_special_static_fields): Fix warnings.
17135
17136 2005-09-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17137
17138         * assembly.c: Add parse_public_key function, to
17139         par the public keys. Also added mono_assembly_name_parse_full,
17140         to define it the parsed key should be freed or not.
17141         * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
17142         to parse a long format assembly name.
17143         * metadata-internals.h: Keep mono_assembly_name_parse_full as
17144         private, since calling it to preserve the key requires
17145         freeing it manually.
17146         
17147 2005-09-26  Atsushi Enomoto  <atsushi@ximian.com>
17148
17149         * locales.c : removed HAVE_ICU part.
17150
17151 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
17152
17153         * object.c (mono_class_create_runtime_vtable): Avoid calling 
17154         field_is_special_static if the klass has no special static fields.
17155
17156         * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
17157         (MonoCachedClassInfo): Likewise.
17158
17159         * object.c (mono_class_has_special_static_fields): New helper function.
17160
17161 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17162
17163         * class.c (mono_class_create_from_typedef): Don't call 
17164         interfaces_from_typedef_full for enums.
17165         (mono_class_create_from_typedef): Compute the base types of enums directly
17166         without calling mono_class_setup_fields ().
17167         (mono_class_find_enum_basetype): New helper function.
17168
17169         * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
17170         one place inside the string heap.
17171         
17172 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
17173
17174         * class.c: locking fixes, code cleanups, some docs added.
17175         Allocate some data structures in the image mempool.
17176
17177 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17178
17179         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17180         the example code.
17181         
17182 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
17183
17184         * class-internals.h, class.c, reflection.c: reduce memory taken by
17185         MonoClass.
17186
17187 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
17188
17189         * metadata.c, metadata.h, loader.h: documentation updates, code and
17190         API cleanups.
17191
17192 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17193
17194         * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
17195         the example code.
17196
17197         * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
17198         page faults caused by the runtime while reading metadata.
17199
17200 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17201
17202         * socket-io.c: the field names were changed 3 months ago and no one
17203         realized until bug #76077 got filed!
17204
17205 2005-09-20  Martin Baulig  <martin@ximian.com>
17206
17207         * icall.c (assembly_icalls): Removed some unused debugger icalls.
17208
17209 2005-09-20  Martin Baulig  <martin@ximian.com>
17210
17211         * mono-debug.c (mono_debug_add_type): Ignore array types and don't
17212         write the rank into the class entry.
17213
17214 2005-09-20  Martin Baulig  <martin@ximian.com>
17215
17216         * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
17217
17218 2005-09-19  Zoltan Varga  <vargaz@gmail.com>
17219
17220         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17221
17222         * icall.c (custom_attrs_defined_internal): New icall.
17223
17224         * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
17225         function.
17226         (mono_custom_attrs_construct_by_type): New helper function.
17227
17228 2005-09-17  Zoltan Varga  <vargaz@freemail.hu>
17229
17230         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
17231         terminate the resulting string. Fixes #76123.
17232
17233 2005-09-16  Martin Baulig  <martin@ximian.com>
17234
17235         * mono-debug.c
17236         (mono_debug_add_method): Ignore inflated methods for the moment.
17237
17238 2005-09-14  Martin Baulig  <martin@ximian.com>
17239
17240         * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
17241
17242 2005-09-13  Zoltan Varga  <vargaz@gmail.com>
17243
17244         * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
17245         return a success/failure indication.
17246         (mono_metadata_interfaces_from_typedef_full): Ditto.
17247         (get_constraints): Ditto.
17248
17249 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
17250
17251         * marshal.c (emit_marshal_array): Fix handling of null arrays.
17252         
17253         * marshal.c (emit_marshal_array): Add support for returning string
17254         arrays from delegates. Fixes #76063.
17255
17256         * marshal.c: Use the emit_ldloc/stloc macros where possible.
17257
17258 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
17259
17260         * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
17261         icall.
17262
17263 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
17264
17265         * reflection.c icall.c: Fix after mono_get_exception_type_load
17266         signature change.
17267
17268         * assembly.c (mono_assembly_get_assemblyref): New helper function.
17269         (mono_assembly_load_reference): Use the new helper.
17270
17271         * class-internals.h (MonoLoaderError): New structure containing 
17272         information about type loading errors.
17273
17274         * class-internals.h loader.c: Add APIs to store per-thread loader
17275         error information.
17276
17277         * loader.c class.c: Set the loader error if needed.
17278
17279         * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
17280
17281 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
17282
17283         * decimal.c: fixed to handle the broken ARM fp format.
17284
17285 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
17286
17287         * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
17288         broken.
17289
17290 2005-09-06  Martin Baulig  <martin@ximian.com>
17291
17292         * domain.c (supported_runtimes): Added v2.0.50727.
17293
17294 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
17295
17296         * culture-info.h: reduce the size of some structures.
17297
17298 2005-09-05  Martin Baulig  <martin@ximian.com>
17299
17300         Reflect latest API changes in the August CTP.
17301
17302         * icall.c
17303         ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
17304         ("MonoType.HasGenericArguments"): Removed.
17305         ("MonoMethod.BindGenericParameters"): Renamed to
17306         "MakeGenericMethod".
17307         ("MethodBuilder.BindGenericParameters"): Renamed to
17308         "MakeGenericMethod".    
17309
17310 2005-09-05  Martin Baulig  <martin@ximian.com>
17311
17312         * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
17313
17314 2005-09-05  Martin Baulig  <martin@ximian.com>
17315
17316         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17317
17318         * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
17319         generic_container is non-NULL.
17320
17321 2005-09-05  Martin Baulig  <martin@ximian.com>
17322
17323         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17324
17325         * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
17326
17327 2005-08-29  Michal Moskal  <malekith@nemerle.org>
17328
17329         * reflection.c (encode_locals,
17330         mono_reflection_sighelper_get_signature_local): Increase buffer sizes
17331         for large generic types.
17332
17333 2005-09-05  Martin Baulig  <martin@ximian.com>
17334
17335         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17336
17337         * class.c (mono_dup_array_type): New public method.
17338         (mono_metadata_signature_deep_dup): New public method.
17339         (dup_type): Correctly duplicate array and function types.
17340
17341 2005-09-05  Martin Baulig  <martin@ximian.com>
17342
17343         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17344
17345         * reflection.c (get_default_param_value_blobs): Handle generic types
17346         and generic methods.
17347
17348 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
17349
17350         * class.c: Fixed error reporting (method/class were inversed) for 
17351         inheritance demands.
17352         * security-manager.c|h: Added the AppDomain when calling the managed
17353         System.Security.SecurityManager.InheritanceDemand method.
17354
17355 2005-09-01  Raja R Harinath  <rharinath@novell.com>
17356
17357         * reflection.c (encode_marshal_blob): 'marshaltype' and
17358         'marshaltyperef' are alternate sources for the custom marshaler
17359         name.
17360
17361 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
17362
17363         * class.c: fix creation of array classes with rank == 1
17364         (patch by Ankit Jain <jankit@novell.com>).
17365
17366 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
17367
17368         * object.c: fix check for creating the bound data for arrays vs
17369         szarrays.
17370
17371 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17372
17373         * object.c: configuration file name is now based on the executable name,
17374         not the image name. Fixes bug #75931.
17375
17376 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
17377
17378         * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
17379         flag using LDIND_U4 since it leads to smaller and faster code on ia64.
17380
17381 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
17382
17383         * rand.c: Use wincrypt.h instead of WinCrypt.h.
17384
17385 2005-08-24  Ankit Jain  <jankit@novell.com>
17386             Raja R Harinath  <rharinath@novell.com>
17387
17388         * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
17389           called by it recursively.
17390           (mono_class_init): Remove special case in pending_init handling, since it's
17391           superseded by the fix to mono_class_from_typeref.
17392
17393 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
17394
17395         * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the 
17396         BROKEN_THREAD_START stuff.
17397
17398 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
17399
17400         * class-internals.h object.c: Add a new kind of trampoline called a delegate 
17401         trampoline.
17402
17403         * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
17404         
17405         * object.c (mono_delegate_ctor): Replace the original function address with
17406         a delegate trampoline.
17407
17408 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
17409
17410         * icall.c: add boolean argument to base64_to_byte_array and 
17411         InternalFromBase64String to control whether a whitespace-only string
17412         is allowed (or should casue a FormatException to be thrown). We need
17413         this as the behavior has changed between MS.NET 1.x and 2.0, and we
17414         to match the MS behaviour in both profiles.
17415         * appdomain.c: Bump corlib version.
17416
17417 2005-08-20  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17418
17419         This patch implements a big portion of publisher policy
17420         support, used to bind assembly versions and redirect
17421         one assembly from version A to version B.
17422
17423         * assembly.c:
17424         New GSList loaded_assembly_bindings, for storing the cached
17425         assembly bindings.
17426         (assembly_binding_maps_name): New static function for checking if a 
17427         assembly binding information maps an assembly name.
17428         (mono_assembly_binding_info_free): New function for freeing
17429         assembly binding information resources.
17430         (get_publisher_policy_info): New static function for retrieving 
17431         assembly binding information from a MonoImage.
17432         (compare_versions): New static function for comparing an assembly
17433         binding information data and the version of an assembly name.
17434         (check_policy_versions): New static function for checking if an
17435         assembly binding info mapping an assembly name is valid for it.
17436         (mono_assembly_load_publisher_policy): New static function for
17437         loading the 'policy.major.minor.MyAssembly' image for an assembly
17438         with an assembly name 'aname'.
17439         (mono_assembly_bind_version): New static function for updating
17440         assembly redirection.
17441         (mono_assembly_apply_binding): New static function for applying
17442         assembly binding.
17443         (search_binding_loaded): New static function for searching 
17444         loaded assembly binding infos in the cache domain.
17445         (mono_assembly_load_full): Don't apply assembly binding for
17446         reflection only assemblies.
17447
17448         * metadata-internals.h: Add MonoAssemblyBindingInfo,
17449         which contains information about assembly binding. Also
17450         declare signature for mono_config_parse_publisher_policy ()
17451         function, used to retrieve pub policy info.
17452         
17453         * mono-config.c:
17454         (publisher_policy_start): New static function used to parse publisher 
17455         policy config files.
17456         (publisher_policy_parser): New static MonoParseHandler containing 
17457         the functions used when parsing config files.
17458         (mono_config_parse_publisher_policy): New function for parsing
17459         publisher policy files.
17460         
17461 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
17462
17463         * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
17464
17465         * marshal.c (mono_delegate_free_ftnptr): Ditto.
17466
17467         * object.c (mono_get_addr_from_ftnptr): New helper function.
17468
17469         * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
17470
17471         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17472
17473 2005-08-19  Dick Porter  <dick@ximian.com>
17474
17475         * threads.c, threads.h, appdomain.c, appdomain.h,
17476         profiler-private.h, monitor.c, object.c, object-internals.h,
17477         profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
17478         store the thread ID, so it can hold a 64 bit value if needed.
17479
17480 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
17481
17482         * reflection.c (mono_reflection_create_dynamic_method): Store the
17483         handle class into the method references as well so ldtoken works in
17484         dynamic methods.
17485
17486         * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
17487         types.
17488
17489 2005-08-19  Ankit Jain <jankit@novell.com>
17490
17491         Fix #75847.
17492         * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature 
17493           here rather than using the method signature of a arbitrary function
17494           named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with 
17495           two arguments.
17496           Hack done with Harinath.
17497
17498 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17499
17500         * threadpool.c: disable printing stack traces when we get a exception
17501         in a threadpool thread. I need to do more testing to figure out which
17502         cases actually print this. Fixes bug #75828.
17503
17504 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17505
17506         * icall.c: there might be ignored whitespace after the last '='. This
17507         fixes length computation and bug #75840.
17508
17509 2005-08-18  Zoltan Varga  <vargaz@freemail.hu>
17510
17511         * assembly.c (mono_assembly_load_full): Consider .exe extension as
17512         well. Fixes #75809.
17513
17514         * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
17515         #75784.
17516         
17517         * reflection.c (create_custom_attr_data): Ditto.
17518
17519 2005-08-17  Atsushi Enomoto  <atsushi@ximian.com>
17520
17521         * locales.c, culture-info.h : removed RegionLCIDMap.
17522         * culture-info-tables.h : regenerated.
17523
17524 2005-08-16  Martin Baulig  <martin@ximian.com>
17525
17526         * class.c (mono_type_get_name_recurse): Small fix.
17527
17528 2005-08-16  Atsushi Enomoto  <atsushi@ximian.com>
17529
17530         * locales.c : indentation fixie.
17531
17532 2005-08-15  Atsushi Enomoto  <atsushi@ximian.com>
17533
17534         * object-internals.h,
17535           locales.h,
17536           locales.c,
17537           culture-info.h,
17538           icall.c : added RegionInfo table support.
17539         * culture-info-table.h : regenerated for region support.
17540
17541 2005-08-14  Kamil Skalski  <nazgul@nemerle.org>
17542
17543         * reflection.c (resolve_object): handle all kinds of MonoMethod
17544         including generic ones
17545
17546 2005-08-12  Ankit Jain <jankit@novell.com>
17547
17548         * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
17549           (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY. 
17550
17551 2005-09-12  Lluis Sanchez  <lluis@ximian.com>
17552
17553         * process.c: Don't close a thread handle when it's NULL. This is a
17554         workaround for bug #75733.
17555
17556 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
17557
17558         * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
17559
17560 2005-08-10  Zoltan Varga  <vargaz@freemail.hu>
17561
17562         * icall.c (ves_icall_Type_get_IsGenericType): New icall.
17563
17564 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17565
17566         * threadpool.c: if a work item in the thread pool has a callback that
17567         catches a exception, don't propagate it after invoking the callback.
17568         Fixes bug #75336.
17569
17570 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
17571
17572         * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
17573
17574         * class-internals.h (MonoCachedClassInfo): Add some new fields.
17575
17576         * class.c (mono_class_init): Load field info lazily in the AOT case.    
17577
17578         * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
17579
17580 2005-08-03  Ankit Jain  <jankit@novell.com>
17581
17582         Fix #75683.
17583         * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
17584           PInvoke calling convention is 0.
17585
17586 2005-08-02  Zoltan Varga  <vargaz@freemail.hu>
17587
17588         * socket-io.c (convert_sockopt_level_and_name): Applied patch from 
17589         Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
17590
17591 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
17592
17593         * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
17594         to handle threads not started by the GC (patch by Michael Meeks
17595         <michael.meeks@novell.com>).
17596
17597 2005-07-31  Kamil Skalski  <nazgul@omega.pl>
17598
17599         * reflection.c: Make buffer used in emitting types larger for some
17600         big generic types (patch by Michal Moskal).
17601
17602 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
17603
17604         * mono-debug.c: Fix some (not all) alignment problems.
17605
17606 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17607
17608         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
17609         Invoke mono_image_load_from_data_full passing the refonly
17610         parameter.
17611
17612         * assembly.c
17613         (mono_assembly_open_from_bundle): Add the refonly argument, 
17614         in order to pass it to other methods it calls to.
17615         (do_mono_assembly_open): Add the refonly argument, in order 
17616         to pass it to other methods it calls to.
17617         (mono_assembly_open_full): Invoke do_mono_assembly_open passing
17618         the refonly parameter to it.
17619
17620         * image.c: Add loaded_images_refonly_hash and
17621         loaded_images_refonly_guid_hash to cache the reflection
17622         only loaded images.
17623         (mono_images_init): Initialize the hash tables used for
17624         caching the reflection only images.
17625         (load_modules): Invoke mono_image_open_full passing the refonly
17626         parameter to load the modules the correct way.
17627         (build_guid_table): Add the refonly argument, to re-build the 
17628         correct hash table.
17629         (do_mono_image_open): Added the refonly argument, in order to
17630         define it for the loaded image.
17631         (mono_image_loaded_full): New function, which receives an
17632         additional parameter to look for the image in the refonly or
17633         non-refonly section.
17634         (mono_image_loaded): Updated, using mono_image_loaded_full.
17635         (mono_image_loaded_by_guid_full): The same case that happens
17636         with mono_image_loaded_full.
17637         (mono_image_loaded_by_guid): Likewise.
17638         (register_image): Use the ref_only variable inside MonoImage
17639         to decide in which hash table store the current image.
17640         (mono_image_open_from_data_full): Rename
17641         mono_image_open_from_data to mono_image_open_from_data_full,
17642         adding the refonly argument, to define the ref_only variable 
17643         inside MonoImage.
17644         (mono_image_open_from_data): Return 
17645         mono_image_open_from_data_full.
17646         (mono_image_open_full): Rename mono_image_open to
17647         mono_image_open_full, receiving the new refonly argument,
17648         to pass it to inner methods.
17649         (mono_pe_file_open): Update this function, to open
17650         a MonoImage as a non-refonly image.
17651         (mono_image_close): Use the refonly variable inside
17652         MonoImage to remove the image from the correct caches.
17653
17654         * image.h: Add the signatures of mono_image_open_full,
17655         mono_image_open_from_data_full, mono_image_loaded_full,
17656         mono_image_loaded_by_guid_full.
17657
17658         * metadata-internals.h: Add the ref_only field to 
17659         MonoImage.
17660         
17661 2005-07-29  Carlos Alberto Cortez <calberto.cortez@gmail.com>
17662
17663         * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
17664         Fix the last behavior, which used to load the assemblies and
17665         extract MonoReflectionAssemblyName information, instead of
17666         extract it from the metadata tables. Needed for Reflection
17667         Only assemblies.
17668         
17669 2005-07-29  Martin Baulig  <martin@ximian.com>
17670
17671         * mono-debug-debugger.c
17672         (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
17673         not initialized.
17674
17675         * mono-debug.c
17676         (mono_debug_address_from_il_offset): Check whether we have
17677         debugging support before attempting to take the lock.
17678         (mono_debug_source_location_from_address): Likewise.
17679         (mono_debug_source_location_from_il_offset): Likewise.
17680         (mono_debug_il_offset_from_address): Likewise.
17681         (mono_debug_address_from_il_offset): Likewise.
17682
17683 2005-07-29  Zoltan Varga  <vargaz@freemail.hu>
17684
17685         * class.c (mono_class_from_name_case): Add support for dynamic images.
17686         Fixes #75650.
17687
17688         * object.c (mono_class_compute_gc_descriptor): Add a workaround
17689         for #75479.
17690
17691 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
17692         
17693         * reflection.c (mono_method_get_object): Fix warning.
17694
17695 2005-07-28  Martin Baulig  <martin@ximian.com>
17696
17697         * mono-debug.c
17698         (mono_debug_add_wrapper): Also write the wrapper type.
17699
17700 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
17701
17702         * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
17703         
17704         * class.c (mono_class_init): Avoid reading nested classes if the AOT
17705         data indicates the class has none.
17706
17707 2005-07-26  Ben Maurer  <bmaurer@ximian.com>
17708
17709         * mono-debug.c, debug-mono-symfile.c: Replace the use of the
17710         loader lock with the debugger lock. Prevents deadlocks for beagle.
17711
17712         Beagle can now run on an smp box for a weekend without any
17713         issues. Woohoo!
17714
17715 2005-07-26  Zoltan Varga  <vargaz@freemail.hu>
17716
17717         * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
17718         in a module. Fixes #75629.
17719
17720 2005-07-26  Martin Baulig  <martin@ximian.com>
17721
17722         * mono-debug.c (mono_debug_add_wrapper): New static method.
17723         (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
17724         interncall or a wrapper.
17725
17726         * mono-debug.h (MonoDebugWrapperData): New public typedef.
17727         (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
17728         (MONO_DEBUGGER_VERSION): Bump to 51.
17729
17730         * mono-debug-debugger.c
17731         (mono_debugger_add_type): Removed this empty function.
17732         (mono_debugger_add_method): Likewise.
17733
17734 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
17735
17736         * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable () 
17737         before accessing method->slot.
17738
17739 2005-07-21  Jb Evain  <jbevain@gmail.com>
17740
17741         * reflection.c (method_encode_clauses/class): Handle filters clauses.
17742         Fixes #75010.
17743
17744 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
17745
17746         * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
17747         #75587.
17748
17749 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
17750
17751         * image.h image.c: Add mono_image_get_guid () API function.
17752
17753 2005-07-19  Ben Maurer  <bmaurer@ximian.com>
17754
17755         There were issues when multiple threads tried to load
17756         assemblies. A deadlock was created between assemblies_mutex and
17757         mono_domain_assemblies_lock. This fixes the issue by making the
17758         assembly ref counting be lock free. See bug 75586.
17759         
17760         * image.c (mono_image_close): The add ref function here was using
17761         Interlocked operations while the unref was using a mutex and a
17762         --. I don't think this was ever a bug that would be exposed in a
17763         non-pendantic way (ie, by an embedder doing a ref on one thread
17764         and an unref on another), but for the sake of correctness, this is
17765         now Interlocked.
17766
17767         * assembly.c (mono_assembly_addref): Use InterlockedIncrement
17768         (mono_assembly_load_reference): Call mono_assembly_addref rather
17769         than touching the refcount ourselves.
17770         (mono_assembly_close): Use InterlockedDecrement to unref the
17771         assembly. Don't acquire the lock unless it is actually needed.
17772
17773 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
17774
17775         * class.c (mono_class_layout_fields): Fix calculation of has_references
17776         for generic types.
17777
17778 2005-07-12  Martin Baulig  <martin@ximian.com>
17779
17780         Applying a patch from Michal Moskal <malekith@nemerle.org>.
17781
17782         * metadata.c
17783         (mono_type_hash): Provide better hashing for generic instances.
17784         (mono_generic_inst_hash): Improve hashing.
17785         (mono_generic_class_hash): Likewise.
17786
17787         * reflection.c (mymono_metadata_type_hash): Improve hashing for
17788         generic instances.
17789
17790 2005-07-12  Martin Baulig  <martin@ximian.com>
17791
17792         * reflection.c (mono_reflection_create_runtime_class): Remove the
17793         hack for generic type definitions and non-`Run' assemblies.
17794         (mono_reflection_bind_generic_parameters): Also use
17795         `klass->wastypebuilder' to check for TypeBuilders.
17796
17797 2005-07-12  Zoltan Varga  <vargaz@freemail.hu>
17798
17799         * class.c (mono_class_layout_fields): Fix calculation of has_references
17800         for generic types.
17801
17802         * class.c (inflate_generic_class): Fix a leak.
17803         (mono_class_init): Fix calculation of gchimpl and has_finalize fields
17804         for generic types.
17805
17806 2005-07-11  Martin Baulig  <martin@ximian.com>
17807
17808         * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
17809         on error.
17810
17811 2005-07-11  Martin Baulig  <martin@ximian.com>
17812
17813         * loader.c (find_method): Also lookup in
17814         `mono_defaults.object_class' if we're an interfaces; fixes #75460.
17815
17816 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
17817
17818         * appdomain.c (mono_domain_unload): Don't free the error message
17819         before passing it to mono_get_exception_...
17820
17821         * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
17822         
17823 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
17824
17825         * threads.c: try to better guess an available RT signal (bug #75387).
17826
17827 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
17828
17829         * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
17830         and CACHE_OBJECT.
17831
17832 2005-07-07  Martin Baulig  <martin@ximian.com>
17833
17834         * class.c (mono_type_get_name_full): Return NULL for
17835         MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
17836         fixes #75408.
17837
17838 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
17839
17840         * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
17841         exit the appdomain as well being aborted.
17842
17843         * threadpool.c: Create all threadpool threads inside the root appdomain, and
17844         change back to the root domain after calling managed code. This enables
17845         appdomains using threadpools to be unloaded.
17846
17847 2005-07-07  Martin Baulig  <martin@ximian.com>
17848
17849         * class-internals.h
17850         (MonoInflatedGenericClass): Moved the `MonoType *parent' field
17851         into `MonoDynamicGenericClass' since we only need it for dynamic
17852         types.
17853
17854         * reflection.c (mono_class_bind_generic_parameters): We don't need
17855         to compute the `parent' here.
17856
17857 2005-07-07  Atsushi Enomoto  <atsushi@ximian.com>
17858
17859         * culture-info-table.h : regenerated.
17860
17861 2005-07-06  Martin Baulig  <martin@ximian.com>
17862
17863         * icall.c
17864         (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
17865
17866         * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
17867
17868 2005-07-06  Martin Baulig  <martin@ximian.com>
17869
17870         * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
17871         we're doing a signature-only comparision; fixes #74945.
17872
17873 2005-07-06  Martin Baulig  <martin@ximian.com>
17874
17875         * class-internals.h (MonoGenericClass): Moved some things out into
17876         a new `MonoInflatedGenericClass' type.  
17877         (MonoInflatedGenericClass): New type; the `klass' of a
17878         `MonoGenericClass' is now computed lazyly in
17879         mono_get_inflated_generic_class().      
17880
17881         * class.c (mono_get_inflated_generic_class): New public function.
17882         (mono_class_inflate_generic_method): Removed the unused
17883         `MonoClass *' argument.
17884         (setup_generic_vtable): Don't call mono_get_inflated_method() on
17885         all the methods.
17886         (mono_class_create_generic): Make this static and merge it with
17887         mono_class_create_generic_2(); we're now called automatically from
17888         mono_get_inflated_generic_class().
17889
17890         * loader.c (mono_method_signature): Call
17891         mono_get_inflated_method() here.
17892
17893 2005-07-06  Zoltan Varga  <vargaz@freemail.hu>
17894
17895         * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
17896         type of fields with RVA.
17897
17898         * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
17899         for this pseudo class.
17900         (my_mono_class_from_generic_parameter): Likewise.
17901         (mono_class_init): Allow interfaces to have cctors.
17902
17903 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
17904
17905         * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
17906         lazily for AOT methods.
17907
17908 2005-07-05  Martin Baulig  <martin@ximian.com>
17909
17910         * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
17911         returns FALSE for a successful match, not TRUE.
17912
17913 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
17914
17915         * loader.c (mono_method_get_index): Optimize this a bit.
17916
17917 2005-07-04  Martin Baulig  <martin@ximian.com>
17918
17919         * class.c
17920         (class_compute_field_layout): Move the check for generic type
17921         definitions into mono_class_layout_fields().  Fixes #74684.
17922         (mono_class_from_generic_parameter): Correctly compute
17923         `klass->parent'; fixes #75457.
17924
17925         * reflection.c (register_assembly, register_module): Make sure
17926         `domain->rejobject_hash' is already created.
17927
17928 2005-07-02  Martin Baulig  <martin@ximian.com>
17929
17930         * class-internals.h
17931         (MonoGenericClass): Move `count_ifaces' and `ifaces' into
17932         `MonoDynamicGenericClass'.      
17933
17934 2005-07-01  Lluis Sanchez  <lluis@ximian.com>
17935
17936         * icall.c: In ves_icall_InternalExecute() dont't assert if the value
17937         returned by a field getter is null, since null is a valid value.
17938
17939 2005-07-01  Martin Baulig  <martin@ximian.com>
17940
17941         * reflection.c (mono_reflection_generic_class_initialize): Update
17942         the `dgclass->fields [i].parent' to the correct class.
17943         (mono_image_get_fieldref_token): Use the declaring type, not the
17944         reflected type.
17945
17946 2005-07-01  Martin Baulig  <martin@ximian.com>
17947
17948         * loader.c (find_method): Also look in the interfaces; fixes #75429.
17949
17950 2005-06-30  Ben Maurer  <bmaurer@ximian.com>
17951
17952         * threads.c (thread_cleanup): assert that thread != NULL
17953         (wait_for_tids_or_state_change): We were using the wrong variable
17954         when accessing wait->threads. `i' was always out of the bounds of
17955         the array.
17956
17957 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17958
17959         * loader.c: map user32 and kernel32 to libMonoSupportW
17960
17961 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
17962
17963         * appdomain.c (unload_thread_main): Mark this as WINAPI.
17964
17965 2005-06-28  Martin Baulig  <martin@ximian.com>
17966
17967         * loader.c (method_from_methodspec): Fix #75334.
17968
17969 2005-06-28  Martin Baulig  <martin@ximian.com>
17970
17971         Fix #74953 - Arrays now implement the generic IList<T> interface
17972         on the 2.0 platform.
17973
17974         * class-internals.h (MonoDefaults): Added `generic_array_class'.
17975
17976         * reflection.c (mono_class_bind_generic_parameters): New public
17977         function; similar to mono_reflection_bind_generic_parameters(),
17978         but operates on a `MonoType *' and not on a `MonoReflectionType *'.
17979
17980         * domain.c (mono_init_internal): Try to initialize.
17981         `mono_defaults.generic_array_class' here; this'll only succeed if
17982         we're using the 2.0 corlib.
17983
17984         * icall.c
17985         (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
17986         interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
17987         (mono_lookup_internal_call): Added support for nested classes.
17988
17989         * loader.c
17990         (mono_get_method_from_token): Set `result->signature->pinvoke' if
17991         we're an interncall and have generic arguments.
17992
17993         * class.c
17994         (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
17995         (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
17996         instance of System.Array.InternalArray<T> for arrays, so they
17997         implement the generic IList<T> interface.
17998
17999 2005-06-27  Zoltan Varga  <vargaz@freemail.hu>
18000
18001         * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
18002         (chastamar@yahoo.com). Fixes #75374.    
18003
18004 2005-06-27  Atsushi Enomoto <atsushi@ximian.com>
18005
18006         * culture-info-table.h: regenerated.
18007
18008 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18009
18010         * icall.c: handle spaces correctly for base64 strings.
18011
18012 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
18013
18014         * *.c: Kill some warnings.
18015
18016 2005-06-23  Duncan Mak  <duncan@novell.com>
18017
18018         * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
18019         that this builds on Solaris 10 (x86).
18020
18021 2005-06-23  Martin Baulig  <martin@ximian.com>
18022
18023         * class.c
18024         (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
18025         generic type definitions.
18026
18027 2005-06-23  Martin Baulig  <martin@ximian.com>
18028
18029         Fix #75331.
18030
18031         * metadata.c (mono_class_get_overrides): Renamed to
18032         mono_class_get_overrides_full() and added a `MonoGenericContext *'.
18033         (method_from_method_def_or_ref): Added `MonoGenericContext *' and
18034         pass it to mono_get_method_full().
18035
18036 2005-06-22  Ben Maurer  <bmaurer@ximian.com>
18037
18038         * reflection.c (mono_reflection_create_runtime_class): take the
18039         mono_domain_lock in this method. Prevents deadlocks
18040
18041 2005-06-22  Martin Baulig  <martin@ximian.com>
18042
18043         * loader.c (method_from_methodspec): Fix #75330.
18044
18045 2005-06-22  Martin Baulig  <martin@ximian.com>
18046
18047         * reflection.c (type_get_qualified_name): Use
18048         mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
18049         (_mono_reflection_get_type_from_info): Added `MonoImage *image'
18050         argument; use it if we don't have an assembly name.
18051
18052 2005-06-22  Lluis Sanchez Gual  <lluis@novell.com>
18053
18054         * object.c: In mono_message_init, set "copy out" flag for in
18055         parameters with the [Out] flag.
18056
18057 2005-06-21  Martin Baulig  <martin@ximian.com>
18058
18059         * class.c
18060         (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
18061         and MONO_TYPE_PTR.
18062
18063 2005-06-21  Martin Baulig  <martin@ximian.com>
18064
18065         * class.c (mono_class_init): Don't initialize `class->fields' for
18066         generic instances since they're initialized again in
18067         compute_field_layout(). 
18068         (compute_field_layout): Set the field's `generic_info' here; fix
18069         #75320. 
18070
18071 2005-06-21  Martin Baulig  <martin@ximian.com>
18072
18073         * class-internals.h
18074         (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
18075
18076         * metadata.c (mono_metadata_generic_method_equal): Also
18077         distinguish the `generic_class'; fixes #75334.
18078
18079 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18080
18081         * domain.c:
18082         * appdomain.c:
18083         * domain-internals.h:
18084         * reflection.c: 'domain_assemblies' field is now protected by its own
18085         lock. Don't call into managed code to run the AssemblyLoad event if we
18086         now there are no registered delegates for it.
18087
18088 2005-06-20  Martin Baulig  <martin@ximian.com>
18089
18090         * class.c (mono_class_is_assignable_from): Use a custom version of
18091         mono_class_has_parent() to make things work for generic instances;
18092         fix #75300.
18093
18094 2005-06-20  Martin Baulig  <martin@ximian.com>
18095
18096         * loader.c (method_from_methodspec): Apply a patch from
18097         Kamil Skalski <nazgul@nemerle.org> to fix #75296.
18098
18099 2005-06-20  Martin Baulig  <martin@ximian.com>
18100
18101         * class.c (mono_class_init): Reverted Zoltan's last change; it
18102         breaks generics.
18103
18104 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
18105
18106         * threads.c (wait_for_tids_or_state_change): Add missing locking.
18107
18108 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18109
18110         * socket-io.c: fix the index in the socket array for writable/error
18111         sockets. Fixes bug #75306.
18112
18113 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
18114
18115         * class.c (mono_class_init): Allow interfaces to have static ctors.
18116
18117 2005-06-17  Martin Baulig  <martin@ximian.com>
18118
18119         * loader.c (method_from_methodspec): Use `context->container' when
18120         parsing the `gmethod->inst'.
18121
18122 2005-06-17  Martin Baulig  <martin@ximian.com>
18123
18124         * class.c (mono_type_get_name_recurse): Don't add the assembly
18125         name for type arguments.
18126
18127 2005-06-15  Martin Baulig  <martin@ximian.com>
18128
18129         * reflection.c (mono_image_get_inflated_method_token): Encode
18130         correct klass; fixes #75260.
18131
18132 2005-06-13 Michal Moskal <malekith@nemerle.org>
18133
18134         * icall.c: Make GetCorrespondingMethod/Constructor take
18135         MonoReflectionMethod method not MonoMethod. Removed
18136         MonoType.GetCorrespondingField, and make
18137         MonoGenericType.GetCorrespondingField take name not
18138         MonoClassField.
18139
18140 2005-06-13  Michal Moskal <malekith@nemerle.org>
18141
18142         * reflection.c (field_encode_signature, encode_locals):
18143          Make sizes of buffers for types larger (for big generic types).
18144          (create_generic_typespec,
18145          mono_reflection_sighelper_get_signature_local,
18146          mono_reflection_sighelper_get_signature_field):
18147          Add asserts for too small buffers.
18148
18149 2005-06-15  Martin Baulig  <martin@ximian.com>
18150
18151         * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
18152         if our parent is not a dynamic type.
18153
18154 2005-06-15  Martin Baulig  <martin@ximian.com>
18155
18156         * class-internals.h (MonoTypeNameFormat): New enum.
18157
18158         * class.c
18159         (mono_class_get_name_full): Renamed to mono_type_get_name_full().
18160         (mono_type_get_full_name): Removed.
18161         (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
18162         argument instead of the boolean's.
18163
18164         * icall.c (ves_icall_System_MonoType_getFullName):
18165         Added `gboolean assembly_qualified'.    
18166
18167         * reflection.h
18168         (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
18169
18170         * reflection.c (mono_reflection_parse_type): Parse the new type
18171         name format.
18172
18173 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18174
18175         * icall.c: no need to convert from utf16 to utf8 and then back again
18176         after the call to GetLogicalDrives.
18177
18178 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18179
18180         * icall.c: frombase64. Fix problems exposed by new tests.
18181
18182 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18183
18184         * icall.c: added internal calls for converting char [] and strings in
18185         base64 into byte [].
18186
18187 2005-06-10  Martin Baulig  <martin@ximian.com>
18188
18189         * class.c (mono_class_create_generic_2): Read the nested classes
18190         from the metadata rather than from `gklass->nested_classes' since
18191         `gklass' might not be initialized yet.
18192
18193 2005-06-09  Duncan Mak  <duncan@novell.com>
18194
18195         * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
18196         all public headers. Fixes #74919.
18197
18198 2005-06-09  Lluis Sanchez Gual  <lluis@novell.com>
18199
18200         * domain.c: The key for proxy_vtable_hash is now a pointer
18201         array. Added new GHashFunc and GCompareFunc functions for this.
18202
18203         * class.h: The list of interfaces in MonoRemoteClass is known in
18204         advance and can't grow (we create a new MonoRemoteClass if needed),
18205         so now the interface array can be allocated together with
18206         MonoRemoteClass.
18207         
18208         * object.c: Added a new method create_remote_class_key.
18209         Fixed mono_remote_class so it does not depend on
18210         mono_upgrade_remote_class.
18211         Removed extend_interface_array.
18212         Added new method clone_remote_class(), which makes a copy of a remote
18213         class and adds a new interface or class to it.
18214         mono_upgrade_remote_class() now creates a new remote class (or gets
18215         it from the cache) if an vtable upgrade is needed. In this way
18216         we make sure that other objects sharing the same remote class
18217         don't get the new vtable with unwanted interfaces.
18218         
18219         * object-internals.h:
18220         * object.h: Moved mono_upgrade_remote_class to object-internals.h.
18221         
18222         * marshal.c: Track changes in mono_upgrade_remote_class().
18223
18224 2005-06-08  Kamil Skalski <nazgul@nemerle.org>
18225         * icall.c: Add runtime methods for obtaining members of inflated
18226         class, which were created from supplied non-inflated members. It
18227         is used in internal Get{Method,Constructor,Field} methods in
18228         System.Type
18229
18230 2005-06-09  Martin Baulig  <martin@ximian.com>
18231
18232         * reflection.c
18233         (mono_reflection_bind_generic_method_parameters): Fix #75169.
18234
18235 2005-06-08  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18236         * reflection.c (mono_image_basic_init): Define
18237         Version in MonoDynamicAssembly. 
18238         
18239 2005-06-08  Martin Baulig  <martin@ximian.com>
18240
18241         Fix #75136.
18242
18243         * loader.c
18244         (mono_method_signature_full): New public method; takes a
18245         `MonoGenericContext *'.
18246         (find_method): Use mono_method_signature_full() and pass the
18247         klass'es context to it.
18248
18249         * class.c (mono_class_is_inflated_method): Use
18250         mono_method_signature_full() and pass the context to it.
18251
18252 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
18253
18254         * object.c: add proper locking in mono_remote_class_vtable(),
18255         fixes possible memory corruption.
18256
18257 2005-06-08  Michael Meeks  <michael.meeks@novell.com>
18258
18259         * marshal.c (mono_remoting_marshal_init): set
18260         initialized after initialization.
18261
18262 2005-06-08  Atsushi Enomoto  <atsushi@ximian.com>
18263
18264         * locales.c : hush.
18265
18266 2005-06-06  Michael Meeks  <michael.meeks@novell.com>
18267
18268         * object.c (extend_interface_array): fix really silly
18269         memory corrupting / comparison bug.
18270
18271 2005-06-07  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18272
18273         * reflection.c: Functions added to support the creation
18274         of CustomAttributeData, which includes Attribute data
18275         used by ReflectionOnly methods.
18276
18277         * reflection.h:  mono_reflection_get_custom_attrs_data and
18278          mono_custom_attrs_data_construct added (functions exposed).
18279
18280          * icall.c: Added mono_reflection_get_custom_attrs_data
18281          as icall.
18282         
18283 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
18284
18285         * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
18286         lupus's request.
18287
18288 2005-06-06  Zoltan Varga  <vargaz@freemail.hu>
18289
18290         * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
18291
18292         * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
18293         dynamic DllImportAttribute.
18294
18295         * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of 
18296         dynamic DllImportAttribute.
18297
18298         * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
18299         Fixes #75162.
18300
18301 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18302
18303         * threads.c: avoid segfault when an unstarted thread is aborted.
18304
18305 2005-06-05  Kornél Pál <kornelpal@hotmail.com>
18306
18307         * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
18308         Returns the name and version of the runtime for reporting.
18309
18310 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18311
18312         * appdomain.c: bump corlib version.
18313         * object-internals.h: new field in MonoReflectionAssembly.
18314
18315 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18316
18317         * object-internals.h: Carlos forgot to add this field.
18318
18319 2005-06-03  Carlos Alberto Cortez <calberto.cortez@gmail.com>
18320
18321         * icall.c: Added create_version to create instances
18322         of Version of MonoReflectionAssemblyName. This change helps
18323         the AssemblyName tests to keep running fine.
18324         
18325 2005-06-03  Lluis Sanchez Gual  <lluis@novell.com>
18326   
18327         * object.c (mono_method_return_message_restore): A somehow less
18328         intrusive fix for #75138.
18329
18330 2005-06-03  Raja R Harinath  <rharinath@novell.com>
18331
18332         * object.c (mono_method_return_message_restore): Fix computation
18333         of expected number of out args.
18334
18335 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
18336
18337         * reflection.c (mono_image_get_method_info): Fix the case when the
18338         charset is empty.
18339
18340 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com> 
18341
18342         * object.c: Added missing null check in
18343           mono_method_return_message_restore.
18344
18345 2005-06-02  Zoltan Varga  <vargaz@freemail.hu>
18346
18347         * reflection.c (mono_image_get_method_info): Handle the case when
18348         dllentry is empty.
18349
18350 2005-06-02  Lluis Sanchez Gual  <lluis@novell.com>
18351
18352         * object.c: When creating the vtable for a proxy, take into account
18353         all inherited interfaces, not only the ones registered in
18354         iclass->interfaces. This fixs bug #74996.
18355         Also, in mono_method_return_message_restore, verify that the array
18356         of out args has the expected lengh.
18357
18358 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18359
18360         * socket-io.c: update the timeout in Poll when the call is interrupte.
18361
18362 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18363
18364         * socket-io.c: support abort/suspend in Select_internal after last
18365         change.
18366
18367 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18368
18369         * threadpool.c: remove warning.
18370
18371 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18372
18373         * icall.c:
18374         * socket-io.[ch]: Select_internal uses poll() now when available, thus
18375         removing the 1024 limit from select(). Runtime part of the fix for
18376         bug #71203.
18377
18378 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18379
18380         * socket-io.c: when resolving the addresses for the same
18381         host returned by gethostname(), get the local IPs from the interface
18382         list. Loopback addresses are discarded if the are interfaces up with
18383         non-loopback ones. Fixes bug #63265.
18384
18385 2005-05-27  Vladimir Vukicevic  <vladimir@pobox.com>
18386
18387         * appdomain.c, verify.c, object-internals.h, reflection.c:
18388         bumped corlib number to 36, and added new extra_flags field
18389         to ReflectionMethodBuilder and friends.  Fixes #75060.
18390
18391 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
18392
18393         * gc.c: register a new weak link only if the object is non-null
18394         (fixes bug#75047).
18395
18396 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
18397
18398         * culture-info.h : short time pattern too.
18399
18400 2005-05-26  Atsushi Enomoto  <atsushi@ximian.com>
18401
18402         * culture-info.h : expand long time pattern string length.
18403
18404 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
18405
18406         * culture-info-table.h : update (more French date format; #72788).
18407
18408 2005-05-25  Zoltan Varga  <vargaz@freemail.hu>
18409
18410         * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
18411         the method is static. Fixes #75029.
18412
18413 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
18414
18415         * reflection.c: Update the table_idx field of method builders after
18416         saving the module, since it can change. This is a workaround for
18417         bug #74914. 
18418
18419 2005-05-25  Atsushi Enomoto  <atsushi@ximian.com>
18420
18421         * culture-info-table.h : update (additional French date format).
18422
18423 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
18424
18425         * icall.c (ves_icall_type_Equals): Revert last change.
18426         
18427         * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
18428
18429         * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
18430
18431 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
18432
18433         * class-internals.h: Added executioncontext_class field to 
18434         MonoDefaults structure.
18435         * domain.c: Cache System.Threading.ExecutionContext class in 
18436         mono_defaults.
18437         * object.c: Capture the ExecutionContext for asynchroneous calls in
18438          mono_async_result_new.
18439         * object-internals.h: Added execution_context and original_context 
18440         fields to MonoAsyncResult. Added execution_context to MonoThread.
18441         * security-manager.c|.h: Added mono_get_context_capture_method to 
18442         return the capture method (if required by the security manager or by
18443         the framework version used).
18444         * threadpool.c: Apply capture (if present) ExecutionContext in 
18445         mono_async_invoke and revert to original context after it completes.
18446
18447 2005-05-19  Atsushi Enomoto  <atsushi@ximian.com>
18448
18449         * culture-info-table.h : updated (real hacky solution for zh-CHT).
18450
18451 2005-05-18  Atsushi Enomoto  <atsushi@ximian.com>
18452
18453         * culture-info-table.h : zh-CHT related workaround.
18454
18455 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
18456
18457         * marshal.c (emit_marshal_custom): Add some error checking and call the
18458         methods in the ICustomMarshaler interface. Fixes #74875.
18459         
18460         * marshal.c (emit_marshal_array): Implement [Out] marshalling in
18461         native->managed wrappers.
18462
18463 2005-05-12  Martin Baulig  <martin@ximian.com>
18464
18465         * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
18466         here and use the loader lock.
18467
18468         * mono-debug.c: Properly lock when the debugger is not attached.
18469         (mono_debug_init): Release the initial lock if we're not running
18470         in the debugger.
18471
18472 2005-05-12  Zoltan Varga  <vargaz@freemail.hu>
18473
18474         * marshal.c (emit_marshal_custom): Pass through NULL values without
18475         calling the custom marshalling routines.
18476
18477         * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
18478         conversion in structures. Fixes #74882.
18479
18480 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
18481
18482         * culture-info-table.h : zh-* cultures were missing.
18483
18484 2005-05-12  Lluis Sanchez Gual  <lluis@novell.com>
18485
18486         * threads.c: Added a new event background_change_event which is signaled
18487         when a thread changes its background mode.
18488         Moved here several checks previously done in managed code. The checks
18489         require the thread lock, and using the thread lock in managed code
18490         can result in deadlocks.
18491         Merged Start_internal and Thread_internal into a single method. Now 
18492         Thread_internal does all work of creating and starting a thread.
18493         Added icalls for setting and getting the state of the object. Moved from
18494         managed code to avoid locking there.
18495         Added wait_for_tids_or_state_change() which is called instad of
18496         wait_for_tids when waiting for non-backround threads to end. This method
18497         will return if one of the threads ends or the background_change_event
18498         is signaled.
18499         * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
18500         the background mode. This method signals the background_change_event
18501         event.
18502         * icall.c:
18503         * threads-types.h: Added icalls for ClrState, SetState and GetState, and
18504         removed Start_internal.
18505         
18506 2005-05-11  Martin Baulig  <martin@ximian.com>
18507
18508         * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
18509         to order of some fields to get proper alignment on 64-bit machines.
18510
18511 2005-05-11  Martin Baulig  <martin@ximian.com>
18512
18513         * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
18514         changes as they're broken and completely fuck up the debugger.
18515
18516         * mono-debug.c (mono_debug_add_method): Properly unlock on error.
18517
18518 2005-05-10  Martin Baulig  <martin@ximian.com>
18519
18520         * reflection.c (mono_reflection_generic_class_initialize): Don't
18521         call mono_class_setup_parent() here.
18522
18523 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18524
18525         * metadata/socket-io.c: on windows, getsockopt/setsockopt for
18526         send/receive timeout use an integer in milliseconds. We were using a
18527         struct timeval.
18528
18529 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18530
18531         * locales.c:
18532         (internal_get_cultures): reserve the first slot of the array for the
18533         InvariantCulture, which will be filled in managed code.
18534
18535 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
18536
18537         * reflection.c (mono_image_fill_module_table): Initialize the
18538         GENERATION field as well.
18539
18540 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18541
18542         * monitor.c: ignore calls to Monitor.Exit even if no one ever called
18543         Monitor.Enter on the object.
18544
18545 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
18546
18547         * threads.c: Enable the wait for running threads when exiting.
18548         * icall.c: Suspend all threads before exiting.
18549
18550 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
18551
18552         * assembly.c (mono_assembly_load_reference): Fix warning.
18553
18554 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18555
18556         * threadpool.c: changed the default number of threads per cpu. From now
18557         on, the default will be 20 + (5 * number of cpus) instead of 50.
18558
18559 2005-05-04  Zoltan Varga  <vargaz@freemail.hu>
18560
18561         * loader.c (mono_method_get_signature_full): Add locking here.
18562
18563 2005-05-03  Lluis Sanchez Gual <lluis@novell.com>
18564
18565         * appdomain.c: Moved methods for parsing and freeing assembly
18566         names to assembly.c.
18567         * assembly.c, domain-internals.h: Created public methods for parsing
18568         assembly names. Fixed mono_assembly_load_with_partial_name:
18569         it now finds the best match, taking into account the version,
18570         token and culture specified in the partial name. Also return
18571         the latest version if no version information is specified.
18572
18573 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
18574
18575         * threadpool.c: replace check for SocketAsyncCall class.
18576
18577 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18578
18579         * threadpool-internals.h:
18580         * Makefile.am: added threadpool-internals.h
18581
18582         * threadpool.c: call mono_unhandled_exception on exceptions not handled
18583         that happen in threadpool threads (tested on MS).
18584         (mono_thread_pool_remove_socket): new function that dispatch any pending
18585         AIO call on a socket that is closing. By now only epoll really needs it,
18586         as select/poll wake up when the socket closes.
18587
18588
18589         * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
18590
18591 2005-05-01  Zoltan Varga  <vargaz@freemail.hu>
18592
18593         * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
18594
18595 2005-05-01  Lluis Sanchez Gual  <lluis@novell.com>
18596
18597         * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
18598
18599 2005-04-30  Lluis Sanchez Gual  <lluis@novell.com>
18600
18601         * threads.c: In mono_thread_suspend_all_other_threads, if a thread
18602         has an abort request, convert it into a suspend request.
18603
18604 2005-04-30  Ben Maurer  <bmaurer@ximian.com>
18605
18606         * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
18607         warning for the usage of `UnmanagedFunctionPointerAttribute' which
18608         is not supported yet.
18609
18610 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18611
18612         * image.c: register assemblies loaded from data (bundles) in the loaded
18613         assemblies hash. Fixes bug #74772.
18614
18615 2005-04-29  Martin Baulig  <martin@ximian.com>
18616
18617         * class.c (mono_type_get_name_recurse): Update to the new naming
18618         schema from the latest .NET 2.x beta2.
18619         (mono_class_setup_vtable_general): If we're a generic instance,
18620         copy the vtable from our generic type definition and inflate all
18621         the methods in it.
18622
18623         * loader.c (find_method): Update to the new naming schema from the
18624         latest .NET 2.x beta2.
18625
18626 2005-04-29  Raja R Harinath  <harinath@gmail.com>
18627
18628         * class.c (mono_class_init): Add a mono_loader_unlock to the
18629         #74734 fix.
18630
18631 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
18632
18633         * icall.c (ves_icall_System_Environment_Exit): Remove the 
18634         suspend_all_other_threads () call for the time being, since it can hang.
18635
18636         * threads.c (mono_thread_manage): Similarly, disable the waiting for
18637         the background threads to exit, since it can also hang.
18638
18639         * class.c (mono_class_init): Applied patch from Ankit Jain 
18640         (radical@gmail.com). Avoid pending init errors when a field refers
18641         to a nested class using a typeref. Fixes #74734.
18642
18643         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
18644         this for dynamic modules.
18645
18646 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18647
18648         * threads.c: don't wait for threads that are in the process of aborting
18649         or aborted. Set the 'shutting_down' flag before cleaning the threadpool
18650         and waiting for background threads to finish. This makes xsp and
18651         mod-mono-server exit without random length delays and/or hangs.
18652
18653 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18654
18655         * icall.c: remove duplicate assignment from GetReferencedAssemblies.
18656
18657 2005-04-25  Zoltan Varga  <vargaz@freemail.hu>
18658
18659         * class.c (mono_class_is_assignable_from): Call is_assignable_to for
18660         dynamic types to prevent infinite loops. Fixes #74727.
18661
18662         * reflection.c (mono_reflection_call_is_assignable_from): Rename to
18663         ..._is_assignable_to.
18664
18665 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
18666
18667         * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
18668
18669 2005-04-25  Martin Baulig  <martin@ximian.com>
18670
18671         Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
18672
18673         * domain.c
18674         (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
18675
18676         * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
18677
18678         * reflection.c (build_compressed_metadata): Set metadata header
18679         version to 2.0.
18680
18681 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
18682
18683         * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
18684         number into an integral and a decimal part. Fixes #70473.
18685
18686         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
18687
18688 2005-04-23  Atsushi Enomoto  <atsushi@ximian.com>
18689
18690         * culture-info-table.h : reflected the latest locale-builder output.
18691
18692 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18693
18694         * threadpool.c: check for SuspendRequested too when deciding if
18695         mono_thread_interruption_checkpoint should be called.
18696
18697 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18698
18699         * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
18700         * threads.c: remove interruption_mutex and use Interlocked instead. When
18701         suspending all the threads, wait for all the suspended events at once.
18702         If we're shutting down and get an APC that is going to be queued,
18703         call mono_thread_execute_interruption immediately, as the thread might
18704         be sleeping on a pthread condition or mutex.
18705
18706         * icall.c: call mono_runtime_set_shutting_down before suspending the
18707         threads.
18708
18709         Fixes bug #74693. And now xsp is happier when exiting.
18710
18711 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
18712
18713         * loader.c (mono_stack_walk): Fix #74690.
18714
18715 2005-04-22  Martin Baulig  <martin@ximian.com>
18716
18717         * mono-debug.h (MonoDebugMethodJitInfo): Added
18718         `MonoDebugMethodJitInfo *jit'.
18719
18720         * mono-debug.c (mono_debug_read_method): Cache the
18721         MonoDebugMethodJitInfo in `address->jit'.
18722         (mono_debug_free_method_jit_info): New public method.
18723
18724 2005-04-22  Martin Baulig  <martin@ximian.com>
18725
18726         * class.c (mono_class_is_assignable_from): Disallow
18727         type parameter -> interface.
18728
18729 2005-04-21  Dick Porter  <dick@ximian.com>
18730
18731         * threads.c (mono_thread_create): Turn an assertion into an error.
18732
18733 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
18734
18735         * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
18736         
18737         * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c: 
18738         Fix some gcc 4.0 warnings.
18739
18740 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
18741
18742         * file-io.c: fix alt dir separator char on unix systems
18743         and cleanup (fixes bug #71214).
18744
18745 2005-04-19  Lluis Sanchez Gual  <lluis@novell.com>
18746
18747         * marshal.c: Use CALLVIRT instead of CALL when dispatching
18748         a call to a remote domain, since the method may be an
18749         interface method in the client domain. This fixes bug #74192.
18750
18751 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18752
18753         * threadpool.c: recv/send are now performed before going back to managed
18754         code to save one transition.
18755
18756 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18757
18758         * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
18759
18760         * metadata/threadpool.c: removed hack to workaround the bug above.
18761
18762         Fixes bug #74618.
18763
18764 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
18765
18766         * reflection.c reflection.h: Fix handling of parameter defaults in
18767         dynamic methods. Also fixes handling of parameter attributes.
18768         Fixes #74609.
18769
18770         * mono-debug.c (mono_debug_close_image): Fix warning.
18771
18772 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18773
18774         * socket-io.h: replaced old unused field with new 'blocking'.
18775         * threadpool.c: restore socket blocking state on windows(tm).
18776
18777 2005-04-14  Sebastien Pouliot  <sebastien@ximian.com>
18778
18779         * icall.c: don't return the codebase in the AssemblyName[] returned by
18780         ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
18781         * object-internals.h: Removed FIXME (fields were presents) and fixed
18782         versioncompat declaration.
18783
18784 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18785
18786         * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
18787         not closed, so don't cleanup when it happens.
18788
18789 2005-04-13  Chris Toshok  <toshok@ximian.com>
18790
18791         * mono-debug-debugger.h: change prototype for
18792         mono_debugger_lookup_type.
18793
18794         * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
18795         this function, although it should probably be named
18796         mono_debugger_init_type.
18797
18798 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18799
18800         * threadpool.c: fix non-AIO case.
18801
18802 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
18803
18804         * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
18805         the built-in profiler to measure just JIT compilation times.
18806
18807 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18808
18809         * threadpool.c: the epollfd might be closed by another thread at
18810         any time, so ignore EBADF at treat it as a "we're closing" sign.
18811
18812 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18813
18814         * threadpool.c: release the semaphores with a count equals to the number
18815         of working threads in both IO and regular pools. Fixed typo that messed
18816         up the count of IO pool threads. Don't initialize the pipe handles if
18817         we're using epoll.
18818
18819 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18820
18821         * threadpool.c: some systems don't like a NULL when deleting the socket
18822         from epoll.
18823
18824 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18825
18826         * threadpool.c: fix semaphore allocation.
18827
18828 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18829
18830         * threadpool.c: added epoll() based implementation for asynchronous IO
18831         that is used instead of the default poll() when available.
18832         It can be disabled by setting MONO_DISABLE_AIO.
18833
18834 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18835
18836         * threadpool.c: windows needs 'closesocket' and instead of returning
18837         0 when the stream is closed while in select, it returns -1. Fixes bug
18838         #74573.
18839
18840 2005-04-12  Zoltan Varga  <vargaz@freemail.hu>
18841
18842         * class.c (class_compute_field_layout): Fix the regression caused by
18843         the previous try.
18844
18845 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18846
18847         * threadpool.c: separate pool for socket async. IO.
18848         * threadpool.h: mono_max_worker_threads is not a global any more.
18849
18850 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
18851
18852         * class.c (class_compute_field_layout): Fix #74549.
18853
18854 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18855
18856         * threadpool.c: select() on windows doesn't allow pipe handles, soooo
18857         use 2 connected sockets instead.
18858
18859 2005-04-08  Miguel de Icaza  <miguel@novell.com>
18860
18861         * mono-config.c: Add new entry point for mkbundle
18862         mono_config_parse_memory. 
18863
18864 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18865
18866         * threadpool.c: removed another unused function.
18867
18868 2005-04-08  Ankit Jain  <radical@corewars.org>
18869
18870         * reflection.c (get_default_param_value_blobs): Add 'types'
18871         parameter to get the types encoded in the constant table.
18872         (mono_param_get_objects): Use the type from the constant table,
18873         not the type of the parameter, when creating default values.
18874         Handle null default values correctly.
18875
18876 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18877
18878         * file-io.c:
18879         * file-io.h:
18880         * threadpool.c:
18881         * threadpool.h:
18882         * icall.c:
18883         * socket-io.c: removed dead code for async IO.
18884
18885 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18886
18887         * socket-io.h: 2 more fields in MonoSocketAsyncResult.
18888
18889         * threadpool.c: intercept socket async. calls and pass them to a thread
18890         that is polling and dispatching the job items to the threadpool as
18891         socket become ready. Fixes bugs #71217, #71933.
18892
18893         * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
18894         between char and short/ushort arrays.
18895
18896         * socket-io.c: remove dead code.
18897
18898 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
18899
18900         * locales.c,
18901           icall.c : removed InternalToUpper_Comp() and
18902           InternalToLower_Comp().
18903
18904 2005-04-06  Atsushi Enomoto  <atsushi@ximian.com>
18905
18906         * char-conversions.h : The tables were incorrectly generated. Should
18907           be generated against invariant culture.
18908
18909 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
18910
18911         * object.c (mono_runtime_invoke_array): Fix return value when 
18912         passing pre-created valuetype objects to ctors.
18913
18914         * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer 
18915         (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
18916         Fixes #74338.
18917
18918 2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
18919
18920         * domain.c: removed g_assert for runtimesecurityframe_class. This is 
18921         only used with --security and hides the wrong corlib version error.
18922
18923 2005-03-30  Joshua Tauberer  <tauberer@for.net>
18924
18925         * class.c: Changed mono_class_name_from_token so that types
18926         outside of a namespace don't have an initial period.  Improved
18927         the g_warning message used in _mono_class_get when loading
18928         fails.
18929         * assembly.c: In mono_assembly_load_reference, when an assembly
18930         can't be found, "No such file or directory" is misleading and
18931         unhelpful because a few paths were checked for the presence of
18932         the assembly.  When that happens (ENOENT), display a nicer
18933         message indicating the directories that were searched.  In all
18934         cases, the warning is made easier to read for non-hackers.
18935
18936 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
18937
18938         * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
18939         project/solution.
18940         * appdomain.h|domain.c: Removed inline from functions.
18941         * appdomain.c: Reduced warnings when compiling on windows.
18942         * icall.c: Fixed output_debug declaration to gunichar2*.
18943         * mono-config.c: Reduced warnings when compiling on windows.
18944         * rand.c: Added missing "windows.h". Added missing return value.
18945         * rawbuffer.c: Added missing winsock2.h for windows.
18946         * sysmath.h: Added mono-compiler.h header to allow/ease 
18947         compilation with non-GCC compilers.
18948         * threads.c: Fixed declarations to compile with VS.NET C compiler.
18949         Removed cast warnings.
18950
18951         Adapted from the work of J Lothian (for VC6).
18952
18953 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
18954
18955         * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
18956         from default_path.
18957
18958 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
18959
18960         * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
18961         the 2.0 profile.
18962
18963 2005-03-27  Raja R Harinath  <harinath@gmail.com>
18964
18965         * Makefile.am (assembliesdir): Fix.  If it is arch-dependent it
18966         has to be in $(exec_prefix).  $(prefix) is for arch-independent
18967         stuff, and it would probably use $(prefix)/share rather than
18968         $(prefix)/lib.
18969
18970 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18971
18972         * console-io.c: added 2 includes that might be missing.
18973
18974 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
18975
18976         * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
18977         profile.
18978
18979         * reflection.c (create_custom_attr): Allocate the params array using
18980         alloca so it gets GC tracking.
18981
18982 2005-03-23  Chris Toshok  <toshok@ximian.com>
18983
18984         * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
18985         out some spew.
18986
18987 2005-03-24  Raja R Harinath  <rharinath@novell.com>
18988
18989         * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
18990         changes to pick up any changes in prefix, etc.
18991
18992 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
18993
18994         * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
18995         
18996         * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
18997         * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
18998
18999 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19000
19001         * class-internals.h object-internals.h class.c reflection.c: Extend the
19002         mono_lookup_dynamic_token () function to return the class of the
19003         token as well. 
19004
19005         * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
19006         well. Fixes #73848.
19007
19008 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
19009
19010         * security-manager.c: Skip inheritance checks for intra-corlib
19011         class inheritance and method overrides. This skips a lot of checks
19012         and (anyway) permissions cannot work until corlib is loaded.
19013
19014 2005-03-23  Martin Baulig  <martin@ximian.com>
19015
19016         * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
19017         MONO_TYPE_GENERICINST.  
19018
19019 2005-03-23  Martin Baulig  <martin@ximian.com>
19020
19021         * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
19022
19023 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19024
19025         * class.c: added locking comments to some functions.
19026         Cache the interface offsets arrays (saves about 20 KB
19027         of runtime memory in a typical app).
19028         Reduce the time overhead in mono_class_setup_supertypes ().
19029
19030 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
19031
19032         * icall.c: speedup and fix leaks in GetMethodsByName and
19033         GetPropertiesByName.
19034
19035 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19036
19037         * reflection.c: some locking fixes.
19038
19039 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19040
19041         * metadata.c: added missing break in case statement.
19042
19043 2005-03-22  Zoltan Varga  <vargaz@freemail.hu>
19044
19045         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19046         typedbyref return values. Fixes #73941.
19047
19048 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
19049
19050         * security-manager.c|h: Added demandunmanaged method and 
19051         suppressunmanagedcodesecurity class to MonoSecurityManager.
19052         Renamed aptc class to allowpartiallytrustedcallers.
19053
19054 2005-03-17  Martin Baulig  <martin@ximian.com>
19055
19056         * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
19057
19058 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19059
19060         * file-io.c: disabled file async. IO using aio_*. It uses the
19061         threadpool now. Workaround for bug #73718.
19062
19063 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19064
19065         * assembly.h, mono-config.c: added code to deal with bundled configs
19066         for bundled assemblies.
19067
19068 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
19069
19070         * *.c, private.h: cleanup, removing old private.h header file.
19071
19072 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19073
19074         * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
19075         and throw_on_unmappable_char attributes.
19076
19077 2005-03-13  Sebastien Pouliot  <sebastien@ximian.com>
19078
19079         * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
19080         _ProcessName_internal.
19081
19082 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
19083
19084         * object.c (mono_array_new_full): Fix aligning of array size. Fixes
19085         #73631.
19086
19087         * icall.c threads.c threads-types.h: Remove slothash icalls as they
19088         are no longer used.
19089
19090 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
19091
19092         * object.c (compute_class_bitmap): Add support for generics. Fixes
19093         #73527.
19094
19095 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
19096
19097         * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
19098
19099 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19100
19101         * filewatcher.c: commented out the code for windows watcher, as we don't
19102         use it (we use the managed implementation instead).
19103
19104 2005-03-10  Zoltan Varga  <vargaz@freemail.hu>
19105
19106         * object-internals.h (MonoThread): Remove 'unused1' field.
19107
19108         * appdomain.c: Bump corlib version.
19109
19110         * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
19111
19112         * reflection.c (mono_reflection_create_runtime_class): Remove the
19113         AssemblyBuilder.Save optimization since it causes too many problems.
19114
19115 2005-03-10  Sebastien Pouliot  <sebastien@ximian.com>
19116
19117         * exception.c|h: Added mono_get_exception_reflection_type_load to
19118         create a ReflectionTypeLoadException object.
19119         * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
19120         to return NULL is a InheritanceDemand fails during reflection. Updated
19121         ves_icall_System_Reflection_Assembly_GetTypes to throw a 
19122         ReflectionTypeLoadException if an InheritanceDemand fails during 
19123         reflection. Added icall mapping for GetLinkDemandSecurity.
19124         * security-manager.c|h: Added ves_icall_System_Security_
19125         SecurityManager_GetLinkDemandSecurity internal call to return the
19126         class and methods permissions set for a LinkDemand. Removed unused
19127         fields in MonoSecurityManager.
19128
19129 2005-03-10  Martin Baulig  <martin@ximian.com>
19130
19131         * class.c (mono_bounded_array_class_get): Initialize `eclass' if
19132         it's a generic instance.
19133
19134 2005-03-09  Zoltan Varga  <vargaz@freemail.hu>
19135
19136         * reflection.c (mono_get_object_from_blob): Applied patch from
19137         Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
19138
19139         * class.c (mono_class_is_assignable_from): Another try at fixing 
19140         #73469 without breaking anything.
19141
19142 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
19143
19144         * class.c: (mono_class_is_assignable_from): Revert the last changes
19145         since they don't work with generics.
19146         
19147         * class.c (mono_class_is_assignable_from): Fix build bustage.
19148
19149         * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
19150         the managed IsAssignableFrom method. Fixes #73469.
19151
19152         * reflection.c (mono_reflection_call_is_assignable_from): New helper
19153         function.
19154
19155 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
19156
19157         * object.c (mono_load_remote_field_new): Fix returning uninitialized
19158         memory when the remoting callback does not sets the out arguments.
19159         Fixes #73007.
19160
19161         * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
19162         by mistake.
19163
19164         * string-icalls.c: Return String.Empty where needed. Fixes #73310.
19165
19166         * object-internals.h (MonoStackFrame): Sync with managed object layout.
19167
19168         * appdomain.c: Bump corlib version.
19169
19170 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
19171
19172         * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
19173         function.
19174
19175         * threads.c (mono_thread_attach): Detect threads which are not started
19176         by the GC pthread wrappers.
19177
19178 2005-03-03  Sebastien Pouliot  <sebastien@ximian.com>
19179
19180         * icall.c: Added new icall for RNG.
19181         * rand.c|h: Added new icall to open the RNG. This allows to share a 
19182         single handle on Linux to access /dev/urandom and fix #73183.
19183
19184 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19185
19186         * object.c: setting the new vtable in a transparent proxy object must
19187         not change the GC descriptor.
19188
19189 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19190
19191         * object.c: fixed compilation without GCJ support.
19192         * reflection.c: for runtime-created types ensure klass->has_references
19193         is correct (bug #73215).
19194
19195 2005-03-02  Martin Baulig  <martin@ximian.com>
19196
19197         * class.c (mono_class_is_assignable_from): Make this work if
19198         `oklass' is a generic instance; fixes #72831.
19199
19200 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
19201
19202         * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
19203         with hasthis set.
19204         
19205         * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
19206
19207         * marshal.c: Reorganize native->managed marshalling code to also use
19208         the emit_marshal_... functions.
19209
19210 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19211
19212         * object.c: typed allocs have issues with bitmap sizes > 30,
19213         so check for max_set >= 30.
19214
19215 2005-03-01  Zoltan Varga  <vargaz@freemail.hu>
19216
19217         * marshal.c (emit_marshal_array): Implement marshalling of arrays to
19218         managed code. Fixes #73012.
19219
19220         * metadata.h (MonoMarshalSpec): Add elem_mult field.
19221
19222         * metadata.c reflection.c: Load/Emit elem_mult as well.
19223         
19224         * metadata.h (MonoMarshalSpec): Add comment.
19225
19226         * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
19227
19228         * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
19229         num_elem to -1 if not given.
19230
19231         * object-internals.h (MonoReflectionMarshal): Add has_size field.
19232
19233         * reflection.c (encode_marshal_blob): Differentiate between 0 and not
19234         given values.
19235
19236 2005-03-01  Marek Safar  <marek.safar@seznam.cz>
19237
19238         * null-gc.c (mono_gc_free_fixed): Was not compilable.
19239
19240 2005-02-28  Zoltan Varga  <vargaz@freemail.hu>
19241
19242         * reflection.c (encode_marshal_blob): Encode param_num field as well.
19243
19244         * object-internals.h (MonoReflectionMarshal): Add param_num field.
19245
19246 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
19247
19248         * object.c: generalized the reference bitmap creation
19249         and added hooks for the new GC.
19250         * class-internals.c: removed the gc_bitmap field from MonoClass.
19251
19252 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19253
19254         * domain.c: help the compiler to produce better code
19255         in mono_jit_info_table_find ().
19256
19257 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19258
19259         * object.c: make all allocations look typed.
19260
19261 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19262
19263         * socket-io.c: load Mono.Posix if it's not loaded already
19264         (fixes bug#73033).
19265
19266 2005-02-24  Martin Baulig  <martin@ximian.com>
19267
19268         * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
19269         * reflection.c (dup_type): Likewise.
19270
19271 2005-02-24  Zoltan Varga  <vargaz@freemail.hu>
19272
19273         * gc.c (run_finalize): Set the domain for finalizing delegates as well.
19274         Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
19275
19276 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19277
19278         * domain.c, threads.c, object-internals.h: make the critical thread
19279         local vars use the fast access mode (even when we're compiled in
19280         a lib). Provide accessors to be used by the jit during codegen.
19281
19282 2005-02-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
19283
19284         * appdomain.c: Changed hook functios behavior to include
19285         support for the reflection only assemblies. Some icalls were changed
19286         to support the mentioned assemblies too. Signatures of static methods
19287         try_assembly_resolve and real_load now have an additional parameter:
19288         refonly.
19289
19290         * assembly.c: General changes to mono_assembly_ methods to support
19291         reflection only api. Functions mono_assembly_open, mono_assembly_load,
19292         mono_assembly_load_from and mono_assembly_loaded have got a '_full'
19293         suffix, to support an additional gbool parameter to specify whether
19294         the assembli is reflection only or not. Created some new hook functions 
19295         to add support for reflection only assemblies. Signatures of static 
19296         methods load_in_path, search_loaded, and mono_assembly_load_from_gac 
19297         have now an additional parameter: refonly.
19298
19299         * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
19300         indicating whether the assembly is reflection only or not.
19301
19302         * exception.c: Add mono_get_exception_invalid_operation.
19303
19304         * icall.c: Throw an InvalidOperationException when trying to invoke
19305         a property/method/event, or trying to set/get the value of a field.
19306         Also add an icall to retrieve the ref_only flag to the
19307         MonoReflectionAssembly.
19308
19309 2005-02-23  Chris Toshok  <toshok@ximian.com>
19310
19311         Part of fix for #72827.
19312         * mono-debug.c (mono_debug_add_method): add lexical block data to
19313         the info we write.  Kind of a hack at the moment - we copy the
19314         lexical block info from the MonoDebugMethodInfo to the
19315         MonoDebugMethodJitInfo here, before writing it.
19316         (mono_debug_read_method): read the lexical block info.
19317
19318         * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
19319
19320         * debug-mono-symfile.h: add lexical block support.
19321
19322         * debug-mono-symfile.c (mono_debug_find_method): add lexical block
19323         support.
19324
19325 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
19326
19327         * loader.c (mono_lookup_pinvoke_call): Fix warning.
19328
19329         * object.c (mono_runtime_free_method): Call mono_free_method () and
19330         put the TODOs there.
19331
19332         * loader.c (mono_free_method): Free up most memory allocated for 
19333         dynamic methods.
19334
19335 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
19336
19337         * reflection.c: properly flag a Type argument to a
19338         named custom attr value (bug #72248).
19339
19340 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
19341
19342         * reflection.c: reduce code duplication in named custom
19343         attribute encoding.
19344
19345 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
19346
19347         * reflection.c: properly encode custom attrs of type object
19348         (bug #72649).
19349
19350 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
19351
19352         * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
19353
19354 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
19355
19356         * socket-io.c: load System.dll if it's not loaded already
19357         (bug #72850 and #70477).
19358
19359 2005-02-21  Martin Baulig  <martin@ximian.com>
19360
19361         * marshal.c (mono_marshal_get_runtime_invoke): Add support for
19362         generic instances.
19363
19364 2005-02-21  Martin Baulig  <martin@ximian.com>
19365
19366         * reflection.c (mono_image_build_metadata): We also need to
19367         "fixup" the MethodImpl table after we computed the final method
19368         indices.  Call fixup_methodimpl() to do that.
19369         (fixup_methodimpl): New private method.
19370
19371 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
19372
19373         * assembly.c: special case mscorlib.dll (bug#72536),
19374         patch from Carlos Alberto Cortez.
19375
19376 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
19377
19378         * threads-types.h threads.c: Fix build bustage.
19379
19380         * threads.c: Use a union for long<->double conversions.
19381
19382         * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
19383         functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
19384
19385         * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock 
19386         containing the checkpoint call with NOT_TAKEN.
19387         
19388         * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt 
19389         checkpoint before pushing the arguments, so they won't have to be
19390         spilled to stack.
19391
19392 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19393
19394         * domain.c, assembly.c, domain-internals.h: make some data
19395         const and relocation-free.
19396
19397 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
19398
19399         * object.c, appdomain.c, class-internals.h: introduce the
19400         MonoClassRuntimeInfo structure to hold the info needed to
19401         use a class at runtime. Made mono_class_vtable() lock-free
19402         for all the appdomains.
19403
19404 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
19405
19406         * metadata-internals.h, image.c: introduce a per-image mempool to
19407         be used for memory that has the same lifetime as the image.
19408
19409 2005-02-18  Lluis Sanchez Gual  <lluis@novell.com>
19410
19411         * domain.c: In mono_init_internal(), instead of selecting the first
19412         runtime version supported by an executable, get a list of all
19413         supported versions and select the one for which an mscorlib exists
19414         (since even if the runtime supports a given version, it doesn't mean
19415         that the framework for that version is installed).
19416         Modified get_runtimes_from_exe to support this behavior.
19417         In supported_runtimes, added information about additional system
19418         assembly versions.
19419         
19420         * assembly.c: Added support for more than one system assembly version
19421         per runtime version. Updated the assembly list.
19422         In mono_assembly_remap_version, removed the initial version check,
19423         since we don't know to which version we need to compare until we
19424         get the version set on which the assembly is based.
19425         Moved the code for loading corlib into the new method
19426         mono_assembly_load_corlib(), so it can be used by the initialization
19427         code.
19428         
19429         * domain-internals.h: Updated data structures and added declaration
19430         for mono_assembly_load_corlib.
19431
19432 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
19433
19434         * reflection.c (resolve_object): Fix the creation of the signature in 
19435         the SignatureHelper case.
19436
19437         * assembly.c (mono_assembly_remap_version): Fix binary search.
19438         
19439 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com>
19440  
19441         * class.c: Added inheritance check when a method is overloaded (from a
19442         virtual method or when implementing an interface) and when a class is
19443         inherited. Added functions to set a failure for a class and to 
19444         retreive the exception from a failure.
19445         * class-internals.h: Added fields to MonoClass to keep the exception
19446         information status for inheritance (or other exceptions) to be thrown
19447         later (i.e. not at load time).
19448         * object.c: Throw the inheritance SecurityException when a type is to 
19449         be created with either class or method inheritance violations.
19450         * reflection.c|h: Fix when getting declsec from a class. Removed 
19451         unrequired code for class. Improved sanity in parameter naming.
19452         * security-manager.c|h: Added functions to check for class and method
19453         inheritance.
19454
19455 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
19456
19457         * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
19458         and has_finalize in dynamic types as well.
19459
19460 2005-02-17  Atsushi Enomoto  <atsushi@ximian.com>
19461
19462         * culture-info-table.h : fixed currency format for en-GB (and so on).
19463
19464 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
19465
19466         * gc.c: ensure the GC handles never have 0 as a value.
19467
19468 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
19469
19470         * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
19471         a pointer to a struct to unmanaged code. Fixes #72625.
19472
19473 2005-02-16  Martin Baulig  <martin@ximian.com>
19474
19475         * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
19476
19477 2005-02-16  Zoltan Varga  <vargaz@freemail.hu>
19478
19479         * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
19480
19481 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
19482
19483         * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
19484
19485         * marshal.c (mono_ftnptr_to_delegate): If the delegate has the 
19486         UnmanagedFunctionPointerAttribute, use it for determining calling convention
19487         etc. Fixes #71471.
19488
19489         * reflection.c (mono_custom_attrs_get_attr): New helper function.
19490
19491         * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
19492
19493 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
19494
19495         * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
19496         changes to make the current context a field in MonoThread.
19497
19498 2005-02-15  Zoltan Varga  <vargaz@freemail.hu>
19499
19500         * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
19501         the last change.
19502         
19503         * marshal.c (mono_marshal_emit_native_wrapper): New helper function
19504         extracted from mono_marshal_get_native_wrapper.
19505
19506         * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
19507         to create wrappers around native functions.
19508
19509         * marshal.c (mono_ftnptr_to_delegate): Add support for creating 
19510         delegates for arbitrary function pointers. Fixes #71472.
19511
19512 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
19513
19514         * threads.c: cleaned up the code a little.
19515
19516 2005-02-15  Martin Baulig  <martin@ximian.com>
19517
19518         * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
19519         the data table.
19520
19521         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
19522         allocate larger chunks if needed.
19523
19524 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
19525
19526         * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
19527         in by mistake.
19528
19529 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
19530
19531         * domain.c: keep the domains in an array and ensure the domain ids
19532         are kept small, so they can be used as indexes to domain-specific data
19533         with a small memory overhead.
19534
19535 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
19536
19537         * icall.c: Handle byref types in Type icalls. Fixes #72544.
19538
19539 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
19540
19541         * Makefile.am: remove libmetadata: we build just libmonoruntime now.
19542
19543 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
19544
19545         * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
19546
19547         * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
19548         values.
19549
19550         * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
19551         
19552 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
19553
19554         * domain-internals.h: add the hashtable here.
19555
19556         * class-internals.h: Remove `info' from MonoMethod
19557
19558         * domain.c: Add a new hashtable, jit_trampoline_hash
19559
19560 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
19561
19562         * object.c: don't set the value of static fields
19563         (fixes bug#72494).
19564
19565 2005-02-11  Martin Baulig  <martin@ximian.com>
19566
19567         * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
19568         (mono_debug_add_method): Silently ignore the method if it's too big.
19569         (mono_debug_add_type): Likewise.
19570
19571 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
19572
19573         * threads.c, appdomain.c: remove #ifdefs from the code.
19574
19575 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
19576
19577         * metadata-internals.h: Added flags to MonoAssembly to cache the most
19578         common security informations. This allows us to stay in unmanaged code
19579         when doing LinkDemand and it's special cases (except for the first 
19580         time for initialization). The flags a very much used with --security.
19581         * reflection.c|h: Added code to get declarative security attributes 
19582         for LinkDemand and InheritanceDemand. This required to refactor the
19583         existing code for Demand.
19584         * security-manager.c|h: Added new method fields for the special cases
19585         of LinkDemand.
19586
19587 2005-02-10  Martin Baulig  <martin@ximian.com>
19588
19589         * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
19590         (ves_icall_MonoDebugger_GetTypeToken): New interncall.
19591
19592 2005-02-10  Martin Baulig  <martin@ximian.com>
19593
19594         * mono-debug.c, mono-debug-debugger.c: Completely reworked the
19595         debugging code; this is almost a complete rewrite.
19596
19597         * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
19598
19599 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19600
19601         * domain.c, object.h: expose mono_string_equal () and 
19602         mono_string_hash ().
19603         * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
19604         it's implemented in managed code.
19605
19606 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19607
19608         * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
19609         lo leak objects between appdomains.
19610
19611 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19612
19613         * assembly.c: old compilers compilation fix from 
19614         robertj@gmx.net (Robert Jordan).
19615
19616 2005-02-09  Ben Maurer  <bmaurer@ximian.com>
19617
19618         * class-internals.h: Little reminder for the future.
19619
19620         * debug-helpers.c: Fix up wrapper_type_names
19621
19622 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19623
19624         * image.c, metadata-internals.h: when loading an image from a file,
19625         mmap all of it and use the same codepaths as when using a
19626         in-memory image: the code is simpler and we use less memory
19627         (both writable and readonly).
19628
19629 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19630
19631         * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
19632         API to alloc runtime data structures that need to be tracked by the
19633         GC and contain pointers.
19634         * appdomain.c, threads.c, object.c, gc.c: use the above changes to
19635         make the code more readable and eventually use a different GC.
19636
19637 2005-02-09  Zoltan Varga  <vargaz@freemail.hu>
19638
19639         * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
19640         for out arguments.
19641         
19642 2005-02-09  Lluis Sanchez Gual  <lluis@novell.com>
19643
19644         * object.c: In release_type_locks(), don't release the cctor lock
19645         if it has already been released. This fixes a crash in the
19646         thread5 test.
19647
19648 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
19649
19650         * gc.c, marshal.c, icall.c: register a delegate for finalization
19651         only when the native function pointer has been allocated for it.
19652
19653 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
19654
19655         * object.c: cleaned up some code, allocate objects that are
19656         pointer free with the atomic malloc variant. Allocate memory
19657         for static data from the mempool if it's pointer-free.
19658         Allocate the bounds array at the end of the array data, when needed.
19659         * object-internals.h, object.h: move a private function in a private
19660         header.
19661         * class.c: handle missing case in tracking references in fields.
19662
19663 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
19664
19665         * class.c, class-internals.h: keep track if a type has
19666         reference fields in either the instance or static fields.
19667
19668 2005-02-07  Lluis Sanchez Gual  <lluis@novell.com>
19669
19670         * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
19671         and renamed to MonoRuntimeInfo. Added fields to store the expected
19672         framework assembly version. Changed mono_get_framework_version and
19673         mono_get_runtime_version for a single mono_get_runtime_info method.
19674         
19675         * assembly.c: Added method to remap system assembly versions to the
19676         current executing runtime version. Removed old mapping code.
19677         Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
19678         
19679         * icall.c, reflection.c: Track api changes.
19680
19681 2005-02-06  Miguel de Icaza  <miguel@novell.com>
19682
19683         * loader.c (method_from_memberref): Improve error reporting,
19684         produce the class name instead of the typeref/typedef index. 
19685
19686 2005-02-07  Zoltan Varga  <vargaz@freemail.hu>
19687
19688         * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
19689
19690 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
19691
19692         * loader.c (mono_lookup_pinvoke_call): Allow for combination of
19693         stdcall and charset name mangling.  Reorganize the code and add
19694         some tracing stuff.
19695
19696 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
19697
19698         * monodiet.c: More iters!
19699
19700         * marshal.c: Iter usage.
19701
19702         * icall.c: Iter usage.
19703
19704         * object.c: Use iters.
19705
19706         * debug-helpers.c: More iters
19707
19708 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
19709
19710         * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
19711         under win32.
19712
19713 2005-02-05  Ben Maurer  <bmaurer@ximian.com>
19714
19715         * mono-debug-debugger.c: use iters
19716
19717         * class.c, class-internals.h: mono_class_setup_events is static
19718         now
19719
19720         * All callers: use iters
19721
19722 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
19723
19724         * class.c string-icalls.c marshal.c reflection.c: Applied patch from
19725         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
19726
19727 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
19728
19729         * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
19730
19731         * marshal.h: Add prototypes for ldfld/stfld_remote.
19732
19733         * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
19734         this is called during startup.
19735         
19736 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
19737
19738         * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
19739         MonoThreadsSync struct private in monitor.c. Changed the way
19740         MonoThreadsSync is allocated so it's faster and there is no
19741         need to keep track of it with a finalizer and it uses less memory.
19742         This also finally allows us to allocate mono objects as ptrfree when
19743         there are no reference fields.
19744
19745 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
19746
19747         * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
19748         disappearing link to the GC interface and use them to simplify
19749         the gchandles code.
19750
19751 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
19752
19753         * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
19754         stfld_remote which call mono_load/store_field_new. This allows methods
19755         calling ldfld/stfld wrappers to be AOTed.
19756
19757         * console-io.c: Include sys/filio.h under solaris.
19758         
19759         * console-io.c: Include curses.h if needed correctly.
19760
19761 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
19762         
19763         * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
19764         method->klass as well.
19765
19766         * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
19767
19768         * class.c (mono_class_init): Switch on lazy initialization of 
19769         methods.
19770
19771         * class.c (mono_class_get_finalizer): Handle the case when the 
19772         finalizer is inherited.
19773
19774 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19775
19776         * console-io.c: <curses.h> is needed by term.h on solaris.
19777
19778 2005-02-03  Ben Maurer  <bmaurer@ximian.com>
19779
19780         * icall.c, class-internals.h, monodiet.c, class.c: Remove
19781         mono_class_setup_properties where possible. Remove this ftn from
19782         the header file, and make it static.
19783
19784 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
19785
19786         * loader.c: Add missing setup_... call.
19787
19788         * class.c: Add missing setup_... calls.
19789
19790         * class.c (mono_class_init): Switch on lazy initialization of 
19791         the generic vtable.
19792         
19793         * class.c (mono_class_init): Fix generics broken by the recent changes.
19794
19795         * monodiet.c (handle_type): Add missing setup_... calls.
19796
19797         * class.c: Back out garbage in previous patch.
19798         
19799         * class.c: Add missing setup_... calls.
19800
19801         * class.c (mono_class_get_method_from_name_flags): Avoid calling
19802         mono_class_setup_methods () if possible.
19803
19804         * class-internals.h (MonoClass): Add 'has_cctor' flag.
19805
19806         * class-internals.h (MonoCachedClassInfo): New structure.
19807
19808         * class.c: Initialize properties and events fields of MonoClass lazily.
19809
19810         * class.c: Add infrastructure for lazily initializing the methods and
19811         vtable fields of MonoClass. Not yet used.
19812
19813         * class.c (mono_class_get_finalizer): New helper function.
19814
19815         * class.c: Add infrastructure for loading some class related data from
19816         an AOT file.
19817
19818         * object.c: Add infrastructure for initializing the vtable from data
19819         in the AOT file.
19820
19821         * gc.c (run_finalize): Use mono_class_get_finalizer ().
19822
19823         * class.c loader.c object.c icall.c gc.c reflection.c: Call the
19824         appropriate initialization function before accessing parts of the
19825         MonoClass structure.
19826
19827         * marshal.c: Fix warnings.
19828         
19829         * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
19830
19831         * mono-debug-debugger.c (get_exception_message): Use 
19832         mono_class_get_method_from_name_flags ().
19833
19834 2005-02-02  Ben Maurer  <bmaurer@ximian.com>
19835
19836         * reflection.c, appdomain.c: Replace a few manual searches that
19837         Zoltan missed. (Paolo approved this part of my initial patch).
19838
19839 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
19840
19841         * profiler.c: disable recording statistical events at report time.
19842
19843 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19844
19845         * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
19846         to byteswap arrays of enum values, too (bug #72080).
19847
19848 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
19849
19850         * appdomain.c (set_domain_search_path): Allow this to be called if
19851         domain->setup is not yet set.
19852
19853         * loader.c (mono_method_get_index): New helper function.
19854
19855         * loader.c reflection.c: Use mono_method_get_index ().
19856
19857         * class.c (mono_class_get_method_from_name_flags): New helper method.
19858
19859         * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
19860         this.
19861
19862         * class.c (mono_class_get_cctor): New helper method.
19863
19864         * string-icalls.c object.c class.c marshal.c reflection.c: Use
19865         mono_class_get_method () to look up methods.
19866
19867 2005-02-01  Miguel de Icaza  <miguel@novell.com>
19868
19869         * console-io.c: Fix the build, this should work on Windows.
19870
19871 2005-01-31  Ben Maurer  <bmaurer@ximian.com>
19872
19873         * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
19874         be set to null to keep things valid
19875
19876 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19877
19878         * icall.c: added Console 2.0 icalls.
19879         * Makefile.am: added console-io.[ch]
19880         * console-io.[ch]: internal calls for Console 2.0 API.
19881
19882 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
19883
19884         * class.c: make sure we consider all the interfaces
19885         when calculating max_interface_id (bug found by
19886         Jeroen Frijters running ikvm).
19887
19888 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
19889
19890         * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
19891         valuetype fields to null.
19892
19893         * object.c (set_value): Ditto. Fixes #71669.    
19894
19895 2005-01-31  Martin Baulig  <martin@ximian.com>
19896
19897         * metadata.c (mono_metadata_has_generic_params): New public
19898         function; checks whether something is a generic method.
19899
19900 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19901
19902         * appdomain.c: fix infinite recursion when adding assemblies.
19903
19904 2005-01-30  Sebastien Pouliot  <sebastien@ximian.com>
19905
19906         * object.c: Fix small typo to return all items for Environment.
19907         GetCommandLineArgs.
19908
19909 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
19910
19911         * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
19912         reflection.c: more domain and assembly-unload related fixes
19913         and memory leaks plugs.
19914
19915 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
19916
19917         * 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.
19918
19919 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
19920
19921         * loader.c (mono_method_signature): Make this method lazy
19922         (mono_get_method_from_token): Don't computate the signature here.
19923
19924         Doing this saves quite a bit of memory. I got 90 kb on starting up
19925         monodoc. It should also save some disk reads on startup.
19926
19927         * *: MonoMethod->signature might be NULL now. You *MUST* use
19928         mono_method_signature.
19929
19930 2005-01-29  Zoltan Varga  <vargaz@freemail.hu>
19931
19932         * object.c (mono_runtime_get_main_args): Return an array from the
19933         current domain here. Fixes #71938.
19934
19935 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
19936
19937         * monitor.c: formatting changes to comply with the
19938         mono coding style and remove #ifdefs from the code.
19939
19940 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
19941
19942         * metadata.c, private.h: remove some unneeded data
19943         and use a more compact representation for table schemas.
19944
19945 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
19946
19947         * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
19948         to get a better distribution in hash tables.
19949         * *.c: use mono_aligned_addr_hash() where appropriate.
19950         * assembly.c: make var static.
19951
19952 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
19953
19954         * domain-internals.h: Put MonoJitInfo on a diet.
19955
19956         * domain.c: Fix a warning.
19957
19958 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
19959
19960         * gc.c: rework the gc handles code to reuse handles
19961         when freed.
19962
19963 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
19964
19965         * domain.c: fixed long standing bug in mono_string_equal() which
19966         was brought to light with the ldstr changes.
19967
19968 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
19969
19970         * reflection.c: Remove warning by adding missing include for marshal.h
19971
19972 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
19973
19974         * domain.c, object.c: change the ldstr_table to hold
19975         MonoString* as keys: makes the runtime isinterned lookup
19976         faster and simplifies memory management.
19977
19978 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com> 
19979  
19980         * icall.c: Renamed GetEnvironmentVariable so internal* so it was
19981         possible to add imperative security checks before calling the icall.
19982         * reflection.c: Return security attributes on the original MonoMethod
19983         (and not the wrapped one). This fix permissions on icalls.
19984
19985 2005-01-25  Dick Porter  <dick@ximian.com>
19986
19987         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
19988         the check for mktime() support actually test the mktime() return
19989         value.  "Fixes" bug 71682, though the output is still different to
19990         MS.
19991
19992 2005-01-25  Martin Baulig  <martin@ximian.com>
19993
19994         * class.c (mono_class_is_assignable_from): Make this work for
19995         generic instances.
19996
19997 2005-01-24  Ben Maurer  <bmaurer@ximian.com>
19998
19999         * marshal.c (mono_string_utf8_to_builder)
20000         (mono_string_builder_to_utf16): We might not have ownership of the
20001         string. In thise case, we need to create a new buffer.
20002
20003         * object-internals.h (mono_stringbuilder_capacity): sb->str might
20004         be null, in which case, use the default capacity.
20005
20006 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
20007
20008         * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
20009         GC events to the profiler.
20010
20011 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
20012
20013         * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
20014         if you don't want the GC to run.
20015
20016 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
20017
20018         * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
20019         start providing a GC API and keeping different implementations in
20020         their own file.
20021         * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
20022
20023 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
20024
20025         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
20026         mmap rather than allocating a huge buffer.
20027         (mono_debug_close_mono_symbol_file): Free the buffer allocated
20028         above.
20029
20030 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
20031
20032         * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
20033         and CheckExecutionRights.
20034         * reflection.c|h: Keep the index of the declarative security to be 
20035         used, instead of the pointer, when AOT compiler is used. Also add 
20036         class initialization when requesting demands.
20037         * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
20038         CheckExecutionRights. Both properties are now FALSE by default, and
20039         unmodifiable, unless the --security option is used.
20040
20041 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20042
20043         * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
20044         reflection.c: properly refcount images and assemblies, many leaks fixed.
20045
20046 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20047
20048         * threadpool.c: increase the timeout for threads in the thread pool to
20049         10s.  Fixes bug #67159.
20050
20051 2005-01-20  Bernie Solomon  <bernard@ugsolutions.com>
20052
20053         * class-internals.h: Sun's compiler insists on explicit
20054         signed on bit fields to handle then correctly.
20055
20056 2005-01-19  Miguel de Icaza  <miguel@ximian.com>
20057
20058         * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
20059         Make the size of the array fit only the number of invalid path
20060         chars that we have.
20061
20062         * class.c (_mono_class_get): Improve the error reporting when a
20063         class referenced is not found, to assist debugging. 
20064
20065 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
20066
20067         * threads.c: fix off-by-one error.
20068         * domain.c: free data allocated in the domain.
20069
20070 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
20071
20072         * reflection.c (mono_method_body_get_object): Fill out exception info
20073         as well.
20074
20075         * object-internals.h: Add MonoReflectionExceptionHandlingClause 
20076         structure.
20077         
20078 2005-01-19  Martin Baulig  <martin@ximian.com>
20079
20080         * loader.c (mono_get_method_constrained): Make this work again.
20081
20082 2005-01-19  Zoltan Varga  <vargaz@freemail.hu>
20083
20084         * object-internals.h (_MonoReflectionMethodBody): Make local_index a 
20085         guint16 to match the managed side.
20086
20087         * reflection.c (mono_reflection_body_get_object): Fill out local
20088         variables array.
20089
20090         * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
20091         as well.
20092
20093         * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
20094         'local_var_sig_token'.
20095
20096 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
20097
20098         * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks 
20099         System.Drawing.
20100
20101         * reflection.c (mono_method_body_get_object): Handle abstract and
20102         runtime methods.
20103
20104 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
20105
20106         * marshal.c, loader.c, class-internals.h, reflection.c:
20107         store the emthod data for a wrapper in an array instead of a list.
20108
20109 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
20110
20111         * marshal.c: change the code to allocate memory more
20112         conservatively for method wrappers.
20113
20114 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
20115
20116         * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
20117         fields from MonoClass to the marshal info structure where they belong.
20118
20119 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
20120
20121         * class.c, object.c, class-internals.h, marshal.c: rearrange
20122         some fields and tweak some types to lower memory usage.
20123
20124 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
20125
20126         * threads.c (signal_thread_state_change): Handle the case when the
20127         target thread is the current thread.
20128
20129         * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
20130
20131         * marshal.c: Rename emit_ptr_to_str_conv and its pair to 
20132         emit_ptr_to_object_conv. 
20133
20134         * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
20135         marshalling. Fixes #71352.
20136
20137 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20138
20139         * metadata.h, blob.h: move table enum to blob.h so it can be included
20140         in any header.
20141         * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
20142         cut the size of MonoImage/MonoDynamicImage.
20143
20144 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
20145
20146         * profiler.c (mono_profiler_install_simple): Fix default arguments.
20147
20148 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
20149
20150         * reflection.c, reflection.h, icall.c: add a function to check
20151         if an attribute type is defined for a metadata object.
20152
20153 2005-01-14  Lluis Sanchez Gual  <lluis@novell.com>
20154
20155         * object-internals.h: Added some needed fields from StringBuilder class.
20156         * marshal.c: Set the maxCapacity when creating a StringBuilder.
20157
20158 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
20159
20160         * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
20161         threads before shutting down the runtime.
20162
20163         * threads.c (mono_thread_suspend_all_other_threads): New helper function.
20164
20165 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20166
20167         * object-internal.h, threads.c: implement stacksize and 
20168         parameterized thread start functionality (requires
20169         matching corlib). Marked broken code for later removal.
20170
20171 2005-01-12  Martin Baulig  <martin@ximian.com>
20172
20173         * class-internals.h (MonoGenericClass): Moved the `initialized'
20174         flag to MonoDynamicGenericClass, removed `init_pending'.
20175         (MonoGenericInst): Added `is_reference' flag.
20176
20177 2005-01-12  Zoltan Varga  <vargaz@freemail.hu>
20178
20179         * reflection.c (mono_image_create_pefile): Only set the pe_offset
20180         inside the MSDOS header. Fixes #71201.
20181
20182         * gc.c (mono_gc_cleanup): Handle the case when this is called from the
20183         gc thread.
20184         (mono_domain_finalize): Ditto.
20185
20186 2005-01-12  Martin Baulig  <martin@ximian.com>
20187
20188         * class.c (mono_get_shared_generic_class): Use the cache for
20189         non-dynamic generic classes.
20190
20191         * class-internals.h (mono_class_create_generic_2): Removed
20192         function prototype, this function is now static inside class.c.
20193
20194         * class.c (mono_class_create_generic_2): Made this static, only
20195         call it from mono_class_init() and mono_class_setup_parent().
20196         (collect_implemented_interfaces_aux): Call mono_class_init() on
20197         the interfaces we collect.
20198         (mono_class_setup_vtable): Call mono_class_init (class->parent).
20199
20200 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
20201
20202         * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
20203         it a real thread handle.
20204
20205         * domain-internals.h: Move exvar_offset from MonoJitInfo to 
20206         MonoJitExceptionInfo, since each catch clause needs its own variable.
20207         
20208 2005-01-11  Dick Porter  <dick@ximian.com>
20209
20210         * image.c (mono_pe_file_open): New variant on mono_image_open()
20211         that does not set up the CLI metadata; used for FileVersionInfo so
20212         it can get the data for windows binaries too.
20213         
20214         * process.c (process_read_string_block): Don't read off the end of
20215         the StringTable block.
20216
20217         These both fix bug 70766.
20218
20219 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
20220
20221         * gc.c: set some fields to NULL at GC cleanup time.
20222         * threads.c: if we quit the main thread, call exit ().
20223
20224 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
20225
20226         * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
20227
20228 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
20229
20230         * threads.h, threads.c, object.c: added accessor and settor for
20231         main_thread. Handle it specially when exiting from it: wait
20232         for other foreground threads to exit.
20233
20234 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20235
20236         * process.c, verify.c: remove some bloat.
20237
20238 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
20239
20240         * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
20241         the calling convention to cdecl under win32.
20242
20243 2005-01-08  Ben Maurer  <bmaurer@ximian.com>
20244
20245         * object.c (mono_object_get_size): New function to get the size of
20246         an object instance.
20247
20248         * profiler.c (simple_allocation): Use above.
20249
20250 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
20251
20252         * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
20253         ves_icall_System_AppDomain_getRootDomain (as it's not required to
20254         get an appdomain by it's id and we can't assume the root's id is 0).
20255         * domain-internals.h: Change the function prototype to match.
20256         * icall.c: Change the icall table for AppDomain.
20257
20258 2005-01-08  Miguel de Icaza  <miguel@ximian.com>
20259
20260         * locales.c (string_invariant_compare_char): Only compute
20261         GUnicodeTypes in the case where we need them.  Test for ordinality
20262         first and return if so.
20263
20264         From the commit:
20265
20266                 /*
20267                  * FIXME: here we must use the information from c1type and c2type
20268                  * to find out the proper collation, even on the InvariantCulture, the
20269                  * sorting is not done by computing the unicode values, but their
20270                  * actual sort order.
20271                  */
20272
20273 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20274
20275         * loader.c: for P/Invoke methods, allow the "Internal" shared
20276         library name to refer to the calling process symbol namespace.
20277
20278 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
20279
20280         * Makefile.am: Add the security manager to the build.
20281         * security-manager.c|h: New. Initialization of the security manager.
20282
20283 2005-01-07  Dick Porter  <dick@ximian.com>
20284
20285         * threads.c: 
20286         * monitor.c: Update thread state during Monitor and WaitHandle
20287         waits.  Fixes bug 71031.
20288
20289 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20290
20291         * reflection.c (property_encode_signature): Correctly handle when the
20292         property has no methods.
20293
20294 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
20295
20296         * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
20297         
20298         * reflection.c (reflection_methodbuilder_from_method_builder): Copy
20299         fields from mb, not rmb. Fixes #71017.
20300
20301         * marshal.c (emit_ptr_to_str_conv): Add support for 
20302         ByValTStr -> string conversion. Fixes #71015.
20303
20304         * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
20305
20306         * mempool.c (mono_mempool_contains_addr): New helper function.
20307
20308 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20309
20310         * metadata.c (mono_metadata_compute_size): Fix size calculation of
20311         HasSematics encoded fields.
20312         
20313         * metadata.c (mono_type_to_unmanaged): Improve error message for 
20314         invalid string marshalling.
20315
20316         * metadata.c: Fix warnings.
20317         
20318 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20319
20320         * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
20321         profiler support.
20322
20323 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20324
20325         * domain.c object.c domain-internals.h: Revert part of r38077 since the
20326         keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
20327         tests.
20328
20329 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
20330
20331         * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
20332         so methods containing these can be AOTed.
20333
20334 2005-01-03  Martin Baulig  <martin@ximian.com>
20335
20336         * loader.c (find_method): Removed the hack for generic instances.
20337         (method_from_memberref): If our parent is a generic instance, pass
20338         its generic type definition to find_method() and then inflate the
20339         method.
20340         (mono_get_method_constrained): Pass the generic type definition to
20341         find_method() and inflate the method later.
20342
20343         * class-internals.h (MonoStats): Added `generic_class_count'.
20344
20345         * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
20346         Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
20347
20348         * reflection.c (mono_custom_attrs_from_params): Don't ignore
20349         generic type definitions.
20350
20351 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
20352
20353         * loader.c icall.c: Fix warnings.
20354
20355 2004-12-29  Zoltan Varga  <vargaz@freemail.hu>
20356
20357         * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
20358         blittable types. Fixes #70864.
20359
20360 2004-12-29  Martin Baulig  <martin@ximian.com>
20361
20362         * icall.c
20363         (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
20364
20365         * reflection.c (mono_method_get_object): Create a
20366         "System.Reflection.MonoGenericMethod" for inflated methods; don't
20367         call mono_get_inflated_method().
20368
20369         * class-internals.h (MonoStats): Added `inflated_method_count_2'.
20370
20371 2004-12-27  Martin Baulig  <martin@ximian.com>
20372
20373         * class-internals.h (MonoMethod): Added `is_inflated' flag.
20374         (MonoMethodInflated): Added `inflated' field.
20375
20376         * class.c (mono_class_inflate_generic_method): Don't really
20377         inflate the method here; just set the `is_inflated' flag in the
20378         MonoMethod.
20379         (mono_class_get_inflated_method): Actually inflate the method here
20380         if it's not already inflated; we use the MonoMethodInflated's new
20381         `inflated' field as a cache.
20382
20383 2004-12-26  Martin Baulig  <martin@ximian.com>
20384
20385         * class.c
20386         (inflate_generic_class): Moved some code out of inflate_generic_type().
20387         (mono_class_inflate_generic_method): If we're already inflated,
20388         inflate the context and use the declaring method; ie. make sure
20389         the declaring method of an inflated method is always the generic
20390         method definition.
20391         (mono_class_create_from_typedef): Create
20392         `class->generic_container->context->gclass'.
20393
20394 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
20395
20396         * metadata-internals.h, marshal.c, reflection.c: More
20397         MonoGHashTable->GHashTable.
20398
20399         * domain-internals.h, class.c: Change MonoGHashTable's into
20400         GHashTables for some cases where no gc stuff is used
20401
20402         All users: update apis
20403
20404 2004-12-23  Ben Maurer  <bmaurer@ximian.com>
20405
20406         * metadata.c (builtin_types): Make this `const'. Makes this get
20407         put into the shareable section.
20408         (mono_metadata_init): Casts to make gcc happy.
20409
20410 2004-12-22  Zoltan Varga  <vargaz@freemail.hu>
20411
20412         * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
20413
20414 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com> 
20415
20416         * icall.c: Added an internal call to retrieve the position and length
20417         of assembly-level declarative security attributes (RequestMinimum, 
20418         RequestOptional and RequestRefuse). This is used by the Assembly class
20419         to re-create the corresponding permission sets.
20420
20421 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
20422
20423         * marshal.c: fix the stelemref wrapper to be type correct
20424         (and faster).
20425
20426 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20427
20428         * icall.c (ves_icall_System_Object_GetHashCode): There was no need
20429         to do key & 0x7fffffff. Hashtable already does this. It just
20430         results in longer code.
20431
20432 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
20433
20434         * appdomain.c: Bump corlib version.
20435         * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
20436         * domain.c: Add RuntimeSecurityFrame to mono_defaults.
20437         * reflection.c|h: Add functions to get declarative security infos
20438         (blob position and length) for assemblies, classes and methods.
20439
20440 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
20441
20442         * reflection.c: sort the constant table (bug #70693).
20443
20444 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
20445
20446         * object-internals.h, threads.c, domain.c: add accessors for
20447         the MonoThread and MonoDomain tls keys.
20448
20449 2004-12-18  Martin Baulig  <martin@ximian.com>
20450
20451         * class.c (inflate_generic_type): If we're inflating a generic
20452         instance, set `ngclass->context->container = context->container';
20453         ie. the container we inflated into.
20454
20455         * metadata.c (mono_metadata_parse_generic_param): Reflect above
20456         inflate_generic_type() changes.
20457
20458 2004-12-17  Martin Baulig  <martin@ximian.com>
20459
20460         * class-internals.h
20461         (MonoGenericClass): Replaced `MonoType *generic_type' with
20462         `MonoClass *generic_class'.  Removed `dynamic_info'; if
20463         `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
20464         (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
20465
20466 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
20467
20468         * exception.c (mono_exception_from_token): New helper function.
20469
20470 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
20471
20472         * assembly.c (mono_assembly_load_with_partial_name): Call 
20473         mono_assembly_loaded before invoking the preload hooks. Fixes
20474         #70564.
20475
20476         * object-internals.h (MonoThread): Change culture_info and 
20477         ui_culture_info into an array.
20478
20479         * threads.c: Cache culture info objects from more than one appdomain.
20480
20481         * threads.c threads-types.h icall.c: Add icalls for manipulating the 
20482         current UI culture.
20483
20484 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
20485
20486         * threads.h threads.c appdomain.c: Clear the culture_info field of
20487         all threads during unloading if they point to an object in the dying
20488         appdomain.
20489
20490 2004-12-13  Ben Maurer  <bmaurer@ximian.com>
20491
20492         * culture-info.h (TextInfoEntry): New struct
20493         * object-internals.h: sync with managed
20494         * locales.c: fill the `text_info_data' field
20495         * culture-info-tables.h: update
20496
20497 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20498
20499         * Makefile.am, monodiet.c: add monodiet, an IL code garbage
20500         collector.
20501
20502 2004-12-12  Ben Maurer  <bmaurer@ximian.com>
20503
20504         * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
20505         (ves_icall_ModuleBuilder_getMethodToken): Ditto
20506
20507 2004-12-12  Martin Baulig  <martin@ximian.com>
20508
20509         * mono-debug-debugger.c (write_type): If we're an enum and the
20510         builtin types have already been initialized, call mono_class_init().
20511
20512 2004-12-11  Martin Baulig  <martin@ximian.com>
20513
20514         * metadata.c (mono_metadata_load_generic_params): Added
20515         `MonoGenericContainer *parent_container' argument; automatically
20516         compute `container->is_method'; pass the correct owner to
20517         get_constraints().      
20518
20519         * reflection.c (compare_genericparam): Sort the GenericParam table
20520         according to increasing owners. 
20521
20522 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
20523
20524         * profiler.c: allow disabling the default profiler.
20525
20526 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
20527
20528         * decimal.c, icall.c: allow disabling System.Decimal support.
20529
20530 2004-12-09  Marek Safar <marek.safar@seznam.cz>
20531
20532         * reflection.c: Add support for null attribute arguments.
20533
20534 2004-12-09  Martin Baulig  <martin@ximian.com>
20535
20536         * metadata.h, loader.h: Use `idx' instead of `index' in parameter
20537         names to get rid of compiler warnings.
20538
20539 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20540
20541         * marshal.c (mono_marshal_get_struct_to_ptr): Call 
20542         mono_marshal_load_type_info (). Fixes #69625.
20543         (mono_marshal_get_ptr_to_struct): Likewise.
20544
20545 2004-12-08  Martin Baulig  <martin@ximian.com>
20546
20547         * mono-debug.h: Bumped version number to 47.
20548
20549         * mono-debug-debugger.c
20550         (mono_debugger_event_handler, mono_debugger_event): Take two
20551         guint64 arguments insteed of a gpointer and a guint32.  
20552
20553 2004-12-08  Martin Baulig  <martin@ximian.com>
20554
20555         * debug-mono-symfile.h
20556         (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
20557         `address' to `native_offset'.
20558
20559 2004-12-08  Martin Baulig  <martin@ximian.com>
20560
20561         * class.c (mono_class_create_from_typespec): Only inflate if we
20562         either have `context->gclass' or `context->gmethod'.
20563
20564 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
20565
20566         * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
20567
20568         * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
20569
20570         * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
20571
20572         * reflection.c (mono_assembly_get_object): Remove the workaround put
20573         in for the release.
20574         
20575         * appdomain.c: Use the corlib_internal field from MonoAssembly.
20576
20577         * appdomain.c: Bump corlib version.
20578
20579         * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
20580         be visible in other appdomains.
20581
20582 2004-12-07  Ben Maurer  <bmaurer@ximian.com>
20583
20584         * threads.c: Interlocked inc and dec for longs were messed up,
20585         use a KISS based impl for this. Fixes 70234
20586
20587 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
20588
20589         * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
20590
20591 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
20592
20593         * icall.c: fix to follow policy not to allow struct
20594         arguments in icalls.
20595
20596 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20597
20598         * process.c: make the patch that handles spaces in file paths work
20599         on mono/windows too.
20600
20601 2004-12-06  Martin Baulig  <martin@ximian.com>
20602
20603         * class.c (mono_class_create_generic): Call
20604         mono_class_setup_supertypes() if we're dynamic.
20605         (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
20606
20607 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
20608
20609         * object-internals.h: Add new fields to MonoThread.
20610
20611         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20612
20613         * icall.c threads-types.h threads.c: Add new icalls.
20614
20615         * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
20616
20617         * object-internals.h (MonoReflectionAssembly): Sync object layout with
20618         managed side.
20619
20620         * appdomain.c: Bump corlib version.
20621
20622         * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
20623         internal assemblies. Fixes #69181.
20624
20625 2004-12-05  Martin Baulig  <martin@ximian.com>
20626
20627         * class.c (mono_class_inflate_generic_signature): Make this a
20628         no-op if `context' is NULL or we don't have any type parameters;
20629         also copy `sentinelpos'.        
20630
20631 2004-12-04  Zoltan Varga  <vargaz@freemail.hu>
20632
20633         * image.c: Add unbox_wrapper_cache.
20634
20635         * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
20636
20637         * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
20638         function generator.
20639         
20640         * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
20641         Fixes #70173.
20642
20643         * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
20644         
20645 2004-12-04  Martin Baulig  <martin@ximian.com>
20646
20647         * loader.c (mono_method_get_signature_full): New public function;
20648         like mono_method_get_signature(), but with an additional
20649         `MonoGenericContext *' argument.
20650
20651         * class.c (mono_class_inflate_generic_signature): Formerly known
20652         as inflate_generic_signature(); make this public.
20653
20654 2004-12-04  Martin Baulig  <martin@ximian.com>
20655
20656         * metadata.c
20657         (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
20658         instead of a `MonoGenericContainer *'.  
20659         (mono_metadata_parse_array_full): Likewise.
20660         (mono_metadata_parse_signature_full): Likewise.
20661         (mono_metadata_parse_method_signature_full): Likewise.
20662         (mono_metadata_parse_generic_inst): Likewise.
20663         (mono_metadata_parse_generic_param): Likewise.
20664         (mono_metadata_parse_mh_full): Likewise.
20665         (mono_type_create_from_typespec_full): Likewise.
20666
20667 2004-12-03  Martin Baulig  <martin@ximian.com>
20668
20669         * class-internals.h (MonoGenericContainer): Replaced the
20670         `MonoGenericContext * pointer with a `MonoGenericContext'
20671         structure and made it the first element.
20672
20673 2004-12-03  Martin Baulig  <martin@ximian.com>
20674
20675         * class.c
20676         (inflate_generic_type): Set the `context->container' when creating
20677         a new MonoGenericContext.
20678         (mono_class_inflate_generic_method): Likewise.
20679         (mono_class_create_from_typespec): Just use `context->container'
20680         to get the container.
20681
20682         * loader.c (method_from_methodspec): Set `context->parent' from
20683         `context->container' - and if that's a method container, use its
20684         parent.  Also set the `context->container' when creating a new
20685         MonoGenericContext.
20686         (mono_get_method_from_token): Use just `context->container' to get
20687         the container.
20688
20689         * metadata.c (do_mono_metadata_parse_generic_class): Also set
20690         `gclass->context->container'.
20691
20692         * reflection.c (do_mono_reflection_bind_generic_parameters): Set
20693         the `context->container' when creating a new MonoGenericContext.
20694
20695 2004-12-03  Zoltan Varga  <vargaz@freemail.hu>
20696
20697         * reflection.c (compare_genericparam): Sort params with identical
20698         owner by their number. Fixes gen-111 on sparc.
20699
20700 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
20701
20702         * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
20703         around the domain changes.
20704
20705         * appdomain.c (mono_domain_unload): Handle the case when the thread
20706         calling Unload is itself being aborted during unloading. Fixes #70022.
20707
20708         * appdomain.h: Add prototype for mono_install_runtime_cleanup.
20709
20710         * marshal.c (emit_thread_interrupt_checkpoint_call): Call 
20711         checkpoint_func as an icall so it gets a wrapper.
20712         (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
20713         in the cross-appdomain wrappers too.
20714
20715         * threads.c (mono_thread_has_appdomain_ref): Make this public.
20716
20717         * assembly.c (mono_assembly_open_from_bundle): Fix warning.
20718
20719         * reflection.c: Fix some memory leaks.
20720         
20721 2004-12-02  Martin Baulig  <martin@ximian.com>
20722
20723         * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
20724
20725         * metadata.c (generic_class_cache): New static hashtable.
20726         (mono_metadata_lookup_generic_class): New public method.
20727
20728 2004-12-02  Martin Baulig  <martin@ximian.com>
20729
20730         * class.c (mono_class_create_from_typedef): Call
20731         mono_class_setup_parent() and mono_class_create_mono_type() before
20732         parsing the interfaces.
20733
20734 2004-12-02  Martin Baulig  <martin@ximian.com>
20735
20736         * metadata.c (generic_inst_cache): New static hashtable.
20737         (mono_metadata_lookup_generic_inst): New public function.
20738         (mono_metadata_inflate_generic_inst): New public function.
20739         (mono_metadata_parse_generic_inst): New public function.
20740         (do_mono_metadata_parse_generic_class): Use the new
20741         mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
20742         since this'll also use the cache.
20743
20744         * reflection.c (mono_reflection_bind_generic_method_parameters):
20745         Use mono_metadata_lookup_generic_inst() to use the new cache.
20746
20747         * class.c (inflate_mono_type): Use
20748         mono_metadata_inflate_generic_inst() to inflate a generic
20749         instance; this'll also use the new cache.
20750
20751         * loader.c (method_from_methodspec): Use
20752         mono_metadata_parse_generic_inst() and
20753         mono_metadata_inflate_generic_inst() rather than parsing it
20754         manually, so we can use the new cache.
20755
20756 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
20757
20758         * threads.c (wait_for_tids): Do not incorrectly free threads when 
20759         the wait times out.
20760
20761 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20762
20763         * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
20764         iter->args based on whether parameters are passed in registers (i.e.
20765         MONO_ARCH_REGPARMS is defined)
20766
20767 2004-12-01  Zoltan Varga  <vargaz@freemail.hu>
20768
20769         * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
20770         the exception message. Fixes #70070.
20771         (method_from_methodspec): Fix warnings.
20772
20773 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20774
20775         * process.c: (complete_path) return the path quoted
20776
20777 2004-12-01  Martin Baulig  <martin@ximian.com>
20778
20779         * class-internals.h (MonoGenericInst): New structure.
20780         (MonoGenericClass): Replaced `type_argc', `type_argv' and
20781         `is_open' with `MonoGenericInst *inst'.
20782         (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
20783         `is_open' with `MonoGenericInst *inst'.
20784
20785 2004-11-30  Martin Baulig  <martin@ximian.com>
20786
20787         Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
20788
20789         * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
20790         to `generic_class_cache'.
20791
20792         * metadata.c
20793         (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
20794         (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
20795         (mono_generic_inst_is_valuetype): Renamed to
20796         mono_generic_class_is_valuetype().
20797
20798         * class-internals.h
20799         (MonoGenericInst): Renamed to MonoGenericClass.
20800         (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
20801         (MonoClass): Renamed `generic_inst' to `generic_class'.
20802         (MonoGenericContext): Renamed `ginst' to `gclass'.
20803
20804         * object-internals.h
20805         (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
20806
20807         * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
20808         mono_reflection_generic_class_initialize().
20809
20810         * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
20811         now known as "System.Reflection.MonoGenericClass".
20812         (monogenericinst_icalls): Renamed to monogenericclass_icalls.
20813
20814 2004-11-29  Sebastien Pouliot  <sebastien@ximian.com>
20815
20816         * class-internals.h: Added a flag field to MonoClass to cache the
20817         declarative security attributes actions associated with the class.
20818         * domain-internals.h: Added booleans to MonoJitInfo to cache the
20819         (class or method level) stack modifiers (Assert, Deny and PermitOnly)
20820         applicable to the JITted method.
20821         * reflection.c|h: Added functions to extract (as flags) which security
20822         actions are available (declaratively) for a method, class or assembly.
20823         * metadata.c|h: Added functions to search the declarative security
20824         table in the metadata.
20825         
20826 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
20827
20828         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
20829         EXPORTEDTYPES are already in the class name cache, so there is no
20830         need to add extra code here to look at them. Just removes a bit of
20831         cruft.
20832
20833         (ves_icall_System_Environment_get_TickCount): No need for #if
20834         WINDOWS. We already have the code in io-layer.
20835
20836 2004-11-28  Martin Baulig  <martin@ximian.com>
20837
20838         * loader.c
20839         (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
20840         Fixes gen-112.cs.
20841
20842 2004-11-27  Miguel de Icaza  <miguel@ximian.com>
20843
20844         * assembly.c (do_mono_assembly_open): Instead of having a
20845         conditional WITH_BUNDLE, incorporate support for bundles here, by
20846         having a global `bundles' variable holding a pointer to the actual
20847         bundles. 
20848
20849         (mono_register_bundled_assemblies): New API call used by the
20850         bundle code. 
20851
20852         See mkbundle.1 for details.
20853         
20854 2004-11-27  Martin Baulig  <martin@ximian.com>
20855
20856         * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
20857         the vtable for generic methods.
20858
20859 2004-11-26  Martin Baulig  <martin@ximian.com>
20860
20861         * metadata.c
20862         (mono_metadata_generic_method_hash): New public function.
20863         (mono_metadata_generic_method_equal): Likewise.
20864
20865         * class-internals.h
20866         (MonoGenericContainer): Added `GHashTable *method_hash'.
20867
20868         * reflection.c (ReflectionMethodBuilder): Added
20869         `MonoGenericContainer *generic_container'.
20870         (reflection_methodbuilder_to_mono_method): Don't create a new
20871         MonoGenericContainer each time we're called.
20872         (mono_reflection_bind_generic_method_parameters): Use
20873         `container->method_hash' to cache the results so we don't create a
20874         different method if we're called several times with the same
20875         arguments.
20876
20877         * loader.c (method_from_methodspec): Use the new
20878         `container->method_hash' here, too.
20879
20880 2004-11-26  Martin Baulig  <martin@ximian.com>
20881
20882         * class.c (inflate_generic_signature): Correctly compute
20883         `res->has_type_parameters'.
20884         (mono_class_vtable): Use the `has_type_parameters' flag to
20885         determine whether we're a generic method.
20886
20887         * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
20888
20889 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
20890
20891         * object.c (mono_runtime_run_main): Fix a small memory leak.
20892
20893 2004-11-25  Martin Baulig  <martin@ximian.com>
20894
20895         * class.c (set_generic_param_owner): Fixed the loop.
20896
20897 2004-11-25  Martin Baulig  <martin@ximian.com>
20898
20899         * object.c (mono_class_vtable): Don't create any JIT wrappers for
20900         generic methods.
20901
20902 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
20903
20904         * reflection.c: Allow all kinds of whitespace, not just ' ' in type
20905         names. Fixes #69787.
20906
20907 2004-11-24  Martin Baulig  <martin@ximian.com>
20908
20909         * class.c (mono_class_create_generic_2): If we don't have a
20910         `ginst->parent', inflate `gklass->parent' to get our parent.
20911
20912 2004-11-24  Martin Baulig  <martin@ximian.com>
20913
20914         * reflection.c (compare_genericparam): Correctly sort the
20915         GenericParam table; fixes #69779.
20916
20917 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
20918
20919         * reflection.c: When writing a PE file, don't create a huge
20920         buffer in memory. Just write the arrays we have to the file.
20921         This reduces memory usage.
20922
20923         * metadata-internals.h: MonoDynamicStream pefile is no longer used
20924         globally.
20925
20926 2004-11-17  Martin Baulig  <martin@ximian.com>
20927
20928         * class.c (mono_class_init): Don't setup `class->parent' for
20929         dynamic instances; moved this to mono_class_generic_2().
20930         (mono_class_create_generic): Also set `klass->inited' for dynamic
20931         generic instances.
20932         (mono_class_create_generic_2): Don't do anything for dynamic
20933         generic instances.  Set `klass->parent' here and also call
20934         mono_class_setup_parent() here. 
20935
20936         * reflection.c (do_mono_reflection_bind_generic_parameters): Added
20937         `MonoType *parent' argument; set `ginst->parent' before calling
20938         mono_class_create_generic_2(), so we set the correct parent.
20939
20940 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
20941
20942         * reflection.c: allow getting attributes from ModuleBuilder
20943         (used by ikvm).
20944
20945 2004-11-17  Martin Baulig  <martin@ximian.com>
20946
20947         * class.c (mono_class_create_from_typedef): If a type parameter is
20948         inherited from an outer class, set its owner to that class.
20949
20950 2004-11-17  Atsushi Enomoto  <atsushi@ximian.com>
20951
20952         * reflection.c: (mono_image_create_pefile): Don't use NULL argument
20953           for (int*) written size. This fixes bug #69592.
20954
20955 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
20956
20957         * icall.c: Added IsAuthenticodePresnet internal call.
20958         * image.c|h: New function that check a MonoImage for an Authenticode
20959         signature in the certificate PE data directory.
20960         * security.c|h: New internal call to ask the runtime if an 
20961         Authenticode signature seems referenced in the PE header.
20962
20963 2004-11-15  Zoltan Varga  <vargaz@freemail.hu>
20964
20965         * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
20966
20967         * reflection.c (mono_image_create_pefile): Free the assembly streams
20968         after writing out the assembly file.
20969
20970         * object.c (mono_runtime_run_main): Fix small memory leak.
20971
20972         * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
20973         property access modifiers. Fixes #69389.
20974
20975 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
20976
20977         * domain.c, object.c, object-internals.h, domain-internals.h,
20978         object.h, marshal.c: keep dynamic code info per domain.
20979
20980 2004-11-15  Martin Baulig  <martin@ximian.com>
20981
20982         * class.c (mono_type_get_name_recurse): Put type arguments in
20983         `[',`]' instead of in `<','>'.  Thanks to Atsushi for the patch,
20984         see bug #68387.
20985
20986 2004-11-15  Martin Baulig  <martin@ximian.com>
20987
20988         * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
20989         (mono_class_setup_vtable): When computing `the_cname' for a
20990         generic instance, don't include the namespace since we'd otherwise
20991         add it twice.
20992
20993 2004-11-15  Martin Baulig  <martin@ximian.com>
20994
20995         * class.c (mono_class_create_generic): Changed return type to void.
20996         (mono_class_create_generic_2): New public function; setup
20997         `class->method', `class->field' and `class->interfaces' here
20998         instead of in mono_class_init().
20999
21000         * class.h (mono_class_create_generic): Moved to class-internals.h.
21001
21002 2004-11-14  Ben Maurer  <bmaurer@ximian.com>
21003
21004         * reflection.c (mono_image_create_pefile): take a file HANDLE.
21005         rather than writing to memory, write to this file. Right now,
21006         we are just writting into a buffer, and copying that. However
21007         we can avoid the buffer later.
21008
21009         (mono_dynamic_stream_reset): new function
21010
21011         * icall.c, object-internals.h: update for the above.
21012
21013 2004-11-13  Ben Maurer  <bmaurer@ximian.com>
21014
21015         * reflection.c: Remove *_ATOMIC macros. We really shouldn't
21016         have been using gc'd memory. First it is slower, unlikely
21017         the comment in the source code said, secondly, it increases
21018         our footprint to do it in the gc.
21019
21020         * icall.c (WriteToFile): rename of getDataChunk. Rewrite
21021         the method so that it does not have to copy to managed code.
21022
21023 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
21024
21025         * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
21026
21027 2004-11-12  Martin Baulig  <martin@localhost>
21028
21029         * reflection.c (mono_image_create_token): Allow generic method
21030         definitions here, since they may appear in an `.override'; see
21031         gen-98/gen-99 for an example.
21032
21033 2004-11-11  Zoltan Varga  <vargaz@freemail.hu>
21034
21035         * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
21036         #69365.
21037
21038         * marshal.c (mono_string_to_ansibstr): Make g_error messages more
21039         descriptive.
21040
21041 2004-11-11  Martin Baulig  <martin@ximian.com>
21042
21043         * class.c (mono_class_setup_vtable): In an explicit interface
21044         implementation, the method name now includes the arity.
21045
21046 2004-11-10  Zoltan Varga  <vargaz@freemail.hu>
21047
21048         * object.c (mono_array_full_copy): Fix warning.
21049
21050 2004-11-10  Lluis Sanchez Gual  <lluis@novell.com>
21051
21052         * appdomain.c: Removed look_for_method_by_name(). Use the new method
21053         mono_class_get_method_from_name() instead.
21054         
21055         * class-internals.h: Added two new types of wrappers. 
21056         Added MonoRemotingTarget enum. Added new trampoline function type, which
21057         takes an additional MonoRemotingTarget value as parameter, so it is
21058         possible to request a trampoline for a specific target.
21059         
21060         * class.c: Added new mono_class_get_method_from_name() method.
21061         
21062         * class.h: In MonoRemoteClass, we can have now to vtables, one for
21063         general remoting sinks and one specific for cross domain calls.
21064         
21065         * debug-helpers.c: Added new wrapper names.
21066         
21067         * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
21068         of a remote class.
21069         
21070         * image.c: Porperly delete value objects form the remoting invoke hashtable.
21071         
21072         * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
21073         with several other methods (mono_marshal_get_xappdomain_dispatch,
21074         mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
21075         and others) can generate a fast remoting wrapper for cross domain calls.
21076         More information can be found in docs/remoting.
21077         Other changes: Removed mono_find_method_by_name, and used
21078         mono_class_get_method_from_name instead.
21079         Remoting wrappers are now stored in a MonoRemotingMethods struct, which
21080         is stored in the remoting invoke hashtable.
21081         
21082         * marshal.h: published the new method for getting the xdomain wrapper,
21083         and also added a method for getting the adequate wrapper for a given
21084         method and target.
21085         
21086         * object-internals.h, object.c: Added a couple of methods for capying and
21087         cloning arrays.
21088         Modified mono_install_remoting_trampoline, which takes the new remoting
21089         trampoline that has a remoting target as parameter.
21090         mono_class_proxy_vtable now also takes a remoting target as parameter, and
21091         will return the most suitable vtable for the target.
21092         Added mono_remote_class_vtable, which returns the vtable of a remote class
21093         (which can be the normal remoting vtable or the xdomain vtable).
21094         
21095         * threads.c: the xdomain invoke and dispatch wrappers must also be
21096         protected against interruptions.
21097
21098 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21099
21100         * icall.c: use memmove in BlockCopyInternal when the source and
21101         destination arrays are the same.
21102
21103 2004-11-09  Martin Baulig  <martin@ximian.com>
21104
21105         * class-internals.h (MonoGenericContainer): Removed `method' and
21106         `signature', replaced them with `is_method' and `is_signature'
21107         flags.  Added `context'.
21108
21109         * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
21110         instead of a `MonoGenericContainer *'.
21111
21112         * metadata.c (mono_metadata_generic_param_equal): Removed the hack
21113         for dynamic type parameters.
21114         (mono_metadata_load_generic_params): Setup `container->context'.
21115
21116         * reflection.c (mono_reflection_setup_generic_class): Setup
21117         `tb->generic_container->context'.
21118         (do_mono_reflection_bind_generic_parameters): Use
21119         mono_class_inflate_generic_type() to correctly inflate types,
21120         rather than using our own hack just for MONO_TYPE_VAR.
21121
21122 2004-11-09  Martin Baulig  <martin@ximian.com>
21123
21124         * class.c (mono_class_inflate_generic_method): Small fix; don't
21125         crash here.
21126
21127         * icall.c
21128         (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
21129         (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
21130         (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
21131         (ves_icall_Type_BindGenericParameters): Likewise.
21132         (ves_icall_Type_get_IsGenericInstance): Likewise.
21133         (ves_icall_Type_GetGenericParameterPosition): Likewise.
21134         (ves_icall_MonoType_get_HasGenericArguments): Likewise.
21135         (ves_icall_MonoType_get_IsGenericParameter): Likewise.
21136         (ves_icall_MonoType_get_DeclaringMethod): Likewise.
21137
21138 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
21139
21140         * assembly.c (mono_assembly_names_equal): Reenable the comparison of
21141         assembly versions and public key tokens. Fixes #69113.
21142
21143 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
21144
21145         * metadata.c: fix bug introduced with the type cache changes
21146         on 2004-11-06.
21147
21148 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
21149
21150         * metadata.h, metadata.c, domain-internals.h, marshal.c: include
21151         the MonoClass pointer instead of the token in exception clauses.
21152         * reflection.c: updates for the above and make the code not depend
21153         on the structure of MonoExceptionClause.
21154
21155 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
21156
21157         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
21158         Add support for dynamic assemblies. Fixes #69114.
21159
21160         * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
21161
21162 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
21163
21164         * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
21165         since most only those methods use it. the code member of
21166         MonoMethodPInvoke was dead, so that can be removed too. Also,
21167         remove inline_count (again, not used), and move slot so that it
21168         can share bits with some other flags. This saves 8 bytes in the
21169         structure and gives us about 50 kb back for mcs helloworld.cs
21170
21171         * *.[ch]: Do naming changes for the above.
21172
21173         * loader.c (mono_method_get_header): Lazily init the header
21174         on first access.
21175         (mono_get_method_from_token): don't init the header here
21176         (mono_free_method): the header may never be allocated
21177
21178         Overall, this saves 150 kb of unmanaged allocations
21179         for mcs helloworld.cs. That accounts for 10% of the unmanaged
21180         memory at runtime.
21181         
21182         * loader.c, loader.h (mono_method_get_header): new accessor.
21183
21184         * *.[ch]: use the above method. Prepares us to lazily load
21185         the header.
21186
21187         * *.[ch]: Clean up all the pesky warnings. gcc now only gives
21188         three warnings, which are actual bugs (see 69206).
21189
21190         * class-internals.h (MonoMethod): Remove remoting_tramp. It is
21191         unused. Saves a cool 4 bytes / method.
21192
21193 2004-11-06  Ben Maurer  <bmaurer@ximian.com>
21194
21195         * metadata.c (builtin_types): Add types for System.Object here.
21196         (mono_metadata_parse_type_full): Cache MonoType*'s that are
21197         for a class or valuetype from klass->this_arg or klass->byval_arg.
21198
21199         On mcs for a hello world, this gets us down from 21836 MonoType's
21200         to 14560.
21201
21202         (mono_metadata_free_type): Account for the above change.
21203
21204 2004-11-06  Zoltan Varga  <vargaz@freemail.hu>
21205
21206         * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an 
21207         exception instead of asserting if name is null.
21208         (ves_icall_System_AppDomain_GetData): Ditto.
21209
21210 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
21211
21212         (ves_icall_get_enum_info): Avoid crash when called on a non-finished
21213         EnumBuilder.
21214
21215         * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly): 
21216         Return NULL when the domain does not have entry_assembly set.
21217
21218         * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal): 
21219         Add a 'resource_modules' argument.
21220         (ves_icall_type_GetTypeCode): Fix typecode of byref types.
21221
21222         * reflection.c (mono_reflection_create_runtime_class): Move setting
21223         of wastypebuilder here, so mono_get_type_object () returns a MonoType
21224         for enums too.
21225
21226         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
21227         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
21228         Throw an ArgumentNullException if 'ptr' is null.
21229
21230         * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
21231         assemblies here. Fixes #69020.
21232
21233 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
21234
21235         * reflection.c (build_compressed_metadata): Fix the previous patch for
21236         big endian systems.  GUINT32_FROM_LE isn't needed on strlen and was overwriting
21237         the stack.
21238
21239 2004-11-04  Zoltan Varga  <vargaz@freemail.hu>
21240
21241         * assembly.c (mono_assembly_names_equal): Allow a match if one of
21242         the cultures is false. Fixes #69090.
21243
21244         * reflection.c (build_compressed_metadata): Fix invalid memory read 
21245         detected by valgrind.
21246         
21247         * reflection.c (mono_reflection_get_type): Avoid triggering a 
21248         TypeResolve multiple times for the same type. Fixes #65577.
21249
21250 2004-11-04  Ben Maurer  <bmaurer@ximian.com>
21251
21252         * marshal.c: Avoid using ldftn to call managed functions. It is
21253         much slower than just a call.
21254
21255         * reflection.c (mono_module_get_object): free the basename we
21256         allocate here from glib.
21257         
21258         * reflection.c (ensure_runtime_vtable): make sure to free
21259         overrides.  Also, we were allocating an array of MonoMethod not an
21260         array of MonoMethod*.
21261
21262         * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
21263
21264         * image.c (mono_image_close): free image->guid here.
21265
21266 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
21267
21268         * reflection.c: Fix some spec conformance issues with the PE file
21269         structures so mcs compiled apps run on the Net 2.0 beta.
21270
21271 2004-11-01  Zoltan Varga  <vargaz@freemail.hu>
21272
21273         * string-icalls.c (ves_icall_System_String_ctor_encoding): 
21274         Implement this. Fixes #67264.
21275
21276         * debug-helpers.h debug-helpers.c marshal.c: Move 
21277         mono_find_method_by_name to debug-helpers.c.
21278
21279 2004-10-31  Zoltan Varga  <vargaz@freemail.hu>
21280
21281         * object.c (mono_release_type_locks): type_initialization_hash is
21282         a GHashTable.
21283
21284         * reflection.c object.c object-internals.h: Fix warnings.
21285
21286         * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
21287         without accessors. Fixes #61561.
21288
21289         * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
21290         application base from the root domain if not set. Fixes #65641.
21291         (mono_runtime_init): Fix warning.
21292
21293 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21294
21295         * appdomain.c: call mono_thread_pool_init.
21296         * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
21297         of worker threads based on the number of CPUs and the environment
21298         variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
21299         for non-windows (windows) systems.
21300
21301 2004-10-27  Chris Toshok  <toshok@ximian.com>
21302
21303         * mono-debug-debugger.c (write_class): don't call mono_class_init
21304         here, as even with the check for (!klass->init_pending), we get
21305         into a situation where we're hitting cycles in class
21306         initialization.  Fixes #68816.
21307
21308 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
21309
21310         * image.c: Avoid overwriting values in the loaded_images_hash when an
21311         assembly is loaded multiple times. Fixes #61152.
21312
21313         * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
21314         so multiple satellite assemblies for the same name can be loaded.
21315         Fixes #68259.
21316
21317         * mono_domain_assembly_preload: Actually return the loaded assembly, 
21318         not NULL.
21319
21320         * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
21321         (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
21322
21323         * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
21324         pending finalizers are not invoked after the appdomain has been 
21325         unloaded. Fixes #67862.
21326
21327 2004-10-22  Martin Baulig  <martin@ximian.com>
21328
21329         * mono-debug-debugger.c
21330         (mono_debugger_runtime_invoke): Don't box valuetypes.
21331
21332 2004-10-22  Chris Toshok  <toshok@ximian.com>
21333
21334         * mono-debug-debugger.c (do_write_class): handle .cctors too, and
21335         don't hide private methods.
21336
21337 2004-10-22  Sebastien Pouliot  <sebastien@ximian.com>
21338
21339         * icall.c: Allows the runtime to "share" (when known) the public key
21340         token of an assembly. This avoid the need to recalculate the token 
21341         (from the public key) in managed code.
21342
21343 2004-10-21  Chris Toshok  <toshok@ximian.com>
21344
21345         * debug-helpers.c (append_class_name): argh, revert last patch.
21346         
21347 2004-10-21  Chris Toshok  <toshok@ximian.com>
21348
21349         * debug-helpers.c (append_class_name): use '+' as the delimiter,
21350         not '/', so that it matches what the debugger uses to look up
21351         methods.
21352
21353 2004-10-21  Martin Baulig  <martin@ximian.com>
21354
21355         * mono-debug-debugger.c (mono_debugger_throw_exception): New
21356         public method; this is called each time an exception is thrown and
21357         allows the debugger to use exception catch points.
21358
21359 2004-10-21  Martin Baulig  <martin@ximian.com>
21360
21361         * mono-debug-debugger.c (mono_debugger_handle_exception): Write
21362         the stack pointer and the exception object in some struct and pass
21363         that to the debugger.
21364
21365 2004-10-21  Chris Toshok  <toshok@ximian.com>
21366
21367         * mono-debug-debugger.c (do_write_class): add instance/static
21368         event support.  We don't expose "raise" or "other" yet.
21369         (event_is_static): new method.
21370
21371 2004-10-20  Bernie Solomon  <bernard@ugsolutions.com>
21372
21373         * mono-debug-debugger.c
21374         (mono_debugger_handle_exception): Remove
21375         bogus return value for fussy compilers.
21376
21377 2004-10-20  Martin Baulig  <martin@ximian.com>
21378
21379         * mono-debug-debugger.c
21380         (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
21381         (mono_debugger_handled_exception): Likewise.
21382
21383 2004-10-20  Martin Baulig  <martin@ximian.com>
21384
21385         * mono-debug-debugger.h (MonoDebuggerEvent): Added
21386         MONO_DEBUGGER_EVENT_EXCEPTION.
21387
21388         * mono-debug-debugger.c (mono_debugger_handle_exception): New
21389         public function to send the debugger a notification for an
21390         exception and inform it about a catch/finally clause.
21391
21392 2004-10-19  Zoltan Varga  <vargaz@freemail.hu>
21393
21394         * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
21395         Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
21396         fix 2.95 build. 
21397
21398         * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
21399
21400 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
21401
21402         * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
21403         marshalled as [In,Out]. Fixes #58325.
21404
21405 2004-10-14  Zoltan Varga  <vargaz@freemail.hu>
21406
21407         * reflection.c (mono_method_body_get_object): Implement some fields.
21408
21409 2004-10-12  Martin Baulig  <martin@ximian.com>
21410
21411         * reflection.c (mono_reflection_bind_generic_parameters): Small
21412         fix, correctly retrieve our parent from a generic instance.
21413
21414 2004-10-12  Martin Baulig  <martin@ximian.com>
21415
21416         * metadata.c (mono_metadata_generic_param_equal): We always have
21417         an owner.
21418
21419         * class.c
21420         (mono_class_from_generic_parameter): We need to have an owner.
21421         (my_mono_class_from_generic_parameter): Likewise.
21422
21423         * reflection.c (mono_reflection_setup_generic_class): Renamed to
21424         mono_reflection_create_generic_class() and added a new
21425         mono_reflection_setup_generic_class().  
21426         (mono_reflection_initialize_generic_param): If we're a nested
21427         generic type and inherited from the containing class, set our
21428         owner to the outer class.
21429
21430 2004-10-11  Zoltan Varga  <vargaz@freemail.hu>
21431
21432         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
21433
21434         * reflection.c (mono_method_body_get_object): New function to create
21435         a MethodBody object.
21436
21437         * object-internals.h object.h: Add MonoReflectionMethodBody structure.
21438
21439 2004-10-11  Martin Baulig  <martin@ximian.com>
21440
21441         * metadata.c (_mono_metadata_type_equal): Renamed to
21442         do_mono_metadata_type_equal() and made static.
21443
21444 2004-10-11  Martin Baulig  <martin@ximian.com>
21445
21446         * appdomain.c: Bump corlib version number to 28.
21447
21448 2004-10-10  Martin Baulig  <martin@ximian.com>
21449
21450         * class-internals.h
21451         (MonoGenericInst): Added `MonoGenericContainer *container'.
21452         (MonoGenericMethod): Likewise.
21453         (MonoGenericContext): Likewise.
21454         (MonoGenericParam): Added `MonoGenericContainer *owner'.
21455
21456         * metadata.c
21457         (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
21458         (do_mono_metadata_parse_generic_inst): Likewise.
21459         (mono_metadata_parse_type_full): New public method.  This is the actual
21460         mono_metadata_parse_type() implementation - with an additional
21461         `MonoGenericContainer *' argument.
21462         (mono_metadata_parse_array_full): Likewise.
21463         (mono_metadata_parse_signature_full): Likewise.
21464         (mono_metadata_parse_method_signature_full): Likewise.
21465         (mono_metadata_parse_mh_full): Likewise.
21466         (mono_type_create_from_typespec): Likewise.
21467         (mono_metadata_interfaces_from_typedef_full): New public method;
21468         this is similar to the other _full() methods, but we take a
21469         `MonoGenericContext *' since we have to pass it to mono_class_get_full().
21470         (mono_metadata_parse_generic_param): Take an additional
21471         `MonoGenericContainer *' argument and lookup the MonoGenericParam
21472         from that container.
21473         (mono_metadata_generic_param_equal): New static method to compare
21474         two type parameters.
21475         (_mono_metadata_type_equal): New static method; takes an
21476         additional `gboolean signature_only' argument - if true, we don't
21477         compare the owners of generic parameters.
21478         (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
21479         with a TRUE argument - do a signature-only comparision.
21480
21481         * loader.c: Use the new _full() methods and pass the
21482         MonoGenericContainer to them.
21483
21484         * object-internals.h (MonoReflectionTypeBuilder): Added
21485         `MonoGenericContainer *generic_container' field.
21486         (MonoReflectionMethodBuilder): Likewise.
21487
21488 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
21489
21490         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
21491         case initial images of dynamic assemblies.
21492
21493         * reflection.c (mono_image_basic_init): Set 'initial_image' field.
21494
21495         * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
21496
21497         * reflection.c (mono_reflection_event_builder_get_event_info): Fix
21498         length of event->other array.
21499         (typebuilder_setup_events): Ditto.
21500
21501         * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
21502         'assembly_by_name' and add an 'assemblies' list.
21503
21504         * assembly.h assembly.c: Add a new search hook for determining whenever
21505         an assembly is already loaded. Use this instead of searching in the
21506         loaded_assemblies list.
21507
21508         * domain.c appdomain.c: Implement the new search hook so loaded 
21509         assemblies are now scoped by appdomain. Fixes #67727.
21510
21511 2004-10-07  Zoltan Varga  <vargaz@freemail.hu>
21512
21513         * threads.c (mono_thread_attach): Initialize synch_lock field so
21514         mono_thread_detach works again.
21515
21516         * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
21517         'lib' too. Fixes #63130.
21518
21519 2004-10-06  Jackson Harper  <jackson@ximian.com>
21520
21521         * culture-info-tables.h: regenerated.
21522
21523 2004-10-06  Zoltan Varga  <vargaz@freemail.hu>
21524
21525         * icall.c (ves_icall_Type_GetInterfaces): Include interfaces 
21526         implemented by other interfaces in the result. Fixes #65764.
21527         
21528         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
21529         Handle unloadable modules without crashing.
21530
21531         * image.c (load_modules): Revert the previous patch since modules must
21532         have a fixed index inside the array.
21533         
21534         * image.c (load_modules): Don't include native modules in the modules
21535         array.
21536
21537 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
21538
21539         * reflection.h: Add param_defaults field.
21540
21541         * reflection.c: Add support for parameter defaults in dynamic methods.
21542         Fixes #64595.
21543
21544         * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
21545         an empty string when a type has no namespace. Fixes #64230.
21546
21547 2004-10-04  Sebastien Pouliot  <sebastien@ximian.com>
21548
21549         * tabledefs.h: Added "internal" security actions to support non-CAS
21550         permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance. 
21551         Note: they do not seems to be used anymore in 2.0 (new metadata format)
21552
21553 2004-10-04  Zoltan Varga  <vargaz@freemail.hu>
21554
21555         * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
21556         constructor of abstract class. Fixes #61689.
21557
21558 2004-10-04  Martin Baulig  <martin@ximian.com>
21559
21560         * class-internals.h (MonoGenericContainer): New type.
21561         (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
21562         `MonoGenericContainer *generic_container'.
21563         (MonoClass): Replaced `gen_params' and `num_gen_params' with
21564         `MonoGenericContainer *generic_container'.
21565
21566         * metadata.c (mono_metadata_load_generic_params): Return a
21567         `MonoGenericContainer *' instead of a `MonoGenericParam *';
21568         removed the `num' argument.
21569
21570 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
21571
21572         * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
21573         for dynamic images.
21574
21575         * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
21576         machine fields.
21577
21578         * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
21579
21580         * reflection.c: Save pe_kind and machine values into the generated
21581         image file.
21582
21583         * appdomain.c: Bump corlib version number.
21584
21585         * object-internals.h: Reorganize layout of LocalBuilder.
21586
21587         * class-internals.h class.c (mono_class_get_implemented_interfaces): 
21588         New helper function.
21589
21590         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
21591         created MonoType for dynamic types. Fixes #66180.
21592
21593 2004-10-02  Ben Maurer  <bmaurer@ximian.com>
21594
21595         * threadpool.c: the ares hashtable needs a critical section around it.
21596         this prevents some nasty segfaults
21597
21598 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
21599
21600         * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
21601         on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
21602         bug 67324).
21603         
21604 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
21605
21606         * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
21607         
21608 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
21609
21610         * image.c: Always canonicalize image file names, to avoid loading
21611         the same assembly twice when referenced using a relative path.
21612
21613 2004-09-30  Zoltan Varga  <vargaz@freemail.hu>
21614
21615         * marshal.h marshal.c icall.c: Fix bugs in previous patch.
21616
21617         * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
21618
21619         * marshal.c: Fix warnings.
21620
21621 2004-09-29  Geoff Norton  <gnorton@customerdna.com>
21622
21623         * marshal.c (mono_ftnptr_to_delegate): This method was improperly
21624         attempting to marshal the delegate_trampoline as the method_addr.
21625         This patch has a static hashtable of marshalled delegates so that 
21626         we can map delegate_trampoline addresses back to delegates.  This
21627         allows a delegate passed to managed code to be passed back into native
21628         code.  Fixes #67039
21629
21630 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
21631
21632         * icall.c: Add GetFunctionPointerForDelegateInternal icall.
21633
21634         * reflection.c (method_encode_code): Align method headers properly.
21635         Fixes #66025.
21636
21637 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
21638
21639         * marshal.c: In the runtime invoke wrapper, reset the abort
21640         exception if it is cached. This avoids the automatic rethrowal of 
21641         the exception after the catch of the wrapper. Also check for pending
21642         interruptions before calling the managed method. This is done using
21643         the new method emit_thread_force_interrupt_checkpoint, since the
21644         normal checkpoint method is ignored when running the invoke wrapper.
21645         * object.c: If the abort exception is rethrown, set the abort_exc
21646         field of the thread, so it will be rethrown aftere every catch.
21647         * threadpool.c: Only run an interruption checkpoint if what has been
21648         requested is a stop of the thread (aborts will be ignored).
21649         * threads.c: By default, a thread will now never be interrumped while
21650         running the runtime invoke wrapper (this ensures that runtime_invoke
21651         will always return to the caller if an exception pointer is provided).
21652         There is a new special method mono_thread_force_interruption_checkpoint()
21653         to force an interruption checkpoint even if running a protected
21654         wrapper, which is used by the same runtime invoke wrapper to do a check
21655         at a safe point.
21656
21657 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
21658
21659         * object.c, object-internals.h: Implemented mono_release_type_locks,
21660         which releases the cctor locks held by a thread.
21661         * threads.c, threads.h: In thread_cleanup, release cctor locks held
21662         by a thread. Added mono_thread_exit() method to be used to safely stop
21663         a thread.
21664
21665 2004-09-28  Raja R Harinath  <rharinath@novell.com>
21666
21667         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): 
21668         Move null check before dereference.  Avoid indexing beyond the end
21669         of the 'modules' array.
21670
21671 2004-09-28  Raja R Harinath  <rharinath@novell.com>
21672
21673         * metadata-internals.h (MonoImage): Add module_count field.
21674         * image.c (load_modules): Set image->module_count.
21675         (mono_image_load_file_for_image): Use image->module_count.
21676         * reflection.c (mono_image_load_module): Append to image->modules array 
21677         of dynamic assembly.
21678         (mono_module_get_object): Fix loop to actually increment index.
21679         Use image->module_count.
21680         * assembly.c (mono_assembly_load_references): Use image->module_count.
21681         * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
21682         Likewise.
21683
21684 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
21685
21686         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): 
21687         Avoid assert on generic types.
21688
21689 2004-09-26  Zoltan Varga  <vargaz@freemail.hu>
21690
21691         * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
21692
21693         * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
21694
21695         * reflection.c (mono_reflection_marshal_from_marshal_spec): New 
21696         function to convert a MarshalSpec structure to its managed counterpart.
21697
21698         * reflection.c: Fix warnings.
21699         
21700         * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
21701         field.
21702
21703         * icall.c (mono_create_icall_signature): Fix build.
21704
21705 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
21706
21707         * icall.c: Add MakePointType icall.
21708
21709         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
21710         warnings.
21711
21712 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21713
21714         * threadpool.c: reuse allocated slots in the queue.
21715
21716 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
21717
21718         * object-internals.h (MonoReflectionDllImportAttribute): New structure.
21719
21720         * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
21721
21722         * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
21723         previous change.
21724
21725         * tabledefs.h: Add constants for pinvoke attributes BestFit and
21726         ThrowOnUnmappableChar.
21727
21728         * icall.c (ves_icall_Type_GetPacking): New icall.
21729
21730 2004-09-24  Martin Baulig  <martin@ximian.com>
21731
21732         * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
21733
21734 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21735
21736         * appdomain.c:
21737         (mono_domain_set): allow setting a domain that is being unloaded.
21738         (mono_domain_unload): invoke the DomainUnload callbacks in the domain
21739         being unloaded.
21740
21741 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
21742
21743         * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
21744         the GetCustomAttributes icall.
21745
21746 2004-09-23  Martin Baulig  <martin@ximian.com>
21747
21748         * object-internals.h (MonoReflectionGenericParam): Replaced
21749         'has_ctor_constraint', `has_reference_type' and `has_value_type'
21750         with `guint32 attrs'.
21751
21752 2004-09-23  Martin Baulig  <martin@ximian.com>
21753
21754         * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
21755
21756 2004-09-23  Martin Baulig  <martin@ximian.com>
21757
21758         * object-internals.h (GenericParameterAttributes): New enum.
21759
21760 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
21761
21762         * object-internals.h (MonoEventInfo): Add 'other_methods' field.
21763         
21764         * class.c (init_events): Fill out event->other field.
21765
21766         * class.c: Fix warnings.
21767
21768         * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
21769
21770 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
21771
21772         * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
21773         walk which doesn't supply the IL offset.
21774
21775 2004-09-22  Martin Baulig  <martin@ximian.com>
21776
21777         * reflection.c (mono_reflection_setup_internal_class): If we're
21778         System.ValueType, System.Object or System.Enum, set
21779         `klass->instance_size' and create the vtable.
21780         (mono_reflection_create_internal_class): If we're an enum type,
21781         get the base class from our current corlib.
21782
21783 2004-09-22  Zoltan Varga  <vargaz@freemail.hu>
21784
21785         * reflection.h (MonoResolveTokenError): New type.
21786
21787         * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
21788         icall.
21789
21790         * icall.c: Add an 'error' argument to the ResolveToken icalls.
21791
21792 2004-09-22  Lluis Sanchez Gual  <lluis@novell.com>
21793
21794         * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
21795         Support also calling constructors, but only for already allocated objects.
21796
21797 2004-09-17  Geoff Norton <gnorton@customerdna.com>
21798
21799         * reflection.c (type_get_qualified_name): If the klass is null
21800         return the typename to avoid a NullRefEx.
21801         (encode_cattr_value): Get the qualified name of the boxed type,
21802         not the underlying enumtype.  Fixes #62984.
21803
21804 2004-09-21  Zoltan Varga  <vargaz@freemail.hu>
21805
21806         * marshal.c: Fix problems with previous checkin.
21807
21808 2004-09-21    <vargaz@freemail.hu>
21809
21810         * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
21811         existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
21812
21813         * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
21814
21815 2004-09-21  Geoff Norton <gnorton@customerdna.com>
21816
21817         * icall.c (ves_icall_MonoType_GetElementType): GetElementType
21818         should only return a type for pointers, arrays, and passbyref types.
21819         Fixes bug #63841.
21820
21821 2004-09-21  Martin Baulig  <martin@ximian.com>
21822
21823         * domain.c (mono_debugger_check_runtime_version): New public
21824         function.
21825
21826         * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.    
21827
21828 2004-09-20  Sebastien Pouliot  <sebastien@ximian.com>
21829
21830         * reflection.c: Added missing sort to the declarative security 
21831         attributes table. MS implementation stops seeing the attributes if the
21832         token number regress in the table (as shown by ildasm and permview).
21833
21834 2004-09-20  Zoltan Varga  <vargaz@freemail.hu>
21835
21836         * object-internals.h (MonoReflectionModule): Add 'token' field.
21837         
21838         * reflection.c (mono_reflection_get_token): Add support for Module
21839         and Assembly.
21840         (mono_module_get_object): Set 'token' field.
21841         (mono_module_file_get_object): Set 'token' field.
21842
21843         * icall.c: Add new Assembly and Module icalls.
21844
21845         * appdomain.c: Bump corlib version.
21846
21847 2004-09-19  Zoltan Varga  <vargaz@freemail.hu>
21848
21849         * loader.h loader.c class.h class.c: Add helper functions for obtaining
21850         tokens of metadata objects.
21851
21852         * reflection.h reflection.c (mono_reflection_get_token): New function
21853         to obtain the token of a metadata object.
21854
21855         * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
21856
21857 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
21858
21859         * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
21860         
21861         * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
21862
21863 2004-09-16  Sebastien Pouliot  <sebastien@ximian.com>
21864
21865         * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
21866         * object-internals.h: Added 3 MonoArray* members to MonoReflection
21867         AssemblyBuilder to access the permissions set in the class lib.
21868         * reflection.c: Added security attributes encoding step in 
21869         mono_image_build_metadata.
21870         * tabledefs.h: Added new security actions defined in 2.0:
21871         LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
21872
21873 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
21874
21875         * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
21876         macro parameter.
21877
21878 2004-09-16  Lluis Sanchez Gual  <lluis@novell.com>
21879  
21880         * locales.c: nullify the ICU_collator member of CompareInfo when it is
21881           finalized. There where random SIGSEVs at program termination, when
21882           an object being finalized was trying to do a string comparison and
21883           the current culture was already finalized.
21884  
21885 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21886
21887         * threads.c: call thread_cleanup before finishing the thread if we get
21888         there.
21889
21890 2004-09-16  Zoltan Varga  <vargaz@freemail.hu>
21891
21892         * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
21893         assemblies from the parent. Fixes #65665.
21894
21895 2004-09-15  Zoltan Varga  <vargaz@freemail.hu>
21896
21897         * metadata.c (mono_metadata_parse_type): Fix parsing of custom
21898         modifiers.
21899
21900 2004-09-14  Bernie Solomon  <bernard@ugsolutions.com>
21901
21902         * reflection.h: add prototype for mono_get_dbnull_object
21903         * reflection.c: add prototypes for get_default_param_value_blobs 
21904         and mono_get_object_from_blob for fussier compilers
21905
21906 2004-09-14  Lluis Sanchez Gual  <lluis@novell.com>
21907  
21908         * object.c: Added a "done" flag to TypeInitializationLock. This avoids
21909         false deadlock checks in class initialization.
21910  
21911 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
21912
21913         * image.c (mono_image_addref): Fix comment.
21914
21915         * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
21916         possible.
21917
21918 2004-09-12  Jambunathan K  <kjambunathan@novell.com>
21919
21920         * reflection.c (mono_param_get_objects): Modified to return
21921         ParameterInfo.DefaultValue object.
21922
21923         (get_default_param_value_blobs):
21924         (mono_get_object_from_blob):
21925         (mono_get_dbnull_object): New helper routines. 
21926
21927         * object.c (mono_get_constant_value_from_blob): New helper routine
21928         carved out from get_default_field_value ()
21929
21930         * object-internals.h (mono_get_constant_value_from_blob): Added
21931         function declaration.
21932
21933 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
21934
21935         * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load 
21936         referenced assemblies. Fixes #62135.
21937
21938         * exception.h exception.c (mono_get_exception_file_not_found2): New
21939         helper function.
21940
21941 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
21942
21943         * class.h class.c: Add mono_type_get_underlying_type ().
21944
21945 2004-09-09  Geoff Norton <gnorton@customerndna.com>
21946
21947         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
21948         Fix GetTypes() to support dynamically created assemblies.
21949
21950 2004-09-09  Zoltan Varga  <vargaz@freemail.hu>
21951
21952         * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
21953         
21954         * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
21955         previous patch.
21956
21957         * reflection.h reflection.c loader.c: Allow dynamic construction of
21958         pinvoke methods. Fixes #65571.
21959         
21960         * reflection.c (mono_reflection_get_type): Revert previous change since
21961         it causes regressions.
21962
21963 2004-09-08  Martin Baulig  <martin@ximian.com>
21964
21965         * class.c (class_compute_field_layout): Don't call
21966         mono_class_layout_fields() for open generic instances.
21967
21968 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
21969         * threads.c appdomain.c: fix typo in GC macro
21970
21971 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21972
21973         * threads.c: don't call mono_thread_detach() in start_wrapper(),
21974         avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
21975
21976 2004-09-08  Zoltan Varga  <vargaz@freemail.hu>
21977
21978         * image.c (mono_image_close): Applied patch from 
21979         vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
21980         assembly is loaded multiple times from data.
21981         
21982         * image.c (mono_image_open): Fix warning.
21983
21984 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
21985
21986         * reflection.h reflection.c icall.c: Only call TypeResolve handlers
21987         once. Fixes #58334.
21988         
21989         * reflection.c (mono_reflection_create_runtime_class): Initialize
21990         klass->nested_classes. Fixes #61224.
21991
21992 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
21993
21994         * threads.c: sched_yield() on exit, to allow threads to quit.
21995
21996 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
21997
21998         * object.c (mono_unhandled_exception): Remove leftover debug code.
21999
22000 2004-09-07  Atsushi Enomoto  <atsushi@ximian.com>
22001
22002         * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
22003
22004 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
22005
22006         * marshal.c (emit_marshal_array): Really null terminate string arrays.
22007         
22008         * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
22009
22010 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22011
22012         * marshal.c (emit_marshal_array): Null terminate string arrays.
22013         
22014         * marshal.c (raise_auto_layout_exception): Fix warning.
22015
22016         * reflection.c (mono_param_get_objects): Initialize the default value
22017         with DBNull.Value, not null. Fixes #62123.
22018
22019 2004-09-01  Miguel de Icaza  <miguel@ximian.com>
22020
22021         * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
22022         throw an exception with a cute explanation.
22023
22024 2004-09-06  Dick Porter  <dick@ximian.com>
22025
22026         * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
22027         Close the new process's thread handle, as we don't use it.  The
22028         handle stays around forever otherwise.
22029
22030 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22031
22032         * object.c (arith_overflow): Fix warning.
22033
22034         * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
22035         calling conventions in method refs. Fixes #65352.
22036
22037         * reflection.c: Fix warnings.
22038
22039 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
22040
22041         * icall.c: Add a new icall for Array.Clear
22042
22043 2004-09-06 Ben Maurer  <bmaurer@users.sourceforge.net>
22044
22045         * object.c: When allocating an array, we have to throw
22046         an overflow exception if any of the lengths are < 0.
22047
22048 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
22049
22050         * marshal.h marshal.c: Free unmanaged memory allocated by managed code
22051         properly. Also move implementation of string array marshalling to 
22052         managed code. Fixes #42316.
22053
22054 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22055
22056         * assembly.c: provide more information when loading an assembly fails.
22057
22058 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22059
22060         * filewatcher.c: don't expect the development fam package to be
22061         installed.
22062
22063 2004-09-03  Zoltan Varga  <vargaz@freemail.hu>
22064
22065         * marshal.c: Make a copy of the signature cookie since it will be
22066         freed by the caller.
22067         
22068         * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
22069
22070         * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
22071
22072         * metadata.c (mono_metadata_free_marshal_spec): New function to free
22073         marshal specs.
22074
22075         * marshal.c: More refactoring.
22076         
22077         * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
22078         smaller functions.
22079
22080 2004-09-03  Lluis Sanchez Gual  <lluis@novell.com>
22081
22082         * object.c: In mono_message_invoke, fill the output parameter array after
22083           calling the managed method (it was done before the call). This fixes
22084           bug #59299.
22085
22086 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
22087
22088         * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
22089         as well.
22090
22091 2004-09-02  Martin Baulig  <martin@ximian.com>
22092
22093         * class.c (mono_class_instance_size): Don't allow generic type
22094         definitions or open generic instances.
22095         (mono_class_array_element_size): If we're a value type, call
22096         mono_class_instance_size() on the original class.
22097
22098         * metadata.c (mono_type_size, mono_type_stack_size): Correctly
22099         handle generic instances.
22100
22101         * mono-debug-debugger.c (write_type): Handle generic instances
22102         like classes.
22103
22104 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
22105
22106         * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
22107         the allocation request fails. Fixes #65089.
22108
22109         * object.c (mono_runtime_free_method): Do not call mono_free_method.
22110         
22111         * object.c (mono_runtime_free_method): New function to free a dynamic
22112         method.
22113
22114         * marshal.c (mono_delegate_free_ftnptr): New function to free the
22115         delegate trampoline.
22116
22117         * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
22118         with hasthis as dynamic,
22119
22120         * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
22121
22122         * domain.c (mono_jit_info_table_remove): New function to remove an
22123         entry from the jit info table.
22124
22125         * class-internals.h (MonoMethod): Add 'dynamic' field.
22126
22127         * loader.c: Fix warnings.
22128
22129 2004-09-01  Martin Baulig  <martin@ximian.com>
22130
22131         * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
22132         instead of mono_debugger_lock() because the latter one is a no-op
22133         unless running in the debugger.
22134
22135 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
22136
22137         * class.c (class_compute_field_layout): Classes with auto-layout or
22138         reference fields are not blittable.
22139         
22140 2004-09-01  Dick Porter  <dick@ximian.com>
22141
22142         * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
22143         mono_image_get_filename() to get the assembly location.
22144
22145         * icall.c:
22146         * metadata.h: Fix compile warnings
22147
22148 2004-09-01  Zoltan Varga  <vargaz@freemail.hu>
22149
22150         * class.c (class_compute_field_layout): System.Object is blittable.
22151
22152         * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
22153         as in/out. Fixes #59909.
22154
22155 2004-09-01  Martin Baulig  <martin@ximian.com>
22156
22157         * metadata.h (MONO_TYPE_ISREFERENCE): Call
22158         mono_metadata_generic_inst_is_valuetype() if we're a generic
22159         instance to check whether our underlying type is a reference type.
22160
22161 2004-09-01  Martin Baulig  <martin@ximian.com>
22162
22163         * metadata.c (mono_type_size): If we're a generic instance, call
22164         mono_class_value_size() for value types.
22165
22166 2004-08-31  Zoltan Varga  <vargaz@freemail.hu>
22167
22168         * marshal.c: Implement more custom marshalling functionality. Fixes
22169         #64915.
22170
22171 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22172
22173         * mono-debug.c, debug-mono-symfile.c: add some locking love.
22174
22175 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
22176
22177         * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
22178
22179         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
22180
22181         * icall.c: Fix some warnings.
22182
22183         * threads.c (abort_appdomain_thread): Fix unref errors.
22184         (mono_thread_current): Fix THREAD_DEBUG define.
22185
22186 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
22187
22188         * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
22189
22190         * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
22191
22192 2004-08-28  Zoltan Varga  <vargaz@freemail.hu>
22193
22194         * marshal.c (mono_marshal_get_native_wrapper): Add support for byref 
22195         string arrays.
22196
22197 2004-08-28  Martin Baulig  <martin@ximian.com>
22198
22199         * metadata.c
22200         (mono_metadata_generic_inst_is_valuetype): New public function.
22201
22202         * metadata.h (MONO_TYPE_ISSTRUCT): Call
22203         mono_metadata_generic_inst_is_valuetype() if we're a generic
22204         instance to check whether our underlying type is a valuetype.
22205
22206 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
22207
22208         * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
22209         #63768.
22210
22211 2004-08-25  Martin Baulig  <martin@ximian.com>
22212
22213         * loader.c (mono_get_method_from_token): Abstract methods can also
22214         be generic and thus have type parameters.
22215
22216         * metadata-internals.h
22217         (MonoDynamicImage): Added `GPtrArray *gen_params'.
22218
22219         * reflection.c (mono_image_get_generic_param_info): Don't create a
22220         metadata row, just add an entry to the `gen_params' array.
22221         (build_compressed_metadata): Sort the `gen_params' array and then
22222         actually create the metadata.
22223
22224 2004-08-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22225
22226         * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
22227
22228 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
22229
22230         * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
22231
22232 2004-08-24  Martin Baulig  <martin@ximian.com>
22233
22234         * class.cs (mono_class_is_subclass_of): Like an interface, a
22235         generic instance also derives from System.Object.
22236
22237 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
22238
22239         * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
22240         custom modifiers to be in any order. Fixes #61990.
22241
22242 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
22243
22244         * object.c: Register mono_object_new_fast icall.
22245         
22246         * object.c (mono_class_get_allocation_ftn): Return to calling
22247         mono_object_new_fast, since it seems faster to compute the object 
22248         size in unmanaged code than passing it as a parameter.
22249
22250         * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
22251
22252         * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
22253         this function with Boehm as the oom handler, so we don't have to check
22254         the result of GC_malloc.
22255
22256         * object.c: Remove checks for oom.
22257
22258         * object.h object.c (mono_class_get_allocation_ftn): New function to
22259         return the icall which can be used to allocate an instance of a given
22260         class. 
22261
22262         * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
22263
22264         * class-internals.h: Add 'enabled' field.
22265
22266 2004-08-19  Zoltan Varga  <vargaz@freemail.hu>
22267
22268         * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
22269
22270 2004-08-18  Jambunathan K  <kjambunathan@novell.com>
22271         * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
22272         value 0x0010.
22273
22274 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
22275
22276         * appdomain.c: use the Tls function for appdomain too,
22277         at Zoltan's request. Actually return in mono_context_get
22278
22279         * appdomain.c, profiler.c, threads.c: use __thread
22280
22281 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
22282
22283         * appdomain.c threads.c: Call GC_CreateThread on windows.
22284
22285         * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
22286         multiple libraries since this don't work on windows.
22287
22288 2004-08-18  Martin Baulig  <martin@ximian.com>
22289
22290         * class-internals.h
22291         (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
22292         MonoMethodHeader.
22293
22294         * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
22295         MonoMethodNormal since we also need it for abstract and interface
22296         methods.
22297
22298         * reflection.c
22299         (build_compressed_metadata): Sort the GenericParam table.
22300         (mono_image_create_token): Added `gboolean create_methodspec'
22301         argument; this is false when generating a MethodImpl token.
22302         (reflection_methodbuilder_to_mono_method): Abstract and interface
22303         methods may also have generic parameters.
22304
22305 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22306
22307         * appdomain.c: thread local alloc
22308
22309 2004-08-17  Martin Baulig  <martin@ximian.com>
22310
22311         * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
22312
22313         * icall.c
22314         (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
22315         argument.
22316
22317         * class.c (mono_type_get_full_name): New public function.
22318         (mono_type_get_name): Don't include the type arguments.
22319
22320 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
22321
22322         * Makefile.am: Build static versions of libmetadata and libmonoruntime
22323         for inclusion into the mono executable.
22324
22325 2004-08-16  Martin Baulig  <martin@ximian.com>
22326
22327         * metadata.c (do_mono_metadata_parse_generic_inst): Store the
22328         MonoGenericInst, not the MonoType in the `generic_inst_cache'.
22329
22330 2004-08-14  Martin Baulig  <martin@ximian.com>
22331
22332         * class.c (dup_type): Also copy the `byref' field.
22333
22334 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
22335
22336         * reflection.c (create_dynamic_mono_image): Revert the last change 
22337         since it breaks bootstrap.
22338
22339 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22340
22341         * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
22342
22343         * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
22344         not free them with g_free.
22345
22346 2004-08-11  Martin Baulig  <martin@ximian.com>
22347
22348         * reflection.c (mono_reflection_setup_internal_class): Also call
22349         mono_class_setup_mono_type() if we already have a `tb->type.type'.
22350
22351 2004-08-09  Sebastien Pouliot  <sebastien@ximian.com>
22352
22353         * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when 
22354         called during default (first) AppDomain creation. Keep track of
22355         Evidence when loading assemblies.
22356
22357 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22358
22359         * opcodes.c, opcodes.h: reduce runtime relocations.
22360
22361 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22362
22363         * culture-info.h, locales.c: fixes and chages to sue the new
22364         optimized format of the locale data.
22365         * culture-info-tables.h: regenerated.
22366
22367 2004-08-06  Geoff Norton <gnorton@customerdna.com>
22368         
22369         * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
22370
22371 2004-08-05  Sebastien Pouliot  <sebastien@ximian.com>
22372
22373         * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
22374         ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
22375         * domain-internals.h: icall declaration.
22376         * icall.c: icall registration.
22377         * object-internals.h: New fields in MonoAssembly for CAS.
22378
22379 2004-08-05  Duncan Mak  <duncan@ximian.com>
22380
22381         * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
22382         CEE_LDELEM_ANY.
22383
22384 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
22385
22386         * reflection.c: fix to deal with object[] arrays in custom ctors
22387         (bug #62550).
22388
22389 2004-08-05  Martin Baulig  <martin@ximian.com>
22390
22391         * class.c (mono_class_array_element_size): Added support for
22392         generic instances and correctly handle "recursive" types.
22393
22394 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22395
22396         * assembly.c: Fix warnings.
22397
22398 2004-08-04  Martin Baulig  <martin@ximian.com>
22399
22400         * class.c
22401         (mono_type_get_name_recurse): Added `gboolean include_arity'
22402         argument specifying whether or not we should include the generic
22403         arity in the type name.
22404         (_mono_type_get_name): New static function.
22405         (mono_class_setup_vtable): If we're a generic instance, don't
22406         include the generic arity in the names of explicit method
22407         implementations.        
22408
22409 2004-08-03  Martin Baulig  <martin@ximian.com>
22410
22411         * class.c (mono_type_get_name_recurse): Enclose the generic type
22412         arguments in `<', '>'.
22413
22414 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22415
22416         * gc.c: make GC warning messages use the trace API, they are just
22417         noise to most of the users.
22418
22419 2004-08-03  Martin Baulig  <martin@ximian.com>
22420
22421         * debug-mono-symfile.c (read_string): Correctly read the string.
22422
22423 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22424
22425         * marshal.c (signature_dup_add_this): Fix bug in previous patch.
22426         
22427         * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
22428         icalls.
22429         (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
22430
22431 2004-07-30  Martin Baulig  <martin@ximian.com>
22432
22433         * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
22434         Reflect latest symbol writer changes.   
22435
22436 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22437
22438         * object.c: always create an object if null is passed
22439         to Invoke() where a valuetype is expected.
22440
22441 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
22442
22443         * marshal.c (mono_marshal_init): make managed
22444         signatures match native ones better for 64bits.
22445
22446 2004-07-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22447
22448         * appdomain.c: hack to build correctly the private bin path on windows.
22449         Fixes bug #61991.
22450
22451 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
22452
22453         * assembly.c: Load mscorlib from the correct framework directory
22454           (mono/<version>/mscorlib.dll).
22455         * appdomain.h: Added prototypes for new functions.
22456         * internals.h: Added some prototypes.
22457         * domain.c: When initializing the runtime, get from the executable and
22458           the configuration files the runtime version that the app supports.
22459           Added support methods for reading app.exe.config. Added list of versions
22460           supported by the JIT. Added two new methods: mono_init_from_assembly,
22461           which initializes the runtime and determines the required version from
22462           the provided exe file, and mono_init_version, which initializes
22463           the runtime using the provided version.
22464         * icall.c: Get machine.config from version-specific directory.
22465         * reflection.c: When generating an image, embed the version number
22466           of the current runtime.
22467
22468 2004-07-28  Dick Porter  <dick@ximian.com>
22469
22470         * socket-io.c
22471         (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
22472         returned sockaddr size before creating the remote address object.
22473         Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
22474         61608.
22475
22476 2004-07-28  Dick Porter  <dick@ximian.com>
22477
22478         * locales.c (string_invariant_compare_char): Fix invariant char
22479         compares between upper and lower cases.  Fixes bug 61458.
22480
22481 2004-07-27  Ben Maurer  <bmaurer@ximain.com>
22482         
22483         * marshal.c: actually cache stelem.ref wrappers.
22484         
22485 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22486
22487         * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image 
22488         sections and remove the mono_cli_rva_map () function.
22489
22490 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22491
22492         * debug-mono-symfile.c: fix one more endianess issue, from a patch
22493         by Geoff Norton (<gnorton@customerdna.com>).
22494
22495 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
22496
22497         * class.c: fix class loads for pointer types (typeof(int) !=
22498         typeof(int*)).
22499
22500 2004-07-27  Martin Baulig  <martin@ximian.com>
22501
22502         * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
22503         reading the debugging information from an external ".mdb" file.
22504
22505 2004-07-24  Martin Baulig  <martin@ximian.com>
22506
22507         * reflection.c (mono_image_get_type_info): Only write a class
22508         layout entry if we actually have a size or a packing size.
22509
22510 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
22511
22512         * reflection.c (type_get_fully_qualified_name): 
22513         insert cast to get type checking of ?: with non-gcc compilers
22514
22515 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
22516
22517         * rand.c: use g_getenv for both lookups of
22518         MONO_EGD_SOCKET
22519
22520 2004-07-17  Martin Baulig  <martin@ximian.com>
22521
22522         * reflection.c (mono_reflection_bind_generic_method_parameters):
22523         Set `gmethod->reflection_info'.
22524
22525 2004-07-17  Martin Baulig  <martin@ximian.com>
22526
22527         * class.c (mono_class_create_from_typedef): Insert the newly
22528         created class into the hash table before computing the interfaces
22529         since we could be called recursively.
22530
22531 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
22532
22533         * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
22534         function to implement stelem.ref in managed code
22535         * class-internals.h, debug-helpers.c: a new wrapper type
22536         for the above.
22537
22538 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
22539
22540         * gc.c: allow GC handles to work even when no GC is compiled in.
22541         Fix part of bug #61134 (GetAddrOfPinnedObject).
22542
22543 2004-07-13  Peter Williams  <peter@newton.cx>
22544  
22545         * process.c (complete_path): Make sure we don't attempt to execute
22546         directories.
22547  
22548 2004-07-12  Geoff Norton <gnorton@customerdna.com>
22549
22550         * DateTime.cs: Patch for bug #61112.  Our DateTime wasn't roundtripping over timezone
22551           boundaries properly.  This patch checkes ToLocalTime() to see if we're tripping over a boundary
22552           and will add/subtract the hour if needed
22553
22554 2004-07-12  Martin Baulig  <martin@ximian.com>
22555
22556         * reflection.c (mono_field_get_object): If we have
22557         `field->generic_info', take the attributes from
22558         `field->generic_info->generic_type'.    
22559
22560 2004-07-12  Martin Baulig  <martin@ximian.com>
22561
22562         * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
22563         This function must be called before initializing the runtime.
22564         (mono_debug_init_1): New function; call this after initializing
22565         the runtime, but before loading the assembly.  It tells the
22566         debugger to load corlib and the builtin types.
22567
22568         * mono-debug-debugger.c: Did some larger changes in the debugging
22569         code; support recursive class declarations, make sure we actually
22570         add all classes.
22571
22572 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22573
22574         * debug-helpers.c: undo my previous patch and fixed the real issue in
22575         ../mini/exceptions-x86.c
22576
22577 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22578
22579         * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
22580         when no HOME env. variable was set and a NullRef was thrown in a .cctor
22581         called from other .cctors.
22582
22583 2004-07-09  Miguel de Icaza  <miguel@ximian.com>
22584
22585         * loader.c: Removed the mono_loader_wine_init hack now that we are
22586         doing a managed version of Windows.Forms.
22587
22588 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
22589
22590         * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
22591         threadpool.c, threads.c: remove static data from rootset.
22592
22593 2004-07-09  Dick Porter  <dick@ximian.com>
22594
22595         * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
22596         Don't do any more processing if the matched length was 0.  It was
22597         increasing the size of the string before.  Fixes bug 61167.
22598
22599 2004-07-09  Dick Porter  <dick@ximian.com>
22600
22601         * socket-io.h:
22602         * socket-io.c
22603         (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
22604         Add support for SO_PEERCRED if its available.
22605
22606 2004-07-09  Peter Bartok <pbartok@novell.com>
22607         * loader.c: winelib.exe.so error message is now only displayed if
22608         MONO_DEBUG is set. To help us avoid questions when people are trying
22609         out the new Managed.Windows.Forms.
22610
22611 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
22612
22613         * class-internals.h debug-helpers.c marshal.c: Add new wrapper types 
22614         for isinst and castclass wrappers.
22615
22616         * class-internals.h icall.c: Move registration and lookup of JIT icalls
22617         to libmetadata from the JIT, so they could be used by the marshalling
22618         code and the interpreter.
22619
22620         * marshal.c: Register marshalling related JIT icalls here instead of
22621         in mini.c. Use CEE_MONO_ICALL instead of the family of 
22622         CEE_MONO_PROC<x> opcodes to call marshalling functions.
22623
22624         * metadata.h: Remove unneeded marshalling conversions.
22625
22626         * opcodes.c: Update for new opcodes.
22627         
22628 2004-07-08  Martin Baulig  <martin@ximian.com>
22629
22630         * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
22631         (mono_debug_get_domain_data): Make this function static.
22632
22633 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
22634
22635         * gc.c, object.h: add nice GC handle API for embedders.
22636
22637 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
22638
22639         * reflection.c: more changes for the new api
22640
22641         * object.c: When we reflect on a field w/ a constant value, it
22642         will not have a memory location, so we must access metadata. Also,
22643         allow easier reading of strings so that we can read them from
22644         the constant data.
22645
22646         * class.c (mono_class_layout_fields): no need for literal fields here.
22647
22648         * class-internals.h: api changes for const fields
22649
22650         * icall.c (ves_icall_get_enum_info): use new apis for const fields
22651
22652 2004-07-06  Martin Baulig  <martin@ximian.com>
22653
22654         * mono-debug.h: Increment version number to 44.
22655
22656         * mono-debug.c (mono_debug_add_wrapper): The second argument is
22657         now a gpointer, rewrote this whole method.
22658
22659         * mono-debug-debugger.c (mono_debugger_add_wrapper): New
22660         function.  Add information about the wrapper in a new "misc table".
22661
22662         * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
22663         for the new misc table.
22664
22665 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
22666
22667         * metadata-internals.h image.c: Add a cache for helper signatures.
22668
22669         * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
22670
22671 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
22672
22673         * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
22674         delegates from a delegate. Fixes #61033.
22675         
22676         * marshal.c: Fix managed->native stringbuilder marshalling. Implement
22677         marshalling of stringbuilder arrays. Fixes #59900.
22678
22679 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
22680
22681         * icall.c: Add EnumBuilder:setup_enum_type icall.
22682
22683 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
22684
22685         * icall.c: Added a new icall for the property version of
22686         OffsetOfStringData.
22687
22688 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
22689
22690         * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
22691         it has a constant size across platforms.
22692
22693         * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
22694         stack trace.
22695
22696 2004-06-29  Martin Baulig  <martin@ximian.com>
22697
22698         * mono-debug.c (mono_debug_add_method): Protect the whole function
22699         in mono_debugger_lock(), not just parts of it.
22700
22701 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22702
22703         * reflection.c: make sure padding bytes in heaps are zeroed.
22704
22705 2004-06-24  David Waite  <mass@akuma.org>
22706
22707         * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
22708         image.c, loader.c, locales.c, marshal.c, metadata.c,
22709         mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
22710         string-icalls.c, threads.c: change to C90-style comments from C99 /
22711         C++ -style
22712
22713 2004-06-24  Dick Porter  <dick@ximian.com>
22714
22715         * threads.c
22716         (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
22717         return createdNew.  Fixes bug 60412.
22718
22719         * threads-types.h: 
22720         * icall.c: Add createdNew parameter to CreateMutex icall
22721
22722 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22723
22724         * reflection.c, object-internals.h: save default value in params.
22725
22726 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22727
22728         * appdomain.c: for paths in PrivateBinPath that are absolute, there's
22729         no need to build a new path combining that with the application base.
22730         Fixes bug #60442.
22731
22732 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
22733
22734         * reflection.c: fixed minor standard compliance issues.
22735
22736 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
22737
22738         * reflection.c: fixed issue with encoding some custom attributes
22739         (arrays in properties and fields, bug #60411).
22740
22741 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22742
22743         * reflection.c: fix start address when copying the public key token.
22744
22745 2004-06-23  Martin Baulig  <martin@ximian.com>
22746
22747         * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
22748         the `exc' object in a static object to put it into the GC's root set.
22749
22750 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
22751
22752         * reflection.c: make mono_reflection_setup_internal_class ()
22753         callable a second time to setup a new parent class.
22754
22755 2004-06-23  Dick Porter  <dick@ximian.com>
22756
22757         * threads.c: Check for WAIT_IO_COMPLETION return values.
22758
22759 2004-06-22  Sebastien Pouliot  <sebastien@ximian.com>
22760
22761         * appdomain.c: Removed the g_free on the public key token. Now copy 
22762         the pk token string into the MonoAssemblyName buffer using g_strlcpy.
22763         * assembly.c: Added public key token string value when loading 
22764         assemblies. Fix bug #60439.
22765         * icall.c: Added missing informations (like public key) in 
22766         GetReferencedAssemblies. Fix #60519.
22767         * image.h: Changed definition for public key token from const char*
22768         public_tok_value to guchar public_key_token [17];
22769         * reflection.c: Updated for changes to public key token.
22770
22771 2004-06-22  Lluis Sanchez Gual
22772
22773         * icall.c: In ves_icall_InternalExecute, when setting a filed, also look 
22774         for the field in base classes.
22775
22776 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
22777
22778         * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
22779         mark headers as not supported, they are installed only for use by the
22780         debugger.
22781
22782 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
22783
22784         * *.c, *.h: avoid namespace pollution in public headers.
22785
22786 2004-06-21  Martin Baulig  <martin@ximian.com>
22787
22788         * exception.c (mono_get_exception_security): It's in
22789         "System.Security", not in "System".
22790
22791         * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
22792         the exception classes.
22793
22794 2004-06-21  Martin Baulig  <martin@ximian.com>
22795
22796         * mono-debug-debugger.c (mono_debugger_unhandled_exception):
22797         Protect the exception object from being finalized.
22798
22799 2004-06-21  Martin Baulig  <martin@ximian.com>
22800
22801         * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
22802         public function.
22803
22804 2004-06-21  Sebastien Pouliot  <sebastien@ximian.com>
22805
22806         * reflection.c: Load the assembly in mono_reflection_type_from_name,
22807         if it was not loaded before. Fix parts of #60439.
22808
22809 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
22810
22811         * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
22812         code that was broken since Ben's change: wrappers are now
22813         dependent on the method signature only again.
22814
22815 2004-06-21  Martin Baulig  <martin@ximian.com>
22816
22817         * mono-debug-debugger.c (write_class): Cleaned this up a bit and
22818         added interface support.
22819
22820 2004-06-21  Martin Baulig  <martin@ximian.com>
22821
22822         * class.c (mono_vtable_get_static_field_data): New public method.
22823
22824 2004-06-20  Atsushi Enomoto  <atsushi@ximian.com>
22825
22826         * filewatcher.c : Windows build fix to be compliant with API changes.
22827
22828 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22829
22830         * class.h, class.c: more accessors.
22831         * metadata.h, metadata.c: prepare for hiding MonoType and
22832         MonoMethodSignature: people should use the accessors from now on
22833         outside of the tree.
22834
22835 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22836
22837         * *.c, *.h: more API cleanups.
22838
22839 2004-06-18  Jackson Harper  <jackson@ximian.com>
22840
22841         * assembly.c: Trace loading assemblies.
22842         * loader.c: Trace loading native libraries.
22843         * mono-config.c: Trace loading config files.
22844         
22845 2004-06-18  Dick Porter  <dick@ximian.com>
22846
22847         * locales.c: Tell ICU the lengths of strings, it can cope with
22848         embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.
22849
22850 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
22851
22852         * image.c: swapped name/filename;
22853
22854 2004-06-18  Martin Baulig  <martin@ximian.com>
22855
22856         * mono-debug-debugger.c (write_class): Write the parent class at
22857         the end of the header.
22858
22859 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
22860
22861         * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
22862
22863 2004-06-17  Raja R Harinath  <rharinath@novell.com>
22864
22865         * Makefile.am (PLATFORM_LIB): New.  Possibly refer to ../os/libmonoos.la.
22866         (bundle_obj): New conditional define.
22867         (BUILT_SOURCES): Remove.
22868         ($(bundle_srcs)): Make parallel-make safe.
22869         (libmonoruntime_la_LIBADD): Make unconditional.
22870         (libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
22871         (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
22872
22873 2004-06-17  Atsushi Enomoto  <atsushi@ximian.com>
22874
22875         * culture-info-tables.h: It was inconsistent with the latest
22876           supp info files.
22877
22878 2004-06-17  Zoltan Varga  <vargaz@freemail.hu>
22879
22880         * assembly.c (mono_assembly_open): Fix crash when the assembly can't
22881         be loaded.
22882
22883         * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
22884         with gcc 2.95.
22885
22886 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22887
22888         * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
22889         cleaned up public header threads.h.
22890
22891 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22892
22893         * Makefile.am, *.c, *.h: more API cleanups.
22894
22895 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22896
22897         * Makefile.am: removed monosn from compilation.
22898         * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
22899         debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
22900         image.c, image.h, loader.c, marshal.c, metadata-internals.h,
22901         metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
22902         mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
22903         reflection.c, reflection.h, verify.c: more API cleanups and fixes.
22904
22905 2004-06-15  Jackson Harper  <jackson@ximian.com>
22906
22907         * assembly.c: Make locales lower case when searching the GAC for
22908         assemblies. gacutil will always make locales lowercase when
22909         installing so this effectively makes them case insensitive.
22910         
22911 2004-06-15  Lluis Sanchez Gual  <lluis@ximian.com>
22912
22913         * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
22914         * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
22915           parameter which allows to choose whether the wait can be interrupted or 
22916           not. Also added the method mono_monitor_enter(), which locks the monitor
22917           using an infinite wait and without allowing interruption.
22918           In the Monitor.Enter and Wait icalls, retry the lock if the wait is
22919           interrupted.
22920         * object.h: Added new fields in MonoThread. suspend_event holds the event
22921           used to susped/resume the thread. synch_lock is the lock object to use for
22922           modifying the thread state.
22923         * threads.c: Use the new synch_lock object for locking, instead of "this",
22924           which can generate deadlocks.
22925           Moved thread state change in Thread.Sleep and Thread.Join from managed
22926           to unmanaged code. This avoids a deadlock when the thread was suspended
22927           just after acquiring the thread lock.
22928           In general, use mono_monitor_enter instead of mono_monitor_try_enter.
22929           Implemented Thread.Suspend using an event instead of ThreadSuspend,
22930           which is not fully implemented in the io-layer.
22931         * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
22932
22933 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
22934
22935         * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
22936         threads-types.h: more API cleanups.
22937
22938 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22939
22940         * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
22941         domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
22942         threadpool.c, threads.c: first pass at the exported API cleanup.
22943
22944 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
22945
22946         * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
22947
22948 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22949
22950         * icall.c: added internalGetHome.
22951
22952 2004-06-14  Dick Porter  <dick@ximian.com>
22953
22954         * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
22955         possible to return successfully when '.' or '..' were the only
22956         entries in a directory, but were skipped.  The MonoIOStat was not
22957         filled in in that case.  Now return ERROR_NO_MORE_FILES instead.
22958         Fixes bug 59574.
22959
22960 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22961
22962         * reflection.c: make binaries run on .Net 1.1 by default.
22963
22964 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
22965
22966         * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
22967
22968 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
22969
22970         * marshal.c: keep track of struct size with explicit layout
22971         (bug #59979).
22972
22973 2004-06-12  Martin Baulig  <martin@ximian.com>
22974
22975         * mono-debug-debugger.c: Comment out a debugging g_message().
22976
22977 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
22978
22979         * reflection.c, reflection.h: do not free custom attrs that are cached.
22980         * icall.c: use braces to make code clearer.
22981
22982 2004-06-11  Martin Baulig  <martin@ximian.com>
22983
22984         * class.h (MonoInflatedField): New type.
22985         (MonoClassField): Replaced `MonoType *generic_type' with
22986         `MonoInflatedField *generic_info'.
22987
22988         * icall.c
22989         (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
22990
22991 2004-06-11  Martin Baulig  <martin@ximian.com>
22992
22993         * reflection.c (mono_image_create_method_token): Correctly encode
22994         varargs methods.
22995
22996 2004-06-11  Martin Baulig  <martin@ximian.com>
22997
22998         * metadata.c (mono_metadata_parse_method_signature): When parsing
22999         a MethodDef which has VarArgs, also set sentinelpos if we don't
23000         have any parameters.
23001
23002 2004-06-11  Martin Baulig  <martin@ximian.com>
23003
23004         * verify.c (mono_method_verify): In CEE_CALL, use
23005         mono_method_get_signature() to get the method's signature, unless
23006         we're a PInvoke method.
23007
23008 2004-06-10  Jackson Harper  <jackson@ximian.com>
23009
23010         * assembly.c: Use <path>/lib/mono/gac for the extra paths
23011         lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
23012         logical name as the supplied path is just a prefix to the gac not
23013         the direct path to it.
23014         
23015 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
23016
23017         * reflection.c: make the token for a created method match
23018         the token of the MethodBuilder it was created from
23019         (IKVM requires this behaviour now).
23020
23021 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
23022
23023         * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
23024         reflection.c, socket-io.c: leak fixes.
23025
23026 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23027
23028         * icall.c: handle sentinel pos in vararg methods in position different
23029         from 0.
23030
23031 2004-06-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23032
23033         * culture-info-tables.h: freshly generated.
23034
23035 2004-06-09  Martin Baulig  <martin@ximian.com>
23036
23037         * loader.c (mono_get_method_constrained): Call `mono_class_init
23038         (constrained_class)'.   
23039
23040 2004-06-08  Gert Driesen <drieseng@users.sourceforge.net>
23041
23042         * icall.c (ves_icall_MonoType_GetEvent): Handle events without
23043         any methods. Fixes #59629.
23044
23045 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
23046
23047         * culture-info-tables.h: reflecting locale-builder updates.
23048
23049 2004-06-08  Dick Porter  <dick@ximian.com>
23050
23051         * object.h:
23052         * locales.c: Fixed compile warnings, including a real bug in
23053         CompareInfo_internal_compare.
23054         
23055 2004-06-08  Dick Porter  <dick@ximian.com>
23056
23057         * locales.c
23058         (ves_icall_System_Globalization_CompareInfo_internal_index):
23059         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23060         Double-check the resuls of usearches, because ICU currently
23061         ignores most of the collator settings here.  Fixes bug 59720.
23062         
23063 2004-06-08  Dick Porter  <dick@ximian.com>
23064
23065         * locales.c
23066         (ves_icall_System_Globalization_CompareInfo_internal_index_char):
23067         Fix memory leak and segfault-causing typo.  No idea how this one
23068         lasted so long without being noticed.
23069
23070 2004-06-09  Zoltan Varga  <vargaz@freemail.hu>
23071
23072         * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
23073         any methods. Fixes #59629.
23074
23075 2004-06-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23076
23077         * assembly.c:
23078         (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
23079         own the critical section before). Removed dead code (that's done
23080         in the preload hook).
23081
23082         (mono_assembly_load_with_partial_name): call the preload hook.
23083
23084 2004-06-08  Martin Baulig  <martin@ximian.com>
23085
23086         * metadata.c (mono_metadata_signature_alloc): Default
23087         `sentinelpos' to -1.
23088
23089         * reflection.c (mono_image_get_array_token): Likewise.
23090
23091 2004-06-08  Martin Baulig  <martin@ximian.com>
23092
23093         * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
23094
23095         * metadata.c (mono_metadata_parse_method_signature): When parsing
23096         a MethodDef which has VarArgs, set sentinelpos.
23097
23098         * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
23099         `gint16' since we're using -1 for non-varargs methods.
23100
23101         * reflection.c
23102         (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
23103         (method_encode_signature): Added varargs support.
23104         (method_builder_encode_signature): Likewise.
23105         (mono_image_get_varargs_method_token): New static method.
23106         (mono_image_create_method_token): New public method; this is
23107         called via an icall instead of mono_image_create_token() when
23108         calling a varargs method.       
23109
23110 2004-06-08  Lluis Sanchez Gual  <lluis@ximian.com>
23111
23112         * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
23113
23114 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
23115
23116         * culture-info-tables.h : Reflecting the latest locale-builder that
23117           fixed empty array representation ({} to {0}).
23118
23119 2004-06-07  Jackson Harper  <jackson@ximian.com>
23120
23121         * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
23122         looking up extra gac paths. This allows MONO_GAC_PATH to act
23123         exactly like a prefix.
23124         
23125 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
23126
23127         * reflection.c (mono_reflection_type_from_name): Make a copy of the
23128         type name before modifying it. Fixes #59405.
23129
23130 2004-06-08  Atsushi Enomoto  <atsushi@ximian.com>
23131
23132         * culture-info.h: added fields for "all datetime patterns".
23133         * locales.c: (  ves_icall_System_Globalization_CultureInfo
23134           _construct_datetime_format ()): fill xxx_patterns fields.
23135         * object.h: added fields for "all datetime patterns" to
23136           MonoDateTimeFormatInfo.
23137         * culture-info-tables.h: reflecting locale-builder updates.
23138
23139 2004-06-08  Zoltan Varga  <vargaz@freemail.hu>
23140
23141         * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
23142         the event has no add and remove methods. Fixes #59629.
23143
23144 2004-06-05  Sebastien Pouliot  <sebastien@ximian.com>
23145
23146         * object.c: Fixed possible integer overflow when allocating large
23147         strings.
23148
23149 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
23150
23151         * culture-info-tables.h: reflecting locale-builder updates.
23152
23153 2004-06-05  Atsushi Enomoto  <atsushi@ximian.com>
23154
23155         * culture-info-tables.h: reflecting locale-builder updates.
23156
23157 2004-06-03  Atsushi Enomoto  <atsushi@ximian.com>
23158
23159         * culture-info-tables.h: reflecting locale-builder updates.
23160
23161 2004-06-03  Lluis Sanchez Gual  <lluis@ximian.com>
23162
23163         * threads.c: Made Thread.Sleep abortable.
23164
23165 2004-06-02  Martin Baulig  <martin@ximian.com>
23166
23167         * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
23168
23169         * debug-mono-symfile.h: Bumped symbol file version number to 37.
23170
23171 2004-05-31  Zoltan Varga  <vargaz@freemail.hu>
23172
23173         * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
23174
23175 2004-05-30  Jackson Harper  <jackson@ximian.com>
23176
23177         * reflection.c: Do not hardcode assembly versions or public key
23178         tokens anymore. All of this except the corlib section was dead
23179         code anyways.
23180         
23181 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
23182
23183         * object.c (mono_runtime_invoke_array): Automatically create boxed
23184         objects for byref valuetypes if needed. Fixes #59300.
23185         
23186         * object.c (mono_method_return_message_restore): Handle 
23187         MONO_TYPE_OBJECT as well.
23188
23189 2004-05-28  Jackson Harper  <jackson@ximian.com>
23190
23191         * reflection.c: The modified type encoding was causing build
23192         problems. Reverted for now.
23193         
23194 2004-05-28  Jackson Harper  <jackson@ximian.com>
23195
23196         * reflection.c/h: Take an assembly ref so that we dont create
23197         fully qualified names when encoding types in the same assembly as
23198         the custom attribute being emitted.
23199         * appdomain.c: Increment version number.
23200         
23201 2004-05-26  Duncan Mak  <duncan@ximian.com>
23202
23203         * icall.c
23204         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23205         Set the full version number (major, minor, build, revision).
23206
23207 2004-05-28  Vladimir Vukicevic  <vladimir@pobox.com>
23208
23209         * marshal.c (emit_struct_conv): increment src/dst after blit
23210         (mono_marshal_get_managed_wrapper,
23211         mono_marshal_get_native_wrapper): make sure we have marshalling
23212         info before marshalling params (info computation affects
23213         blittable)
23214
23215         * class.c (class_compute_field_layout): correctly deal with
23216         blittable
23217         (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
23218         value types (as per what windows dows by default)
23219         (mono_class_setup_mono_type): System.ValueType is blittable
23220         (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
23221         blittable
23222
23223         * marshal.c (mono_marshal_load_type_info): flag types  as
23224         non-blittable if the native layout doesn't match the managed
23225         layout
23226
23227 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23228
23229         * appdomain.c: don't add stuff in the private search path that is
23230         above the application base. If application base is not set, there's
23231         no private search path.
23232
23233 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
23234
23235         * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
23236         byref struct arguments in native->managed marshalling.
23237
23238 2004-05-28      Patrik Torstensson      <totte@hiddenpeaks.com>
23239
23240         * marshal.c (mono_marshal_get_runtime_invoke): correctly
23241         cache methods using signature (special case for methods
23242         that are value type or string class)
23243         
23244         * image.c (mono_image_close): clean up allocated GSList's
23245         in runtime_invoke_cache.
23246
23247 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23248
23249         * mono-config.c: set the correct path for mono_cfg_dir on windows when
23250         there's no MONO_CFG_DIR environment variable defined.
23251
23252 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23253
23254         * threads.c: windows version must be >= 0x0500 to include OpenThread.
23255
23256 2004-05-28  Lluis Sanchez Gual  <lluis@ximian.com>
23257
23258         * threadpool.c: Really wait for 500ms after the async call, even if the wait
23259           is interrumped.
23260         * threads.c: In mono_thread_manage, call OpenThread to ref each handle
23261           before waiting for it, and call CloseHandle after the wait to unref it.
23262           This will make sure that handles are not disposed too early.
23263
23264 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23265
23266         * appdomain.c:
23267         * appdomain.h:
23268         * icall.c: removed
23269         ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
23270         needed now.
23271
23272         * object.c: se the application_base only for the domain that runs
23273         Main. Fixes bug #59216,
23274
23275 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23276
23277         * appdomain.c:
23278         * object.c: only the domain in which Main is run have
23279         SetupInformation.ConfigurationFile set, so moved a few lines from
23280         appdomain.c to object.c.
23281
23282 2004-05-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23283
23284         * appdomain.c: we tried to load [name].(dll|exe), but according
23285         to bug #57710, we must also try [culture]/[name].(dll|exe) and
23286         [culture]/[name]/[name](dll|exe). This patch fixes the bug.
23287         There's a test case attached to bug #58922.
23288
23289 2004-05-27  Dick Porter  <dick@ximian.com>
23290
23291         * icall.c:
23292         * file-io.c: Implemented icalls for locking and unlocking regions
23293         in a file.
23294         (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
23295         FALSE on error (fixes both compiler warning and real bug.)
23296
23297 2004-05-27  Atsushi Enomoto  <atsushi@ximian.com>
23298
23299         * culture-info-tables.h: reflecting locale-builder updates.
23300
23301           (Added missing ChangeLog entry for 05/26)
23302
23303 2004-05-27  Jackson Harper  <jackson@ximian.com>
23304
23305         * locales.c: Fix some cut and paste errors.
23306         
23307 2004-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23308
23309         * mono-config.c: set the correct path for config. directory on windows.
23310
23311 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
23312
23313         * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
23314           on win32.
23315
23316 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
23317
23318         * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
23319         from pinvoke functions.
23320         
23321         * marshal.c (mono_ftnptr_to_delegate): Implement this.
23322
23323 2004-05-26  Atsushi Enomoto  <atsushi@ximian.com>
23324
23325         * culture-info-tables.h: reflecting locale-builder updates.
23326
23327 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
23328
23329         * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
23330         #59086.
23331
23332 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
23333
23334         * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
23335         * icall.c: Modified icalls for RNG.
23336         * rand.c|h: Changed RNG interface to allow thread-safe usage under 
23337         Windows (CryptoAPI).
23338
23339 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
23340
23341         * locales.c: Fix build.
23342
23343 2004-05-25  Atsushi Enomoto  <atsushi@ximian.com>
23344
23345         * culture-info-tables.h: reflecting locale-builder updates.
23346
23347 2004-05-25  Jackson Harper  <jackson@ximian.com>
23348
23349         * locales.c: When creating the current culture use the $LANGs
23350         specific culture. So DateTimeFormat and NumberFormat entries are created.
23351         
23352 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
23353
23354         * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
23355         a char array as parameter.
23356
23357 2004-05-24  Lluis Sanchez Gual  <lluis@ximian.com>
23358
23359         * image.c: In mono_image_open(), always use an absolute path name to
23360           look for already loaded images.
23361
23362 2004-05-24  Sebastien Pouliot  <sebastien@ximian.com>
23363
23364         * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
23365         missing in the windows build (like older cygwin include files).
23366
23367 2004-05-23  Sebastien Pouliot  <sebastien@ximian.com>
23368
23369         * icall.c: Fixed check for possible integer overflow in Buffer_
23370         BlockCopy icall. Replaced comments style // by /* */.
23371
23372 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
23373
23374         * marshal.c (mono_ftnptr_to_delegate): Fix warning.
23375         
23376         * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
23377         check after MONO_VTADDR. Fixes pinvoke2.exe.
23378
23379         * marshal.h marshal.c metadata.h: Add beginnings of support for
23380         ftnptr -> delegate marshalling.
23381
23382 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
23383
23384         * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
23385         * threads.c: Fix warnings.
23386
23387 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
23388
23389         * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
23390         * icall.c: Registered icalls for Suspend and Resume.
23391         * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
23392           Thread.Abort.
23393         * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
23394         * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
23395         * process.c: Use WaitForSingleObjectEx.
23396         * threadpool.c: Use WaitForSingleObjectEx. Added some interruption 
23397           checkpoints.
23398         * threads.c, threads.h: Make use of new Ex wait methods. Improved
23399           implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
23400           for Suspend and Resume. Added new mono_thread_stop, used for stoping
23401           background threads. Added basic support for Abort in Windows.
23402           Start new threads using a managed delegate invoke wrapper. This wrapper
23403           has an interruption checkpoint that is needed since an interruption
23404           can be requested before the thread leaves the unmanaged code that starts 
23405           the thread.
23406         * marshal.c: Added interruption checkpoint after every native call, and
23407           also before managed calls for wrappers called from unmanaged code to
23408           go into managed code.
23409         * object.h: Added new field in MonoThread to keep track of interruption
23410           requests.
23411
23412 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
23413
23414         * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
23415         calls.
23416
23417 2004-05-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23418
23419         * appdomain.c:
23420         * assembly.c:
23421         * gc.c:
23422         * locales.c:
23423         * mono-config.c:
23424         * rand.c: getenv -> g_getenv (windows!)
23425
23426         * process.c: complete_path is also used on non-windows platforms.
23427
23428 2004-05-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23429
23430         * icall.c: new signature for Process_Start.
23431
23432         * process.[ch]: new signature for Process_Start. If we're on windows
23433         and UseShellExecute is false, we have to search for the program by
23434         ourselves if we don't get a full path.
23435
23436 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
23437
23438         * marshal.c (mono_marshal_get_native_wrapper): Fix up custom 
23439         marshalling and call CleanUpNativeData if needed. Fixes #58646.
23440
23441 2004-05-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23442
23443         * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
23444         Fixes bug #58373.
23445
23446 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23447
23448         * process.c: use double quotes to quote program name and arguments on
23449         windows. Fixes bug #58575.
23450
23451 2004-05-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23452
23453         * file-io.c: don't return "." and ".." when using windows Find*File.
23454
23455 2003-05-17      Patrik Torstensson <totte@hiddenpeaks.com>
23456
23457         * marshal.c: Don't pass wrappers to message init because method 
23458         addressed used to lookup metadata. part of remoting[2|3] fix.
23459
23460 2004-05-15  Jackson Harper  <jackson@ximian.com>
23461
23462         * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
23463         path is essentially the same as MONO_PATH except that it points to
23464         GACs instead of lib directories.
23465         * loader.h: The user gac is gone so we dont need function to
23466         enable/disable it.
23467         * mono-config.c: user gac option is now gone.
23468         
23469 2004-05-15  Jackson Harper  <jackson@ximian.com>
23470
23471         * culture-info.h: Make defines more consistent, add calendar data
23472         to the culture info table.
23473         * culture-info-tables.h: Add basic calendar data. Basically
23474         everyone gets default gregorian until all the data is
23475         updated.
23476         * locales.c: Use the new consistent defines. Set calendar data for
23477         culture info objects.
23478         * object.h: add a field for calendar data to CultureInfo
23479         
23480 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
23481
23482         * image.c: image->runtime_invoke_cache is keyed on signatures now.
23483         * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
23484         a signature.
23485         (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
23486         (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
23487         an extra param that is the pointer of the method to invoke. The IL for
23488         the invoke method is no longer specific to the method, but to the
23489         signature of the method. Thus, we can share the same code for multiple
23490         methods. This reduces the number of methods that have to be compiled.
23491
23492 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
23493
23494         * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
23495
23496         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23497
23498         * icall.c: Optimize Buffer.BlockCopy.
23499
23500 2004-05-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23501
23502         * culture-info-tables.h: seems like Spanish and Portuguese cultures had
23503         DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
23504         quote). Changed them to "MMMM yyyy".
23505
23506 2004-05-12  Miguel de Icaza  <miguel@ximian.com>
23507
23508         * rand.c
23509         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file. 
23510
23511 2004-05-13  Zoltan Varga  <vargaz@freemail.hu>
23512
23513         * reflection.h: Updated after changes to managed structures.
23514
23515         * appdomain.c: Bump corlib version.
23516
23517 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23518
23519         * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
23520         windows.
23521
23522 2004-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23523
23524         * Makefile.am: link to ../os/libmonoos.la on windows.
23525
23526         * assembly.c:
23527                 -If MONO_DEBUG, warn about non-existing directories in
23528                 MONO_PATH.
23529                 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
23530                 compile time variable.
23531                 -Removed init_default_path and call mono_set_rootdir from
23532                 libmonoos.a instead (windows only).
23533
23534         * assembly.h: declare mono_assembly_getrootdir().
23535
23536         * domain.c:
23537         * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
23538
23539         * loader.c: s/getenv/g_getenv/
23540
23541 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
23542
23543         * marshal.{h,c}: Add support for UnmanagedType.AsAny.
23544
23545         * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
23546
23547         * metadata.h: Add new marshalling conversions.
23548
23549         * metadata.h metadata.c (mono_metadata_signature_dup): New helper
23550         function.
23551
23552         * reflection.c (mono_reflection_get_type): Lookup the type in all
23553         modules of a multi-module assembly. Fixes #58291.
23554
23555 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
23556
23557         * threads.c: Before aborting a background, set the StopRequested
23558         state.  This avoids throwing the Abort exception.
23559         In mono_thread_manage, don't continue with the shutdown until all
23560         aborted threads have actually stopped.
23561
23562 2004-05-10  Jackson Harper  <jackson@ximian.com>
23563
23564         * locales.c: Remove the modifier from culture names.
23565         
23566 2004-05-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23567
23568         * Makefile.am: monosn is not installed any more. It has been deprecated
23569         in favor of sn.
23570
23571 2004-05-07  Jackson Harper  <jackson@ximian.com>
23572
23573         * locales.c
23574         (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
23575         Fix array construction, add bailout if the length is 0.
23576
23577 2004-05-07  Dick Porter  <dick@ximian.com>
23578
23579         * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
23580         machine doesn't have a DNS entry.  Patch by Urs Muff
23581         (umuff@quark.com), fixes bug 57928.
23582
23583 2004-05-06  Jackson Harper  <jackson@ximian.com>
23584
23585         * reflection.c: Handle null PublicTokens properly. alloc mem for
23586         assembly names culture so we dont crash when freeing it.
23587         
23588 2004-05-06  Jackson Harper  <jackson@ximian.com>
23589
23590         * assembly.c: Check the usergac when loading with partial names.
23591         
23592 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
23593
23594         * rand.c|h: Added new icall for (optionally) seeding the PRNG. This 
23595         does nothing for now (not required for Linux/Windows) but the class
23596         library can call it (and a newer or modified runtime could need it).
23597         * icall.c: Registred icall.
23598
23599 2004-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23600
23601         * loader.c: prints a message on module loading error we set MONO_DEBUG
23602         environment variable.
23603
23604 2004-05-05  Jackson Harper  <jackson@ximian.com>
23605
23606         * appdomain.c: Handle PublicKeyToken=null properly.
23607         
23608 2004-05-05  Sebastien Pouliot  <sebastien@ximian.com>
23609
23610         * environment.c|h: Added icall ves_icall_System_Environment_
23611         GetOSVersionString to get the current OS version as a string.
23612         * icall.c: Registred icall.
23613
23614 2004-05-05  Lluis Sanchez Gual  <lluis@ximian.com>
23615
23616         * object.c: in mono_object_get_virtual_method(), take into account that
23617         non-virtual methods don't have a slot in the vtable. Check needed when
23618         the object is a proxy.
23619
23620 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
23621
23622         * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
23623         (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
23624
23625         * object.c (mono_class_compute_gc_descriptor): Fix warning.
23626
23627         * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
23628         passed when a valuetype is expected.
23629
23630         * object.c (mono_unhandled_exception): Only set the exit code if the
23631         exception happens in the main thread. Fixes thread5.exe.
23632
23633         * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
23634         invalid names. Fixes #58047.
23635
23636 2004-05-03  Jackson Harper  <jackson@ximian.com>
23637
23638         * assembly.c: This line was committed accidently and is unneeded.
23639         
23640 2004-05-03  Jackson Harper  <jackson@ximian.com>
23641
23642         * icall.c: Add new icall for Assembly::LoadWithPartialName
23643         * assembly.c/.h: new function that probes the GAC to load partial
23644         assembly names by Paolo Molaro.
23645         
23646 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23647
23648         * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
23649         * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
23650         (type_get_fully_qualified_name): Added PublicKeyToken when building a
23651         full type name.
23652
23653 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23654
23655         * appdomain.c: fixed check for 'neutral' culture and removed warning.
23656         * reflection.c: fix bug when parsing a full type name and Version is not
23657         the last thing in the string.
23658
23659 2004-05-03  Zoltan Varga  <vargaz@freemail.hu>
23660
23661         * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
23662         crashes when it is freed.
23663
23664 2004-05-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23665
23666         * assembly.c: print the compat warning to stderr.
23667
23668 2004-05-01  Miguel de Icaza  <miguel@ximian.com>
23669
23670         * assembly.c (mono_assembly_load_references): Add a compatibility
23671         hack to run old applications that might be still referencing the
23672         3300-based assemblies, only do this for System.xxx.
23673
23674 2004-05-01  Jackson Harper  <jackson@ximian.com>
23675
23676         * appdomain.c: If the culture is neutral we set it to "".
23677         
23678 2004-04-29  Jackson Harper  <jackson@ximian.com>
23679
23680         * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
23681
23682 2004-04-29  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
23683  
23684         * string-icalls.c: added low overhead function for copying chars
23685         * icall.c: added needed icall for the above function
23686  
23687 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23688
23689         * icall.c: fix return value of get_global_assembly_cache.  Implemented
23690         Environment.GetLogicalDrives.
23691
23692 2004-04-28  Bernie Solomon  <bernard@ugsolutions.com>
23693
23694         * rand.c: try and talk to egd or prngd
23695         for random bytes if opening devices fail.
23696
23697 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
23698
23699         * marshal.c (mono_marshal_load_type_info): Calculate the minimum
23700         alignment for the type using the native alignment of its members 
23701         instead of using klass->min_align.
23702
23703         * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
23704
23705 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23706
23707         * file-io.c:
23708         * socket-io.c: added check for sys/aio.h.
23709
23710 2004-04-28  Dick Porter  <dick@ximian.com>
23711
23712         * threads.c: Don't abort a thread thats already aborting, when
23713         terminating everything.
23714
23715 2004-04-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23716
23717         * icall.c: added 2 new async calls for Socket.
23718
23719         * socket-io.[ch]: fixed some warnings. Added support for asynchronous
23720         IO on *nix systems.
23721
23722         * threadpool.c: removed unused variable.
23723
23724 2004-04-27  Zoltan Varga  <vargaz@freemail.hu>
23725
23726         * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
23727
23728 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
23729
23730         * locales.c: put back string_invariant_tolower () and
23731         string_invariant_toupper ().
23732
23733 2004-04-26 David Waite <mass@akuma.org>
23734
23735         * file-io.h:
23736         * socket-io.h:
23737         * threads.h:
23738         * unicode.h: remove comma from end of enumeration declarations
23739
23740 2004-04-26 David Waite <mass@akuma.org>
23741
23742         * debug-mono-symfile.h:
23743         * decimal.c:
23744         * mono_debug.h:
23745         * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
23746
23747
23748 2004-04-26  Jackson Harper  <jackson@ximian.com>
23749
23750         * appdomain.c: Increment version number.
23751         
23752 2004-04-26  Jackson Harper  <jackson@ximian.com>
23753
23754         * appdomain.c: Set assembly references public token value when
23755         PublicKeyToken is specified, not the hash_value. Free public token
23756         values when free assembly name data. Previously the public key
23757         token was hex decoded, however we are using hex encoded public key
23758         tokens, so this is not neccasary.
23759         * assembly.c: Lookup assemblies in the gac if their public token
23760         value is set. Add function to allow enabling user gac
23761         lookups. Specify whether or not the assembly was loaded from the
23762         GAC. Compare full assembly names when checking the cache for
23763         assemblies (Temporarily disabled see comment in code). Remove
23764         mscorlib -> corlib mapping cruft. Add trace-loading. When a user
23765         specifies trace-loader they get extra info to stdout on the
23766         loading of assemblies.
23767         * image.h: Add a field for an assembly references public token
23768         value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
23769         whether an assembly has been loaded from the GAC.
23770         * image.c: Remove a corlib -> mscorlib name mapping.
23771         * loader.h: Add function to enable/disable the user gac.
23772         * mono-config.c: Check if the usergac is enabled in the config
23773         file.
23774         * icall.c: New icall to determine whether or not an assembly has
23775         been loaded from the GAC. Remove some mscorlib -> corlib mappings.
23776         * tabldefs.h: Add constant for assemblyref flag that specifies a
23777         full public key is used instead of a public token.
23778         * reflection.c: Remove mscorlib -> corlib mappings. Set
23779         PublicTokenValue instead of hash value. This value is a hex
23780         string so it does not need to be expanded.
23781
23782 2004-04-26  Martin Baulig  <martin@ximian.com>
23783
23784         * mono-debug-debugger.c (mono_debugger_initialize): Set
23785         `mono_debugger_initialized' before calling mono_debug_lock().
23786
23787 2004-04-42  Robert Shade <rshade@dvsconsulting.com>
23788
23789         * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
23790           InternalToUpper/InternalToLower.
23791         * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
23792           removed invariant culture shortcut.  This is now done in managed code.
23793         * locales.c: (string_invariant_toupper/tolower) removed.
23794
23795 2004-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23796
23797         * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
23798         Added Poll internal call.
23799
23800         * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
23801         call for Poll. Select was too heavy for polling a single socket.
23802
23803         * threadpool.[ch]: added mono_threadpool_cleanup.
23804         * threads.c: use it. Don't use Thread_Abort on windows.
23805
23806 2004-04-23  Martin Baulig  <martin@ximian.com>
23807
23808         * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
23809
23810 2004-04-23  Sebastien Pouliot  <sebastien@ximian.com>
23811
23812         * icall.c: Registred new icalls for key pair protection and added an
23813         icall for Environment.GetFolderPath on Windows.
23814         * security.c|h: Added new icalls for key pair protection.
23815
23816 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23817
23818         * socket-io.c: don't display the non-supported family warning for known
23819         families. Now this is not displayed on windows when checking support
23820         for IPv4/IPv6.
23821
23822 2004-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23823
23824         * class.c: don't display the layout warning for static fields.
23825
23826 2004-04-21  Lluis Sanchez Gual <lluis@ximian.com>
23827
23828         * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
23829         * locales.c, locales.h: Added new icalls for culture-specific
23830         Char.ToLower and Char.ToUpper.
23831
23832 2004-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23833
23834         * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
23835         by David Waite.
23836
23837 2004-04-20  Martin Baulig  <martin@ximian.com>
23838
23839         * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
23840         of the type name before passing it to mono_reflection_type_from_name().
23841
23842 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
23843
23844         * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
23845         encodings here. Fixes #56965.
23846
23847 2004-04-18  Bernie Solomon <bernard@ugsolutions.com>
23848
23849         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
23850         fix test on strstr result not that I can see anything that
23851         relies on the result.
23852
23853 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
23854
23855         * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
23856         Fixes #57081.
23857
23858         * marshal.c (mono_marshal_get_string_encoding): New helper function.
23859
23860         * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
23861         function to determine which marshalling to use for strings. Fixes
23862         #56965.
23863
23864         * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
23865
23866         * reflection.c (encode_marshal_blob): Add support for LPARRAY.
23867
23868 2004-04-15  Bernie Solomon  <bernard@ugsolutions.com>
23869
23870         * icall.c: #include mono-config.h
23871
23872 2004-04-15  Jackson Harper  <jackson@ximian.com>
23873
23874         * culture-info-tables.h: Fix date formats for en-US culture.
23875         
23876 2004-04-15  Lluis Sanchez Gual  <lluis@ximian.com>
23877
23878         * icall.c: Registered icalls for ThreadPool.GetMinThreads and 
23879         ThreadPool.SetMinThreads.
23880         * threadpool.c: Implemented ThreadPool.GetMinThreads and
23881         ThreadPool.SetMinThreads.
23882
23883 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
23884
23885         * mono-config.c: also load the .config file in the directory
23886         where the assembly was found.
23887
23888 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
23889
23890         * assembly.c: load per-assembly config files.
23891         * icall.c: decrapified code to get the config dir and moved to
23892         mono-config.c.
23893         * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
23894         per-assembly config files. When doing a dll map lookup give precedence
23895         to the per-assembly data.
23896
23897 2004-04-14  Martin Baulig  <martin@ximian.com>
23898
23899         * mono-debug-debugger.h (MonoDebuggerEvent): Removed
23900         MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
23901         and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
23902
23903         * mono-debugger-debugger.c: While the debugger is locked, remember
23904         whether the symbol tables have changes and send one single
23905         MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
23906
23907 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
23908
23909         * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
23910
23911         * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New 
23912         function.
23913
23914         * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
23915         account when marshalling string arrays. Fixes #56965.
23916
23917 2004-04-13  Sebastien Pouliot  <sebastien@ximian.com>
23918
23919         * icall.c: Add new icalls mapping for security.
23920         * security.c|h: Add internal calls for WindowsIdentity,
23921         WindowsImpersonationContext and WindowsPrincipal.
23922
23923 2004-04-13  Gert Driesen (drieseng@users.sourceforge.net)
23924
23925         * class.c: Added comment to ensure the System.MonoDummy class
23926         is removed when no longer necessary
23927
23928 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
23929
23930         * appdomain.c: Pass arguments to the bootstraping exceptions to
23931         minimize JITed methods at boot
23932
23933         * metadata.c (mono_exception_from_name_two_strings): Allow for the
23934         second string to be null.
23935
23936         * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
23937         Change the protocol to minimize the JIT methods at startup.  Now
23938         it Returns the internal codepage, if the value of "int_code_page"
23939         is 1 at entry, and we can not compute a suitable code page
23940         number, returns the code page as a string.
23941
23942 2004-04-13  Jackson Harper  <jackson@ximian.com>
23943
23944         * culture-info-tables.h: Fix number of decimal digits for all
23945         english locales.
23946
23947 2004-04-13  Jackson Harper  <jackson@ximian.com>
23948
23949         * icall.c: Clairfy out of sync error message. It is not always
23950         your corlib that is out of sync.
23951
23952 2004-04-13  Zoltan Varga  <vargaz@freemail.hu>
23953
23954         * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
23955         properties when only the set accessor is overriden. Fixes #55874.
23956
23957 2004-04-09  Zoltan Varga  <vargaz@freemail.hu>
23958
23959         * assembly.c (mono_assembly_load_references): Make this thread safe.
23960         Fixes #56327.
23961
23962 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
23963
23964         * monosn.c: Add missing initialization calls.
23965
23966 2004-04-08  Bernie Solomon  <bernard@ugsolutions.com>
23967
23968         * locales.c:
23969         ves_icall_System_Globalization_CultureInfo_construct_number_format
23970         Fix g_assert so it compiles on fussier compilers re int/ptr
23971         mismatch
23972
23973 2004-04-08  Dick Porter  <dick@ximian.com>
23974
23975         * socket-io.h:
23976         * socket-io.c: Don't set SO_REUSEADDR on windows.  Fixes bug
23977         53992.  Also rearrange the code so that the internal calls return
23978         an error value and exceptions are thrown from managed code.
23979
23980         * icall.c: Add type info to the socket icalls.
23981
23982 2004-04-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23983
23984         * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
23985         owes me a beer.
23986
23987 2004-04-07  Martin Baulig  <martin@ximian.com>
23988
23989         * class.c (mono_class_from_generic_parameter): Don't default
23990         `klass->parent' to `mono_defaults.object_type'.
23991
23992 2004-04-07  Martin Baulig  <martin@ximian.com>
23993
23994         * reflection.c (mono_reflection_initialize_generic_parameter): Set
23995         `param->pklass->reflection_info'.       
23996
23997 2004-04-07  Jackson Harper  <jackson@ximian.com>
23998
23999         * culture-info-tables.h: Fix date separator symbol.
24000         
24001 2004-04-07  Martin Baulig  <martin@ximian.com>
24002
24003         * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
24004         from System.Type to System.MonoType.
24005
24006 2004-04-07  Martin Baulig  <martin@ximian.com>
24007
24008         * reflection.h
24009         (MonoReflectionGenericParam): Added `has_reference_type' and
24010         `has_value_type' fields.
24011
24012         * reflection.c (mono_image_get_generic_param_info): Encode the
24013         correct flags if we have the `class' or `struct' constraint.
24014
24015 2004-04-07  Martin Baulig  <martin@ximian.com>
24016
24017         * reflection.h
24018         (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
24019
24020 2004-04-07  Jackson Harper  <jackson@ximian.com>
24021
24022         * appdomain.c: Revert extra patches, just wanted to bump the
24023         version number.
24024         
24025 2004-04-07  Jackson Harper  <jackson@ximian.com>
24026
24027         * Makefile.am: Add culture-info private headers.
24028         * icall.c: Add new icalls for contructing locales.
24029         * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
24030         * locales.h: Declare new culture info construction methods.
24031         * object.h: Add new fields used to avoid the CultureMap to
24032         MonoCultureInfo.
24033         * culture-info.h: Definition of structs used in the culture info
24034         tables.
24035         * culture-info-tables.h: Autogenerated tables that contain culture
24036         info data. This file was generated with the locale-builder tool.
24037         * appdomain.c: Incement corlib version number.
24038         
24039 2004-04-07  Bernie Solomon  <bernard@ugsolutions.com>
24040
24041         * appdomain.c: (mono_runtime_init) move mono_thread_init
24042         to before mono_object_new calls so critical sections
24043         are initialized before use.
24044
24045 2004-04-07  Martin Baulig  <martin@ximian.com>
24046
24047         * icall.c
24048         (ves_icall_TypeBuilder_define_generic_parameter): Removed.
24049         (ves_icall_MethodBuilder_define_generic_parameter): Removed.
24050         (ves_icall_MonoGenericParam_initialize): Removed.
24051         (monogenericparam_icalls): Removed.
24052         (generictypeparambuilder_icalls): Added new table for
24053         System.Reflection.Emit.GenericTypeParameterBuilder.
24054
24055         * reflection.c
24056         (mono_reflection_define_generic_parameter): Removed.
24057         (mono_reflection_initialize_generic_parameter): This is now called
24058         from GenericTypeParameterBuilder's .ctor.
24059
24060 2004-04-06  Martin Baulig  <martin@ximian.com>
24061
24062         * class.c (mono_class_init): Don't inflate nested classes in a
24063         generic instance.
24064         (mono_type_get_name_recurse): Include the generic arguments for
24065         generic instances and generic type declarations.
24066         (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
24067         (_mono_class_get_instantiation_name): Removed.
24068         (mono_class_create_generic): Always use `gklass->name' as our name.
24069
24070         * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
24071
24072         * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
24073         (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
24074         (ves_icall_MonoMethod_GetGenericParameters): Renamed to
24075         ves_icall_MonoMethod_GetGenericArguments() and correctly handle
24076         closed generic methods here.
24077
24078         * reflection.c
24079         (mono_reflection_generic_inst_get_nested_types): Removed.
24080         (inflate_mono_method): Copy the generic parameters from the
24081         MonoMethodHeader into out MonoGenericMethod.
24082
24083 2004-04-06  Martin Baulig  <martin@ximian.com>
24084
24085         * row-indexes.h
24086         (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
24087
24088         * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
24089
24090         * reflection.c (build_compressed_metadata): If we have any entries
24091         in the GenericParam, MethodSpec or GenericParamConstraint tables,
24092         set the header version to 1.1.
24093
24094 2004-04-06  Martin Baulig  <martin@ximian.com>
24095
24096         * class.c (mono_class_init): If we're a generic instance,
24097         initialize our nested classes, too.
24098         (_mono_class_get_instantiation_name): Deal with the new `!%d'
24099         suffix. 
24100
24101 2004-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24102
24103         * process.c: quote the argument passed to the shell on windows.
24104
24105 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
24106
24107         * threads.c (mono_alloc_special_static_data): Allow this to be
24108         called during startup.
24109
24110 2004-04-02  Martin Baulig  <martin@ximian.com>
24111
24112         * icall.c
24113         (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
24114
24115 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
24116
24117         * icall.c: Fix build.
24118
24119 2004-04-02  Sebastien Pouliot  <sebastien@ximian.com>
24120
24121         * Makefile.am: Added security.c|h.
24122         * icall.c: Added icall for get_UserName;
24123         * security.c: New file for security related icalls. Added function
24124         get_UserName for System.Environment (fix #56144).
24125         * security.h: New. Header file for security.c
24126
24127 2004-04-02  Dick Porter  <dick@ximian.com>
24128
24129         * icall.c: Deleted the icalls that were obsoleted some time ago
24130         by the ICU string code, and which were mixed into the icall
24131         rearranging.  Fixes bug 55969.
24132
24133         * string-icalls.h: 
24134         * string-icalls.c: Deleted the code that those icalls reference.
24135
24136 2004-04-01  Martin Baulig  <martin@ximian.com>
24137
24138         * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
24139
24140         * class.c (mono_class_from_generic_parameter): Don't set 
24141         TYPE_ATTRIBUTE_INTERFACE.
24142         (my_mono_class_from_generic_parameter): Likewise.
24143
24144 2004-04-01  Martin Baulig  <martin@ximian.com>
24145
24146         * loader.c (find_method): Added an optional `MonoClass *ic'
24147         argument to search in a specific interface.
24148         (mono_get_method_constrained): New public function.
24149
24150 2004-04-01  Martin Baulig  <martin@ximian.com>
24151
24152         * reflection.c (mono_image_get_generic_field_token): Use the
24153         `handleref' cache here.
24154
24155 2004-04-01  Martin Baulig  <martin@ximian.com>
24156
24157         * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
24158
24159         * reflection.c (create_generic_typespec): Use the `typespec' hash
24160         here, not the `typeref' one.    
24161
24162 2004-04-01  Martin Baulig  <martin@ximian.com>
24163
24164         * class.c (mono_class_inflate_generic_type): Moved the
24165         functionality into a new static inflate_generic_type() which
24166         returns NULL if it didn't do anything.  Only increment the
24167         `mono_stats.inflated_type_count' if we actually inflated
24168         something.
24169         (mono_class_get_full): Check the classes type to see whether we
24170         need to inflate it; also inflate MONO_TYPE_(M)VAR.
24171
24172 2004-04-01  Jackson Harper  <jackson@ximian.com>
24173
24174         * reflection.c: Set culture for assembly references.
24175         
24176 2004-04-01 Ben Maurer  <bmaurer@users.sourceforge.net>
24177
24178         * reflection.[ch], icall.[ch], Fix support for pinning variables.
24179
24180 2004-04-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24181
24182         * assembly.c:
24183         (do_mono_assembly_open): the critical section also covers
24184         mono_image_open and mono_image_open_from_data. Fixes bug #56327.
24185
24186 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24187
24188         * threads.c:
24189         (mono_manage_threads): abort the background threads when finishing.
24190         Fixes bug #47232.
24191
24192 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24193
24194         * gc.c: only close the done_event handle if there was no timeout.
24195         C-ified comments.
24196
24197 2004-03-30  Martin Baulig  <martin@ximian.com>
24198
24199         * icall.c (icall_entries): It's called "System.Activator", not
24200         "System.Activation".    
24201
24202 2004-03-30  Martin Baulig  <martin@ximian.com>
24203
24204         * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
24205         (mono_class_create_from_typespec): Likewise.
24206
24207 2004-03-30  Martin Baulig  <martin@ximian.com>
24208
24209         * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
24210         `has_ctor_constraint' and `initialized'.
24211
24212 2004-03-30  Martin Baulig  <martin@ximian.com>
24213
24214         * reflection.c (encode_new_constraint): New static function to add
24215         the constructor constraint attribute to a type parameter.
24216         (encode_constraints): Call encode_new_constraint() if necessary.
24217
24218         * reflection.h
24219         (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
24220
24221         * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
24222         
24223 2004-03-29 Ben Maurer  <bmaurer@users.sourceforge.net>
24224
24225         * reflection.c, icall.c: add support for pinning variables. 
24226
24227 2004-03-29  Bernie Solomon  <bernard@ugsolutions.com>
24228
24229         * marshal.c (mono_marshal_get_managed_wrapper):
24230         init bool local with zero rather than null.
24231
24232 2004-03-29  Martin Baulig  <martin@ximian.com>
24233
24234         * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
24235         the "official" behavior here.
24236         (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
24237
24238 2004-03-29  Martin Baulig  <martin@ximian.com>
24239
24240         * icall.c: Reflect latest API changes.
24241
24242 2004-03-29  Martin Baulig  <martin@ximian.com>
24243
24244         * loader.c (mono_get_method_from_token): Also call
24245         mono_metadata_load_generic_params () for abstract and interface
24246         methods; replace the type arguments in the method signature with
24247         the ones which are loaded from the metadata.
24248
24249 2004-03-29  Lluis Sanchez Gual  <lluis@ximian.com>
24250
24251         * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
24252         of the lock is not the current thread. MS.NET don't do it, in spite of
24253         what the documentation says. See bug #56157.
24254
24255 2004-03-28  Martin Baulig  <martin@ximian.com>
24256
24257         * class.c (mono_class_init): Don't call init_properties() and
24258         init_events() for generic instances; set `prop->parent' when
24259         inflating properties.
24260
24261         * reflection.c (mono_generic_inst_get_object): Call
24262         `mono_class_init (ginst->klass)'.
24263         (mono_type_get_object): Only create a MonoGenericInst if your
24264         generic type is a TypeBuilder.
24265         (do_mono_reflection_bind_generic_parameters): Only set
24266         `ginst->is_dynamic' if our generic type is a TypeBuilder.
24267
24268 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
24269
24270         * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
24271         Fixes #56091.
24272
24273 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24274
24275         * icall.c: added Kill_internal icall.
24276         * process.[ch]: added Kill_internal icall.
24277
24278 2004-03-25  Martin Baulig  <martin@ximian.com>
24279
24280         * class.h (MonoStats): Added `generic_instance_count',
24281         `inflated_method_count', `inflated_type_count' and
24282         `generics_metadata_size'.       
24283
24284 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24285
24286         * reflection.c: no warnings now.
24287
24288 2004-03-25  Martin Baulig  <martin@ximian.com>
24289
24290         * class.c (mono_class_get_full): New public function; does a
24291         mono_class_get(), but also takes a `MonoGenericContext *'.
24292
24293         * loader.c (mono_field_from_memberref): Renamed to
24294         `field_from_memberref', made static and added `MonoGenericContext *'
24295         argument.
24296         (mono_field_from_token): Added `MonoGenericInst *' argument.
24297         (method_from_memberef): Likewise.
24298         (mono_get_method_from_token): Likewise.
24299         (mono_get_method_full): New public function; does a
24300         mono_get_method(), but also takes a `MonoGenericContext *'.
24301
24302         * verify.c (mono_method_verify): Get the method's generic context
24303         and pass it to mono_field_from_token(), mono_get_method_full() and
24304         mono_class_get_full().
24305
24306 2004-03-25  Martin Baulig  <martin@ximian.com>
24307
24308         * class.c (mono_class_inflate_generic_type): Take a
24309         `MonoGenericContext *' instead of a `MonoGenericInst *' and a
24310         `MonoGenericMethod *'.
24311
24312 2004-03-25  Martin Baulig  <martin@ximian.com>
24313
24314         * loader.h (MonoMethodInflated): Store the MonoGenericContext
24315         instead of the MonoGenericMethod here.
24316
24317 2004-03-25  Martin Baulig  <martin@ximian.com>
24318
24319         * class.h (MonoGenericInst): Added `MonoGenericContext *context';
24320         each time we create a new MonoGenericInst, we also create a new
24321         context which points back to us.
24322
24323         * class.c (inflate_method): Use `ginst->context' instead of
24324         creating a new context.
24325
24326         * loader.c (method_from_memberref): Use
24327         `klass->generic_inst->context' instead of creating a new context.
24328
24329 2004-03-25  Martin Baulig  <martin@ximian.com>
24330
24331         * class.h (MonoGenericContext): New struct.
24332         (MonoGenericMethod): Removed `generic_inst'.
24333
24334         * class.c (mono_class_inflate_generic_method): Take a
24335         `MonoGenericContext *' instead of a `MonoGenericMethod *'.
24336
24337 2004-03-25  Martin Baulig  <martin@ximian.com>
24338
24339         * loader.h (MonoMethodInflated): New typedef.
24340
24341         * metadata.h (MonoMethodSignature): Removed `gen_method', make
24342         `generic_param_count' consume just 30 bits, added `is_inflated'
24343         and `has_type_parameters' flags (one bit each).
24344
24345         * class.c (mono_class_inflate_generic_method): Create a
24346         MonoMethodInflated instead of a MonoMethodNormal and set
24347         `is_inflated' in the method signature.
24348
24349         * class.h (MonoGenericMethod): Removed `generic_method'.
24350
24351 2004-03-25  Lluis Sanchez Gual  <lluis@ximian.com>
24352
24353         * image.c: Make sure the name of a MonoImage is always an absolute path.
24354           This fixes bug #54415.
24355
24356 2004-03-24  Martin Baulig  <martin@ximian.com>
24357
24358         * class.c (mono_class_setup_vtable): If we're a generic instance,
24359         use our generic type's vtable size.
24360
24361 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
24362
24363         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
24364         MONO_NO_UNLOAD env var as a temporary workaround for unloading 
24365         problems.
24366
24367 2004-03-23  Martin Baulig  <martin@ximian.com>
24368
24369         * class.h (MonoDynamicGenericInst): Added `int count_events' and
24370         `MonoEvent *events'.
24371
24372         * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
24373         (typebuilder_icalls): Added "get_event_info"; calls
24374         mono_reflection_event_builder_get_event_info(). 
24375
24376         * reflection.c (mono_reflection_generic_inst_initialize): Added
24377         `MonoArray *events'.
24378         (mono_reflection_event_builder_get_event_info): New function.
24379
24380 2004-03-23  Bernie Solomon  <bernard@ugsolutions.com>
24381
24382         * object.h: add mono_type_initialization_init
24383
24384         * object.c (mono_runtime_class_init): 
24385         implement class constructor synchronization rules
24386         to cope with threading issues.  
24387         add mono_type_initialization_init
24388
24389         * appdomain.c (mono_runtime_init): call 
24390         mono_type_initialization_init
24391
24392         * class.h: removing initializing field from MonoVTable
24393
24394 2004-03-23  Martin Baulig  <martin@ximian.com>
24395
24396         * class.c (my_mono_class_from_generic_parameter): Use
24397         `param->name' if it's not NULL. 
24398
24399 2004-03-22 Ben Maurer  <bmaurer@users.sourceforge.net>
24400
24401         * class.c: do not insert non-virtual methods in the vtable.
24402         * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
24403         that means the method is non-virtual. This never would have
24404         happened before.
24405
24406 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
24407
24408         * profiler.c: Added lock for accessing coverage_hash.
24409
24410 2004-03-22  Martin Baulig  <martin@ximian.com>
24411
24412         * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
24413         `method->method->signature->generic_param_count != 0' to make it
24414         work for interface methods.
24415
24416 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24417
24418         * process.c: quote the string passed to the shell using g_shell_quote.
24419
24420 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24421
24422         * threads.c:
24423         (mono_threads_manage): don't remove the finalizer thread and self
24424         from the threads hash table so that mono_thread_manage can be called
24425         more than once.
24426
24427 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24428
24429         * process.c: quote the arguments when UseShellExecute is true. Fixes
24430         bug #55790.
24431
24432 2004-03-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24433
24434         * threads.c: set mono_thread_detach as a cleanup routine for every
24435         thread. This way it's always executed upon thread termination, either
24436         aborted or finished normally. No more xsp hangs!
24437
24438 2004-03-17  Martin Baulig  <martin@ximian.com>
24439
24440         * class.h (MonoGenericInst): Replaced the `GList *nested' with an
24441         `int count_nested' and a `MonoType **nested'.
24442
24443         * reflection.c (mono_reflection_bind_generic_parameters): Moved
24444         most of the functionality into a new static
24445         do_mono_reflection_bind_generic_parameters() and don't take a
24446         `MonoType *nested_in' argument any more.  Don't compute nested
24447         types here.
24448         (mono_reflection_generic_inst_get_nested_types): New public method
24449         to get nested types.
24450
24451         * class.c (mono_class_create_generic): Set `klass->nested_in' if
24452         we're a nested class.
24453
24454         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
24455         mono_reflection_generic_inst_get_nested_types() to compute the
24456         nested types.
24457
24458 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
24459
24460         * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
24461         descriptive error message under windows.
24462         
24463 2004-03-17  Martin Baulig  <martin@ximian.com>
24464
24465         * class.c (dup_type): Added `const MonoType *original' argument;
24466         copy the attrs from the original type.
24467
24468 2004-03-17  Martin Baulig  <martin@ximian.com>
24469
24470         * metadata.c (do_mono_metadata_parse_generic_inst): Use the
24471         `m->generic_inst_cache' here.
24472
24473 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
24474
24475         * exception.h exception.c: Add stack_overflow_exception.
24476
24477 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24478
24479         * threadpool.c:
24480         (overlapped_callback): call SetEvent *after* invoking the callback.
24481         No need to call CloseHandle.
24482
24483 2004-03-16  Martin Baulig  <martin@ximian.com>
24484
24485         * reflection.c (mono_image_get_fieldref_token): Take a
24486         `MonoReflectionField *' instead of a `MonoClassField *' and a
24487         `MonoClass *'; store the `MonoReflectionField *' in the hash.
24488
24489 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24490
24491         * appdomain.c: don't add the culture to the filename we're looking for
24492         if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
24493
24494 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24495
24496         * locales.c: don't ignore symbols when doing case insensitive compares.
24497         Thanks Dick! Fixes bug #54046.
24498
24499         * threads.c: surround 'threads' usage with enter/leave in
24500         mono_thread_manage.
24501
24502 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
24503
24504         * marshal.c (mono_marshal_get_native_wrapper): Char arrays are 
24505         implicitly marshalled as [Out]. Fixes #55450.
24506
24507         (mono_marshal_get_runtime_invoke): Zero out the result if there is
24508         an exception.
24509
24510 2004-03-16  Martin Baulig  <martin@ximian.com>
24511
24512         * class.c (mono_class_from_generic_parameter): Use the actual
24513         parameter name. 
24514
24515 2004-03-16  Martin Baulig  <martin@ximian.com>
24516
24517         * reflection.c (type_get_signature_size): New static function.
24518         Compues the size of the type in a method signature.
24519         (method_get_signature_size): New static function; calls
24520         type_get_signature_size() to compute the actual size of the
24521         method's signature.
24522         (method_encode_signature): Use method_get_signature_size() to get
24523         the signature's size rather than using `nparams * 10'.
24524
24525 2004-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24526
24527         * file-io.h: define here WapiOverlapped on windows. I don't want the
24528         regular OVERLAPPED one.
24529
24530         * file-io.c:
24531         * threadpool.c: somehow, BindIoCompletionCallback is not found.
24532         Disabling AIO on windows.
24533
24534 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24535
24536         * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
24537         bug #55385.
24538
24539 2004-03-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24540
24541         * appdomain.c: upgraded corlib version.
24542
24543         * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
24544         and BeginWrite. Allow opening files for asynchrnous operations.
24545
24546         * file-io.h: new struct that maps FileStreamAsyncResult.
24547         * icall.c: added new icalls.
24548         * process.[ch]: support setting child process environment variables
24549         and use the SHELL or COMSPEC when UseShellExecute is true.
24550
24551         * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
24552         callback for async. IO is here and also BindHandle.
24553
24554         * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
24555         from here.
24556
24557 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
24558
24559         * reflection.c (create_custom_attr): Allow len == 0.
24560
24561         * object.c (mono_class_compute_gc_descriptor): Fix descriptor
24562         computation on big-endian machines.
24563
24564 2004-03-13  Martin Baulig  <martin@ximian.com>
24565
24566         * class.h (MonoGenericInst): Added `int count_ifaces'.
24567
24568         * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
24569         `ginst->count_ifaces' instead `klass->interface_count' since we
24570         may get called before the vtable is created.
24571
24572         * loader.c (mono_method_get_param_names): If we're a generic
24573         instance, return and don't initialize the class.
24574
24575         * reflection.c (mono_reflection_setup_generic_class): Don't call
24576         ensure_runtime_vtable().
24577         (mono_reflection_bind_generic_parameters): Set
24578         `ginst->count_ifaces'.
24579
24580 2004-03-11  Jackson Harper <jackson@ximian.com>
24581
24582         * icall.c:
24583         * unicode.c:
24584         * unicode.h: Remove unused System.Char icalls.
24585         
24586 2004-03-11  Miguel de Icaza  <miguel@ximian.com>
24587
24588         * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
24589         code when we P/Invoke the first library in Windows.Forms, instead
24590         of when we first open the assembly.
24591
24592         * assembly.c: Drop the lookup from here.
24593
24594 2004-03-10  Martin Baulig  <martin@ximian.com>
24595
24596         * reflection.c (mono_reflection_get_custom_attrs): Use the correct
24597         class for properties, fields and events.  Finally fixes #54945.
24598
24599 2004-03-10  Martin Baulig  <martin@ximian.com>
24600
24601         * metadata.c (mono_metadata_class_equal): New static function;
24602         checks whether two generic instances or two generic parameters are
24603         equal.
24604         (mono_metadata_type_equal): Use mono_metadata_class_equal() to
24605         compare classes.        
24606
24607 2004-03-10  Martin Baulig  <martin@ximian.com>
24608
24609         * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
24610
24611         * reflection.c (inflate_mono_method): Added `MonoObject *obj'
24612         argument and write it into the `reflection_info' field.
24613
24614         * icall.c
24615         (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
24616         (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
24617
24618 2004-03-09  Jackson Harper  <jackson@ximian.com>
24619
24620         * char-conversions.h: use 8 bits for numeric data its all we need
24621         * icall.c: numeric data is only 8 bits now.
24622
24623 2004-03-09  Martin Baulig  <martin@ximian.com>
24624
24625         * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
24626
24627         * class.c (init_properties, init_events): Initialize the new
24628         `parent' field.
24629
24630         * reflection.c (typebuilder_setup_properties): Likewise.
24631         (typebuilder_setup_events): Likewise.
24632
24633         * reflection.h (MonoEventInfo): Replaced `parent with
24634         `declaring_type' and `reflected_type'.
24635
24636         * icall.c (ves_icall_get_property_info): Distinguish between
24637         declaring and reflected type.
24638         (ves_icall_get_event_info): Likewise.
24639
24640 2004-03-09  Martin Baulig  <martin@ximian.com>
24641
24642         * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
24643         (ves_icall_Type_GetField): Correctly set field->klass.
24644
24645 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
24646
24647         * loader.h: Fix warning.
24648
24649 2004-03-08  Miguel de Icaza  <miguel@ximian.com>
24650
24651         *  loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
24652         library routine if present.  Notice that it will still continue
24653         executing even if its missing, for those working on the Gtk#
24654         edition of Windows.Forms.
24655
24656         * assembly.c (do_mono_assembly_open): If loading the
24657         System.Windows.Forms call mono_loader_wini_init.
24658
24659 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
24660
24661         * class.h: Added MonoRemoteClass struct.
24662         * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
24663         function for MonoStrings.
24664         * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
24665         Added internal call for getting the proxy type.
24666         * marshal.c: Get the type of transparent proxies from its remote_class.
24667         Added methods that generate the IL for type checks and casts:
24668         mono_marshal_get_isinst, mono_marshal_get_castclass, 
24669         mono_marshal_get_proxy_cancast.
24670         * marshal.h: Declaration of the previous new methods.
24671         * object.c: Added new moethods for creating and updating MonoRemoteClass
24672         instances: mono_remote_class, mono_upgrade_remote_class, 
24673         * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
24674         * verify.c: FIx transparent_proxy_fields layout.
24675         * appdomain.c: Bump corlib version.
24676
24677 2004-03-04  Jackson Harper  <jackson@ximian.com>
24678
24679         * icall.c: Add icall to access char conversion tables.
24680         * char-conversions.h: Character conversion tables.
24681         * Makefile.am: Add char-conversions.h private header file.
24682         
24683 2004-03-04  Zoltan Varga  <vargaz@freemail.hu>
24684
24685         * appdomain.c (unload_thread_main): Increase unloading timeout to
24686         10 sec as a temporary workaround for Nant problems.
24687
24688 2004-02-29  Zoltan Varga  <vargaz@freemail.hu>
24689
24690         * gc.c: Add checks for GC_enable and GC_disable.
24691
24692         * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
24693         (jaak@zd.com.pl). Fix memory corruption in String.Replace 
24694         (bug #54988).
24695         
24696 2004-02-27  Martin Baulig  <martin@ximian.com>
24697
24698         * reflection.c (mono_reflection_bind_generic_parameters): Take a
24699         `MonoReflectionType *' instead of a `MonoType *'.
24700
24701 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
24702
24703         * gc.c (run_finalize): Avoid finalizing the object representing the
24704         finalizer thread.
24705         (finalizer_thread): Fix warning.
24706
24707 2004-02-25  Martin Baulig  <martin@ximian.com>
24708
24709         * class.c (_mono_class_get_instantiation_name): Added `int offset'
24710         argument for nested types.
24711         (mono_class_create_generic): Added support for nested generictypes.
24712
24713         * class.h (MonoGenericInst): Added `MonoType *nested_in' and
24714         `GList *nested'.
24715
24716         * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
24717
24718         * reflection.c (method_encode_signature): Increase the minimum
24719         value of `size' from 10 to 11.
24720         (mono_reflection_bind_generic_parameters): Take `int type_argc'
24721         and `MonoType **types' arguments instead of the `MonoArray
24722         *types'; added `MonoType *nested_in'.  Recursively instantiate
24723         nested classes. 
24724
24725 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
24726
24727         * appdomain.h (MonoDomain): Add preallocated null_reference_ex and 
24728         stack_overflow_ex members which are used by exception handling.
24729
24730         * appdomain.c (mono_runtime_init): Initialize the new members.
24731
24732         * gc.c (mono_gc_enable): New helper function.
24733         * gc.c (mono_gc_disable): New helper function.
24734
24735 2004-02-23  Martin Baulig  <martin@ximian.com>
24736
24737         * icall.c: I must have been really stupid - make it actually work
24738         this time ;-)
24739
24740 2004-02-23  Martin Baulig  <martin@ximian.com>
24741
24742         * loader.c (method_from_memberref): Only inflate the method if
24743         it's in another klass.
24744
24745 2004-02-23  Martin Baulig  <martin@ximian.com>
24746
24747         * class.c (mono_class_inflate_generic_type): Fixed two bugs.
24748         (mono_class_init): If we're a generic instance and an interface,
24749         compute `class->interface_id'; also create `class->interfaces'
24750         here and inflate them.
24751
24752         * metadata.c (do_mono_metadata_parse_generic_inst): Compute
24753         `ginst->is_open'.
24754         (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
24755
24756         * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
24757
24758 2004-02-15  Miguel de Icaza  <miguel@ximian.com>
24759
24760         * reflection.c (method_encode_code): Improved the error message
24761         generated by the exception.
24762
24763 2004-02-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24764
24765         * icall.c: Martin did not do what he said in the ChangeLog for
24766         2004-02-18, but put back the changes for properties and events.
24767         Commenting those changes out again and adding comment to bug #54518.
24768         
24769         * process.c: removed warning.
24770
24771 2004-02-20  Zoltan Varga  <vargaz@freemail.hu>
24772
24773         * marshal.c (emit_struct_conv): Print an error message instead of
24774         asserting when a type does not have the StructLayout attribute.
24775
24776 2004-02-20  Martin Baulig  <martin@ximian.com>
24777
24778         * reflection.c (mono_type_get_object): Also use the cache for
24779         generic instances.
24780         (mono_reflection_bind_generic_parameters): Always compute
24781         `ginst->ifaces'.        
24782
24783 2004-02-20  Martin Baulig  <martin@ximian.com>
24784
24785         * class.h (MonoGenericMethod): Removed `klass'.
24786
24787         * class.c (mono_class_inflate_generic_method): Added `MonoClass
24788         *klass' argument.
24789
24790 2004-02-20  Martin Baulig  <martin@ximian.com>
24791
24792         * reflection.c (method_encode_methodspec): Actually use the
24793         uninflated signature for the memberref.
24794
24795 2004-02-20  Martin Baulig  <martin@ximian.com>
24796
24797         * class.h (MonoGenericMethod): Removed `declaring'.
24798
24799         * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
24800         is NULL, compute it here.
24801
24802 2004-02-20  Martin Baulig  <martin@ximian.com>
24803
24804         * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
24805
24806         * metadata.c (mono_metadata_generic_inst_hash): New method.
24807         (mono_metadata_generic_inst_equal): New method.
24808
24809         * reflection.c (mono_reflection_bind_generic_parameters): Use the
24810         `klass->image->generic_inst_cache' cache to avoid creating
24811         duplicate MonoGenericInst's.
24812
24813         * class.c (mono_class_inflate_generic_type): Use the cache.
24814
24815 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
24816
24817         * object.c: fixed gc descriptor calculation for embedded valuetypes.
24818
24819 2004-02-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24820
24821         * icall.c: added Socket.WSAIoctl icall.
24822
24823         * socket-io.[ch]: implemented
24824         ves_icall_System_Net_Sockets_Socket_WSAIoctl.
24825
24826 2004-02-19  Atsushi Enomoto  <atsushi@ximian.com>
24827
24828         * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
24829
24830 2004-02-18  Urs C Muff  <umuff@quark.com>
24831
24832         * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
24833         this work on PPC and other big-endian architectures.
24834
24835         * debug-mono-symfile.h: Prepended the names of all the `guint32'
24836         fields with an underscore to make sure they're only accessed by
24837         the read32() macro.
24838
24839 2004-02-18  Martin Baulig  <martin@ximian.com>
24840
24841         * icall.c: Put the klass->refclass changes back for methods and
24842         fields, but not for properties and events.  We're currently not
24843         distinguishing between DeclaringType and ReflectedType for
24844         properties and events, that's what caused the regressions.
24845
24846 2004-02-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24847
24848         * object.c:
24849         (mono_async_result_new): the handle can be NULL.
24850
24851         * threadpool.c: Use an event instead of a semaphore, don't initialize
24852         it until needed. This saves quite a few semaphores from being created
24853         when using the threadpool.
24854
24855 2004-02-18  Zoltan Varga  <vargaz@freemail.hu>
24856
24857         * object.c (mono_string_is_interned_lookup): Fix interning of long
24858         strings. Fixes #54473.
24859
24860         * domain.c (ldstr_equal): Optimize if the two strings are equal.
24861
24862         * icall.c: Revert the klass->refclass changes since they introduce
24863         regressions (bug #54518).
24864
24865 2004-02-18  Martin Baulig  <martin@ximian.com>
24866
24867         * class.c (mono_class_init): If we're a generic instance and don't
24868         come from a TypeBuilder, inflate our members here.
24869         (mono_class_from_generic): Removed; just use `ginst->klass' instead.
24870         (mono_class_create_generic): New public method.
24871         (mono_class_initialize_generic): Removed.
24872         (get_instantiation_name): Renamed to
24873         _mono_class_get_instantiation_name() and made it public.
24874
24875 2004-02-18  Martin Baulig  <martin@ximian.com>
24876
24877         * class.c (mono_class_inflate_generic_type): Clear the new
24878         instance's `nginst->klass' when inflating a generic instance.
24879         (mono_class_is_subclass_of): Added (basic) support for generic
24880         instances.
24881
24882 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
24883
24884         * appdomain.h, domain.c: use a MonoCodeManager instead of a
24885         MonoMempool to hold compiled native code.
24886
24887 2004-02-17  Martin Baulig  <martin@ximian.com>
24888
24889         * class.h (MonoDynamicGenericInst): Added `count_properties' and
24890         `properties'.
24891
24892         * reflection.c (mono_reflection_generic_inst_initialize): Added
24893         `MonoArray *properties' argument.
24894
24895         * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.    
24896
24897 2004-02-17  Martin Baulig  <martin@ximian.com>
24898
24899         * icall.c (ves_icall_Type_GetFields): Renamed to
24900         ves_icall_Type_GetFields_internal() and added a
24901         `MonoReflectionType *rtype' argument; pass it to
24902         mono_field_get_object() to set the field's "reflected" type.
24903         (ves_icall_Type_GetConstructors): Likewise.
24904         (ves_icall_Type_GetEvents): Likewise.
24905         (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
24906         argument; pass it to mono_method_get_object() to set the method's
24907         "reflected" type.       
24908
24909 2004-02-17  Martin Baulig  <martin@ximian.com>
24910
24911         * class.h (MonoDynamicGenericInst): New type.
24912         (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
24913
24914         * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
24915         (ves_icall_MonoGenericInst_GetConstructors): New interncall.
24916         (ves_icall_MonoGenericInst_GetFields): New interncall.
24917
24918         * class.c (mono_class_from_generic): Don't call
24919         mono_class_initialize_generic() if this is a dynamic instance;
24920         ie. it's being created from a TypeBuilder.
24921         Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
24922         `class->byval_arg.type'.
24923
24924         * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
24925         to `inflate_method' and made static.
24926         (mono_reflection_inflate_field): Removed.
24927         (mono_reflection_generic_inst_initialize): New public method.
24928
24929         * reflection.h (MonoReflectionGenericInst): Removed `methods',
24930         `ctors' and `fields'; added `initialized'.
24931
24932 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
24933
24934         * debug-helpers.c (mono_method_full_name): Fix output for empty
24935         namespaces.
24936
24937 2004-02-12  Martin Baulig  <martin@ximian.com>
24938
24939         * class.h (MonoClassField): Added `MonoType *generic_type'.
24940
24941         * reflection.c (mono_image_get_fieldref_token): Added support for
24942         instantiated generic types.
24943         (field_encode_inflated_field): Removed.
24944         (mono_image_get_inflated_field_token): Removed.
24945         (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
24946
24947         * reflection.h (MonoReflectionInflatedField): Removed.
24948
24949 2004-02-12  Martin Baulig  <martin@ximian.com>
24950
24951         * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
24952         `gen_method' field from MonoMethodHeader to MonoMethodSignature.
24953
24954         * reflection.c (mono_image_get_methodspec_token): Take a
24955         `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
24956         (mono_image_create_token): Check whether we have a
24957         `method->signature->gen_method' and call
24958         mono_image_get_methodspec_token() if appropriate.
24959         (inflated_method_get_object): Removed.
24960         (mono_reflection_bind_generic_method_parameters): Return a
24961         `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
24962         (mono_reflection_inflate_method_or_ctor): Likewise.
24963
24964         * reflection.h (MonoReflectionInflatedMethod): Removed.
24965
24966 2004-02-12  Zoltan Varga  <vargaz@freemail.hu>
24967
24968         * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
24969         for custom valuetype marshalling.
24970
24971         * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
24972
24973 2004-02-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24974
24975         * icall.c: fixed WSAGetLastError_internal name.
24976
24977 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
24978
24979         * threads.c (mono_thread_attach): Allow this to be called multiple
24980         times for a thread.
24981         
24982         * threads.c (build_wait_tids): Do not wait for ourselves.
24983
24984         * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the 
24985         appdomain list is empty.
24986
24987         * marshal.c (mono_marshal_get_native_wrapper): Do not free the
24988         memory returned by mono_string_builder_to_utf16, since it points into
24989         managed memory. Thanks to Bernie Solomon for noticing this.
24990
24991         * icall.c: Add AppDomainSetup icalls.
24992
24993         * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
24994
24995         * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
24996         types.
24997
24998         * reflection.c (reflection_methodbuilder_to_mono_method): Save
24999         custom attributes to the method_aux struct. Also fix array indexes etc.
25000
25001         * loader.c (mono_method_get_param_names): Make dynamic case work again.
25002         
25003 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
25004
25005         * icall.c, loader.c: icall cleanup: we save quite a bit of memory
25006         (both static and runtime) and reduce startup time.
25007
25008 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
25009
25010         * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
25011         AsAny marshalling conversion instead of crashing.
25012
25013         * marshal.c: Fix warnings.
25014
25015 2004-02-09  Martin Baulig  <martin@ximian.com>
25016
25017         * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
25018
25019         * reflection.h (MonoReflectionInflatedMethod): Removed the
25020         `declaring' field, it's now in the unmanaged MonoGenericMethod.
25021
25022         * reflection.c (method_encode_methodspec): Removed the `method'
25023         argument; we get it from `gmethod->declaring'.
25024         (inflated_method_get_object): Removed the `declaring' argument.
25025
25026 2004-02-09  Martin Baulig  <martin@ximian.com>
25027
25028         * class.h (MonoGenericMethod): New type.
25029         (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
25030         `generic_method'.
25031
25032         * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
25033         a `MonoGenericMethod *gen_method' one.
25034
25035         * class.c (mono_class_inflate_generic_type): Take an additional
25036         `MonoGenericMethod * argument.  This is only non-NULL if we're
25037         inflating types for a generic method.   
25038         (mono_class_inflate_generic_signature): Renamed to
25039         inflate_generic_signature() and made static; take a
25040         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25041         (inflate_generic_header): Take a `MonoGenericMethod *' argument
25042         instead of a `MonoGenericInst *' one.
25043         (mono_class_inflate_generic_method): Likewise.
25044
25045         * reflection.c (encode_generic_method_sig): Take a
25046         `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
25047         (method_encode_methodspec): Likewise.
25048         (inflated_method_get_object): Likewise. 
25049
25050         * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
25051         field with a `MonoGenericMethod *gmethod' one.  
25052
25053 2004-02-08  Bernie Solomon  <bernard@ugsolutions.com>
25054
25055         * class.h (mono_class_has_parent): add parens to expansion
25056         so you can ! this.
25057
25058 2004-02-08  Martin Baulig  <martin@ximian.com>
25059
25060         * image.h (MonoImage): Removed `generics_cache'.
25061
25062         * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
25063         instead of a `MonoType *' argument; removed the `inflate_methods'
25064         argument.  Don't inflate methods here.
25065
25066         * loader.c (find_method): If it's a generic instance, call
25067         mono_class_init() on the `sclass->generic_inst->generic_type'.
25068
25069         * metadata.c (mono_type_size): Make this work on uninitialized
25070         generic instances; call it on the `ginst->generic_type's class.
25071
25072         * reflection.c (mono_reflection_bind_generic_parameters): Call
25073         mono_class_from_generic() to create the `ginst->klass'.
25074
25075 2004-02-08  Martin Baulig  <martin@ximian.com>
25076
25077         * class.h (MonoClass): Changed type of `generic_inst' from
25078         `MonoType *' to `MonoGenericInst *'.
25079
25080 2004-02-08  Martin Baulig  <martin@ximian.com>
25081
25082         * icall.c (ves_icall_Type_BindGenericParameters): Just call
25083         mono_type_get_object(), this is now creating a `MonoGenericInst'
25084         for MONO_TYPE_GENERICINST.
25085         (ves_icall_MonoGenericInst_GetParentType): Likewise.
25086         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
25087
25088         * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
25089         instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
25090         (inflated_method_get_object): Added `MonoClass *refclass' argument.
25091         (mono_reflection_inflate_method_or_ctor): Correctly set declaring
25092         and reflected type.
25093
25094         * reflection.h (MonoReflectionInflatedMethod): Removed
25095         `declaring_type' and `reflected_type'.
25096
25097 2004-02-08  Martin Baulig  <martin@ximian.com>
25098
25099         * class.h (MonoGenericInst): Added `MonoType *parent' and
25100         `MonoType **ifaces'.
25101
25102         * reflection.h (MonoReflectionGenericInst): Removed `klass',
25103         `parent' and `interfaces'.
25104
25105         * reflection.c (mono_reflection_bind_generic_parameters): Take a
25106         `MonoType *' argument and return a `MonoType *'.
25107
25108         * icall.c
25109         (ves_icall_MonoGenericInst_GetParentType): New interncall.
25110         (ves_icall_MonoGenericInst_GetInterfaces): Likewise.    
25111
25112 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
25113
25114         * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
25115         valuetype marshalling.
25116
25117 2004-02-06  Martin Baulig  <martin@ximian.com>
25118
25119         * class.c
25120         (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
25121         (my_mono_class_from_generic_parameter): Likewise.
25122
25123 2004-02-06  Zoltan Varga  <vargaz@freemail.hu>
25124
25125         * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
25126         contents of the symbol files lazily.
25127
25128         * object.h (MonoThread): Add 'name' and 'name_len' fields.
25129
25130         * threads.h threads.c icall.c: New icalls for getting and setting the
25131         threads name.
25132
25133 2004-02-05  Zoltan Varga  <vargaz@freemail.hu>
25134
25135         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID): 
25136         Raise an exception when the domain is not found.
25137
25138 2004-02-03  Martin Baulig  <martin@ximian.com>
25139
25140         * reflection.c (mono_image_get_methodspec_token): Use the
25141         uninflated signature; fixes gen-33.
25142
25143 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
25144
25145         * gc.c threads.c: Make the finalizer thread a normal managed thread so
25146         the finalizer code can use thread functionality.
25147
25148         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for 
25149         the finalizer thread.
25150
25151         * threads.c: Make some functions more robust.
25152
25153         * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
25154
25155         * metadata.h: Add new marshalling conventions.
25156
25157         * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
25158         stringbuilder marshalling. Fixes #53700.
25159
25160         * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
25161
25162         * reflection.c (mono_image_get_type_info): Save declarative security
25163         info.
25164
25165         * reflection.c (mono_image_get_field_info): Handle uninitialized 
25166         unmanaged fields as well.
25167
25168         * appdomain.c: Bump corlib version.
25169
25170 2004-02-01  Martin Baulig  <martin@ximian.com>
25171
25172         * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
25173         method type arguments.  
25174
25175 2004-01-30  Duncan Mak  <duncan@ximian.com>
25176
25177         * marshal.h: Add prototype for
25178         "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
25179         and
25180         "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
25181         fix the build.
25182
25183 2004-01-30  Zoltan Varga  <vargaz@freemail.hu>
25184
25185         * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
25186         (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
25187
25188 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
25189
25190         * marshal.c (mono_marshal_get_native_wrapper): Add support for
25191         custom marshalling of valuetypes.
25192
25193         * marshal.c: Fix some warnings.
25194
25195 2004-01-29  Martin Baulig  <martin@ximian.com>
25196
25197         * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
25198         for generic method parameters.
25199
25200         * reflection.c (method_encode_methodspec): Write the uninflated
25201         signature into the methodspec table.
25202         (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
25203         is always the uninflated method.
25204         (reflection_methodbuilder_to_mono_method): Copy the generic
25205         parameters from the MethodBuilder into `header->gen_params'.
25206
25207 2004-01-29  Zoltan Varga  <vargaz@freemail.hu>
25208
25209         * class.c (mono_class_from_generic_parameter): Fix warning.
25210
25211 2004-01-27  Martin Baulig  <martin@ximian.com>
25212
25213         * class.c (mono_class_from_generic_parameter): Don't create
25214         `klass->methods' here.  
25215
25216 2004-01-26  Zoltan Varga  <vargaz@freemail.hu>
25217
25218         * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
25219         extension since it does not work with libraries named lib<FOO>.dll.so.
25220
25221 2004-01-25  Martin Baulig  <martin@ximian.com>
25222
25223         * class.c (mono_class_inflate_generic_type): Added support for
25224         MONO_TYPE_GENERICINST.
25225
25226         * reflection.c (mono_reflection_inflate_method_or_ctor): Also
25227         inflate methods on open constructed types.      
25228
25229 2004-01-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25230
25231         * object.c: fire ProcessExit event in the root AppDomain after running
25232         Main. Fixes bug #53299.
25233
25234 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
25235
25236         * socket-io.c: include the new socket-wrappers.h header.
25237         Use the wrappers instead of the unix socket functions to make the code
25238         more clear.
25239
25240 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
25241
25242         * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
25243
25244         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25245         Fixes #22532.
25246
25247 2004-01-22  Zoltan Varga  <vargaz@freemail.hu>
25248
25249         * reflection.c (mono_image_create_pefile): Handle the case when the
25250         entry point is not a MethodBuilder.
25251
25252         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25253         field to ReflectionMethod since it is not allways a builder.
25254
25255         * reflection.c (type_get_fully_qualified_name): New helper function to
25256         return the fully qualified name of a type.
25257
25258         * reflection.c (encode_marshal_blob): Always emit the fully qualified
25259         type name for custom marshallers.
25260
25261         * reflection.c (mono_marshal_spec_from_builder): Ditto.
25262
25263         * class.c (mono_class_setup_vtable): If a parent class already 
25264         implements an interface, use the implementing methods from that class.
25265         Fixes #53148.
25266
25267 2004-01-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25268
25269         * threadpool.c: just return instead of ExitThread to allow for thread
25270         clean up earlier.
25271
25272 2004-01-21  Zoltan Varga  <vargaz@freemail.hu>
25273
25274         * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
25275         when closing resource modules.
25276
25277         * reflection.c (mono_image_create_pefile): Handle the case when the
25278         entry point is not a MethodBuilder.
25279
25280         * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
25281         field to ReflectionMethod since it is not allways a builder.
25282
25283 2004-01-20  Bernie Solomon  <bernard@ugsolutions.com>
25284
25285         * marshal.c (mono_marshal_get_managed_wrapper): 
25286         mono_marshal_alloc takes native int so CONV_I
25287         the arg for 64bits.
25288
25289 2004-01-20  Zoltan Varga  <vargaz@freemail.hu>
25290
25291         * reflection.c (fixup_cattrs): New function to fixup the methoddef
25292         tokens in the cattr table. Fixes #53108.
25293
25294 2004-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25295
25296         * loader.c: don't trim ".dll" before looking up in the config file.
25297         Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
25298
25299 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
25300
25301         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): 
25302         Return the module which contains the resource as well.
25303         (ves_icall_System_Reflection_Module_Close): New icall.
25304
25305         * appdomain.c: Bump corlib version number.
25306
25307         * image.c (mono_image_addref): New public function.
25308
25309         * assembly.c: Call mono_image_addref.
25310
25311         * reflection.c (mono_module_get_object): Increase reference count of 
25312         the image.
25313
25314         * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
25315         Fixes #22532.
25316
25317         * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
25318         Applied patch from Bernie Solomon  <bernard@ugsolutions.com>. Throw
25319         proper exceptions on DllImport problems.
25320
25321 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
25322
25323         * class.c, metadata.c: eliminate CSIZE macro.
25324
25325 2004-01-19  Lluis Sanchez Gual  <lluis@ximian.com>
25326
25327         * icall.c: Added ves_icall_type_IsInstanceOf internal call.
25328         * object.h: Added async_callback field in MonoAsyncResult.
25329         * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
25330         * verify.c: Added async_callback in MonoAsyncResult layout.
25331
25332 2004-01-17  Zoltan Varga  <vargaz@freemail.hu>
25333
25334         * reflection.c (mono_reflection_get_custom_attrs): Add support
25335         for Modules.
25336
25337 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
25338
25339         * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder 
25340         marshalling.
25341         (mono_marshal_method_from_wrapper): Add null pointer check.
25342
25343 2004-01-16  Martin Baulig  <martin@ximian.com>
25344
25345         * debug-mono-symfile.h: Set version number to 36 and reflect
25346         latest symbol writer changes.
25347
25348 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
25349
25350         * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
25351         multi-dimensional arrays.
25352         (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
25353         (mono_class_from_mono_type): Use bounded_array_class_get.
25354         
25355         * class.c (mono_bounded_array_class_get): New function which takes
25356         a 'bounded' bool argument to distinguish vectors from one dimensional
25357         arrays.
25358
25359         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call 
25360         bounded_array_class_get if the array has bounds.
25361
25362         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
25363         Search modules loaded using AssemblyBuilder:AddModule as well.
25364
25365 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25366
25367         * appdomain.c: increased corlib version.
25368         * filewatcher.c: removed g_print.
25369         * icall.c:
25370         (get_property_info): only allocate what is actually requested.
25371         (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
25372
25373 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25374
25375         * Makefile.am: added filewatcher.[ch]
25376         * filewatcher.[ch]: FileSystemWatcher runtime support.
25377         * icall.c: added new FSW icalls.
25378
25379 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
25380
25381         * string-icalls.c: fix stringbuilder regression as suggested by
25382         Iain McCoy <iain@mccoy.id.au>.
25383
25384 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
25385
25386         * process.c (process_read_stringtable_block): Recognize '007f' as
25387         a language neutral stringtable block.
25388
25389 2004-01-12  Patrik Torstensson
25390
25391         * object.h (MonoStringBuilder) : Changed layout to support our
25392         new stringbuilder class.
25393         * marshal.c: Change marshalling to support the new layout of 
25394         string builder.
25395         * appdomain.c: increased version number because new layout of
25396         string builder.
25397
25398 2004-01-12  Zoltan Varga  <vargaz@freemail.hu>
25399
25400         * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
25401         assembly name as an string instead of an AssemblyName, since it is
25402         easier to extract info from it.
25403
25404         * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
25405         the culture subdirectories too. Fixes #52231.
25406
25407 2004-01-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25408
25409         * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
25410         It takes 2 new parameters with an optional name for the method to look
25411         for and case ignoring info.
25412
25413         * threadpool.c: removed unused variable.
25414
25415 2004-01-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25416
25417         * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
25418         It takes 2 new parameters with an optional name for the property to look
25419         for and case ignoring info.
25420         Fixes bug #52753.
25421
25422 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
25423
25424         * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
25425         Fix #52451.
25426
25427 2004-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25428
25429         * appdomain.c:
25430         * assembly.c: escape the uri before passing it to g_filename_from_uri.
25431         Fixes bug #52630.
25432
25433 2004-01-07  Zoltan Varga  <vargaz@freemail.hu>
25434
25435         * reflection.c: Add support for more than one unmanaged resource.
25436
25437         * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
25438         in field->def_value, as done in all other cases.
25439
25440         * reflection.c (mono_reflection_get_custom_attrs): Add support for
25441         TypeBuilders.
25442
25443         * reflection.c (mono_reflection_create_runtime_class): Remove 
25444         errorneous assignment to klass->element_class, since it is already
25445         done in mono_reflection_setup_internal_class.
25446
25447 2004-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25448
25449         * gc.c: added missing LeaveCriticalSection.
25450         * icall.c: indented a couple of lines.
25451         * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
25452         if we call EndInvoke inside a callback. Fixes bug #52601.
25453
25454 2004-01-07  Martin Baulig  <martin@ximian.com>
25455
25456         * mono-debug-debugger.h
25457         (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
25458
25459 2004-01-06  Miguel de Icaza  <miguel@ximian.com>
25460
25461         * appdomain.c: Use messages in NotImplementedException.
25462
25463         * exception.c (mono_get_exception_not_implemented): Now this takes
25464         a message argument.
25465
25466         * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
25467         exception instead of g_asserting an aborting when something is not
25468         implemented.
25469
25470         Add some inline docs.
25471
25472 2004-01-05  Zoltan Varga  <vargaz@freemail.hu>
25473
25474         * reflection.h: Update after changes to object layout.
25475
25476         * reflection.c: Implement saving of unmanaged aka win32 resources.
25477
25478         * appdomain.c: Bump version number.
25479
25480         * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID): 
25481         Handle missing domains gracefully.
25482
25483 2004-01-05  Atsushi Enomoto <atsushi@ximian.com>
25484
25485         * file-io.c : On Windows, there are much more invalid_path_chars.
25486
25487 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
25488
25489         * class.h, object.c: prepare for GetType () speedup.
25490
25491 2003-12-24  Atsushi Enomoto <atsushi@ximian.com>
25492
25493         * profiler.c: workaround for --profile null reference exception on
25494           cygwin. Patch by Patrik Torstensson.
25495
25496 2003-12-22  Bernie Solomon  <bernard@ugsolutions.com>
25497
25498         * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
25499         make work for unaligned access.
25500
25501 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
25502
25503         * class.c: small cleanup (class->fields [i] -> field).
25504         * image.c: check address of metadata is valid.
25505
25506 2003-12-22  Zoltan Varga  <vargaz@freemail.hu>
25507
25508         * assembly.h assembly.c (mono_assembly_loaded): New public function to
25509         search the list of loaded assemblies.
25510
25511         * reflection.c (mono_reflection_type_from_name): Use 
25512         mono_assembly_loaded instead of mono_image_loaded.
25513
25514         * reflection.c: Fix warnings.
25515
25516 2003-12-20  Zoltan Varga  <vargaz@freemail.hu>
25517
25518         * image.h (MonoImage): Add a new 'dynamic' field to denote that the image 
25519         is dynamic. This is needed since an assembly can contain both dynamic and
25520         non-dynamic images.
25521
25522         * class.c loader.c metadata.c object.c: Use image->dynamic instead of 
25523         assembly->dynamic.
25524
25525         * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
25526
25527         * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
25528         to store modules loaded using AddModule.
25529
25530         * reflection.c (mono_image_fill_file_table): Generalize this so it works
25531         on Modules.
25532
25533         * reflection.c (mono_image_fill_export_table_from_class): New helper function.
25534
25535         * reflection.c (mono_image_fill_export_table_from_module): New function to
25536         fill out the EXPORTEDTYPES table from a module.
25537
25538         * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
25539         into a separate function. Also handle loaded non-dynamic modules.
25540
25541         * reflection.c (mono_image_basic_init): Fix memory allocation.
25542
25543         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25544
25545         * assembly.c (mono_assembly_load_references): Make this public.
25546
25547 2003-12-19  Martin Baulig  <martin@ximian.com>
25548
25549         * class.c (mono_class_initialize_generic): Made this static, take
25550         a `MonoGenericInst *' instead of a `MonoClass *'.
25551         (mono_class_from_generic): Call mono_class_initialize_generic()
25552         unless we're already initialized or being called from
25553         do_mono_metadata_parse_generic_inst().
25554
25555         * class.h (MonoGenericInst): Added `initialized' and
25556         `init_pending' flags.
25557
25558         * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
25559         `mono_class_init (gklass)' or mono_class_initialize_generic()
25560         here; set `generic_inst->init_pending' while parsing the
25561         `type_argv'.
25562
25563 2003-12-19  Bernie Solomon  <bernard@ugsolutions.com>
25564
25565         * locales.c: include string.h for memxxx prototypes
25566
25567 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
25568
25569         * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
25570         constructor when accessing literal fields.
25571
25572 2003-12-17  Zoltan Varga  <vargaz@freemail.hu>
25573
25574         * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
25575
25576         * reflection.c (assembly_add_resource_manifest): New function to fill
25577         the MANIFESTRESOURCE table.
25578
25579         * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
25580
25581         * reflection.h: Update to changes in class layout.
25582
25583         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): 
25584         Reenable call to mono_runtime_is_shutting_down ().
25585
25586         * appdomain.c (mono_runtime_is_shutting_down): New helper function to
25587         determine if the runtime is shutting down.
25588
25589 2003-12-16  Jackson Harper <jackson@ximian.com>
25590
25591         * icall.c: comment out call to mono_runtime_is_shutting_down to
25592         fix build.
25593         
25594 2003-12-16  Zoltan Varga  <vargaz@freemail.hu>
25595
25596         * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
25597         (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
25598
25599 2003-12-15  Bernie Solomon  <bernard@ugsolutions.com>
25600
25601         * reflection.c: move definition of swap_with_size
25602         to before its first call
25603
25604 2003-12-15  Zoltan Varga  <vargaz@freemail.hu>
25605
25606         * appdomain.c (mono_runtime_is_shutting_down): New public function.
25607
25608         * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
25609         icall.
25610
25611         * object.c: Fix warnings.
25612
25613         * icall.c (ves_icall_Type_Get...): Only consider inherited static
25614         members if FlattenHierarchy is set.
25615
25616         * reflection.c (mono_image_add_decl_security): New function to emit
25617         declarative security.
25618
25619         * reflection.h reflection.c: Add support for declarative security.
25620
25621         * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25622         
25623 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
25624
25625         appdomain.c (MONO_CORLIB_VERSION): Bump version number.
25626         
25627         * appdomain.c verify.c: Moved corlib version checking into its own
25628         function in appdomain.c since it needs to create vtables etc.
25629
25630 2003-12-13  Patrik Torstensson <p@rxc.se>
25631
25632         * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this 
25633         instead of unwrapped server.
25634
25635 2003-12-12  Zoltan Varga  <vargaz@freemail.hu>
25636
25637         * verify.c (check_corlib): Fix field index.
25638
25639 2003-12-10  Zoltan Varga  <vargaz@freemail.hu>
25640
25641         * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
25642         GetGacPath icall.
25643
25644 2003-12-10  Bernie Solomon  <bernard@ugsolutions.com>
25645
25646         * process.c:  (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
25647         ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
25648         cope with sizeof(size_t) != sizeof(guint32).
25649
25650 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25651
25652         * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
25653         in case of failure.
25654
25655 2003-12-10  Mark Crichton <crichton@gimp.org>
25656
25657         * icall.c: removed the GetNonZeroBytes.  We now handle this case
25658         in managed code.
25659
25660         * rand.c, rand.h: Same here.  Also cleaned up the clode slightly.
25661
25662 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
25663
25664         * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
25665         marked as deleted.
25666
25667 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
25668
25669         * verify.c (check_corlib): Handle the case when the version field is 
25670         initialized by a static constructor.
25671
25672 2003-12-08  Patrik Torstensson  <p@rxc.se>
25673
25674     * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
25675
25676 2003-12-08  Martin Baulig  <martin@ximian.com>
25677
25678         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
25679         a MonoReflectionGenericParameter, also take the parameter index
25680         and name as arguments.
25681         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
25682         (ves_icall_MonoGenericParam_initialize): New interncall.
25683         (ves_icall_Type_make_byref_type): New interncall.
25684
25685         * reflection.h (MonoReflectionGenericParam): Derive from
25686         MonoReflectionType, not just from MonoObject.  Added `refobj' and
25687         `index' fields.
25688
25689         * reflection.c (mono_reflection_define_generic_parameter): Create
25690         and return a new MonoReflectionGenericParam; don't initialize the
25691         constraints here.
25692         (mono_reflection_initialize_generic_parameter): New public method;
25693         initializes the constraints and creates the `param->pklass'.
25694
25695 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
25696
25697         * reflection.h reflection.c: Use the new fields 'num_types', 
25698         'num_fields' and 'num_methods' to track the number of types etc.
25699
25700         * verify.c (check_corlib): Check corlib version number.
25701
25702 2003-12-07  Zoltan Varga  <vargaz@freemail.hu>
25703
25704         * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
25705         function works on all methods.
25706
25707 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
25708
25709         * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
25710         * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
25711         the custom_type_info flag of the transparent proxy.
25712         * object.c: Added method mono_object_isinst_mbyref for casting mbyref
25713         objects that supports IRemotingTypeInfo.
25714         * object.h: Added custom_type_info field in transparent proxy.
25715
25716 2003-12-06  Martin Baulig  <martin@ximian.com>
25717
25718         * class.c (mono_class_create_from_generic): Removed.
25719         (mono_class_from_generic): Check `ginst->klass' before doing
25720         anything else.  This is important to fully support "recursive"
25721         generic types.
25722
25723         * metadata.c (do_mono_metadata_parse_generic_inst): Create an
25724         empty `generic_inst->klass' before doing anything else.
25725
25726 2003-12-06  Dick Porter  <dick@ximian.com>
25727
25728         * verify.c: 
25729         * object.h:
25730         * icall.c:
25731         * locales.c: Use C structs to access class fields.  Don't do a
25732         conversion between MonoString and UChar because both are
25733         platform-endian UTF-16.  Compare now takes startindex and count
25734         parameters.  Add a char overload for IndexOf.  Speed up the
25735         invariant string IndexOf.
25736
25737 2003-12-05  Zoltan Varga  <vargaz@freemail.hu>
25738
25739         * Makefile.am (monosn_LDADD): Fix parallel build.
25740
25741 2003-12-04  Martin Baulig  <martin@ximian.com>
25742
25743         * icall.c
25744         (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
25745         (ves_icall_Type_make_array_type): New interncall.       
25746
25747 2003-12-04  Martin Baulig  <martin@ximian.com>
25748
25749         * locales.c: also change it in the !HAVE_ICU case.
25750
25751 2003-12-04  Dick Porter  <dick@ximian.com>
25752
25753         * icall.c:
25754         * locales.c: construct_compareinfo is now in CompareInfo, not
25755         CultureInfo.
25756
25757 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
25758
25759         * image.c (mono_image_load_file_for_image): Cache loaded images in the
25760         image->files array.
25761
25762         * image.c (load_class_name): Load class names from the EXPORTEDTYPES
25763         table as well.
25764
25765         * assembly.c (mono_assembly_load_references): Only load references
25766         once.
25767
25768         * class.c (mono_class_from_name): Avoid linear search of the 
25769         EXPORTEDTYPE table.
25770
25771         * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
25772
25773 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
25774
25775         * image.h (MonoImage): Add 'field_cache' field.
25776
25777         * loader.c (mono_field_from_token): Cache field lookups.
25778         
25779         * reflection.c (mono_module_get_object): Fix name property.
25780
25781         * icall.c (ves_icall_get_enum_info): Update after changes to 
25782         mono_metadata_get_constant_index ().
25783
25784         * icall.c: Get rid of get_type_info icall, use a separate icall for
25785         each type property to avoid needless memory allocations. Fixes #51514.
25786
25787         * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
25788         to avoid needless binary searches.
25789
25790         * class.c (class_compute_field_layout): Move the initialization of
25791         field->def_value to mono_class_vtable ().
25792
25793         * class.c (mono_class_layout_fields): Enable GC aware auto layout for
25794         non-corlib types.
25795
25796         * object.c (mono_object_allocate): Make it inline.
25797
25798         * object.c (mono_object_allocate_spec): Make it inline.
25799         
25800 2003-12-02  Dick Porter  <dick@ximian.com>
25801
25802         * locales.c (create_NumberFormat): NumberFormatInfo construction.
25803         Patch by Mohammad DAMT (mdamt@cdl2000.com).
25804
25805 2003-12-01  Dick Porter  <dick@ximian.com>
25806
25807         * threads.c: Fix signature and call in CreateMutex and
25808         CreateEvent.
25809
25810 2003-12-01  Dick Porter  <dick@ximian.com>
25811
25812         * icall.c: 
25813         * locales.c: Implement string compares and searching
25814
25815         * object.h: Add extra Thread field
25816
25817 2003-11-30  Zoltan Varga  <vargaz@freemail.hu>
25818
25819         * reflection.c (fixup_method): Add support for MonoCMethod.
25820
25821 2003-11-28  Zoltan Varga  <vargaz@freemail.hu>
25822
25823         * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
25824
25825         * reflection.c (assembly_name_to_aname): Allow extra characters in
25826         assembly names. Fixes #51468.
25827
25828 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
25829
25830         * exception.c (mono_exception_from_name_domain): New helper function.
25831
25832         * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
25833         exception object in the correct domain.
25834
25835         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix 
25836         formatting + make a copy a the input data.
25837
25838         * loader.c (mono_get_method_from_token): Methods which contain
25839         native code do not have entries in the ImplMap.
25840
25841         (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
25842         Thanks to Gonzalo for spotting this.
25843         
25844         * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
25845         patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
25846
25847         * assembly.h (mono_assembly_load_from): Split the second part of 
25848         assembly loading into a new public function.
25849
25850         * exception.h (mono_get_exception_bad_image_format): New function.
25851
25852 2003-11-24  Zoltan Varga  <vargaz@freemail.hu>
25853
25854         icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
25855         Enumerate all modules inside a dynamic assembly. Fixes #51293.
25856         
25857         * icall.c: Add new icall for creating dynamic methods.
25858
25859         * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
25860
25861         * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
25862
25863         * reflection.c (mono_reflection_create_dynamic_method): New icall to
25864         create a dynamic method.
25865
25866         * reflection.c (resolve_object): New helper function.
25867
25868         * reflection.c: Generalize ReflectionMethodBuilder and the functions
25869         which manipulate it so they can also work on dynamic methods.
25870
25871         * reflection.c (reflection_method_builder_to_mono_method): Avoid 
25872         creating the MonoReflectionMethodAux structure if it is not needed.
25873         
25874         * reflection.h verify.c: Update after changes to object layout.
25875
25876         * reflection.c (method_builder_encode_signature): Fix compilation on
25877         gcc 2.95.x.
25878
25879 2003-11-21  Lluis Sanchez Gual  <lluis@ximian.com>
25880
25881         * appdomain.h: Added support for context static fields. Added static_data
25882           field to MonoAppContext and renamed thread_static_fields to a more
25883           generic special_static_fields in MonoAppDomain, since it can now contain
25884           context static fields.
25885         * domain.c: Updated hashtable name.
25886         * object.c: Replaced field_is_thread_static() for a more generic
25887           field_is_special_static() which also checks for context static attribute.
25888           In mono_class_vtable(), added support for static context fields.
25889         * threads.c: Changed methods that manage thread static fields to more
25890           generic methods so they can be reused both for thread and context static
25891           data.
25892         * threads.h: Declared some new methods.
25893
25894 2003-11-21  Zoltan Varga  <vargaz@freemail.hu>
25895
25896         * reflection.h: Update after changes to the managed types.
25897
25898         * reflection.c (encode_custom_modifiers): New helper function.
25899
25900         * reflection.c (method_encode_signature): Emit custom modifiers.
25901
25902         * reflection.c (field_encode_signature): Emit custom modifiers.
25903
25904 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
25905
25906         * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
25907
25908         * icall.c (ves_icall_System_ValueType_Equals): New optimized 
25909         implementation.
25910
25911         * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New 
25912         icall.
25913
25914         * object.c (mono_field_get_value_object): New function.
25915
25916         * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
25917         specific.
25918
25919 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
25920
25921         * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
25922         return a preallocated out-of-memory exception instance.
25923
25924         * object.c (out_of_memory): Use the new function.
25925
25926         * metadata.c (mono_metadata_parse_type): Handle the case when the byref
25927         flag is before the custom modifiers. Fixes #49802.
25928
25929 2003-11-16  Martin Baulig  <martin@ximian.com>
25930
25931         * class.c (mono_class_is_open_constructed_type): Implemented the
25932         MONO_TYPE_GENERICINST case.
25933
25934 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
25935
25936         * assembly.c (mono_assembly_fill_assembly_name): New function to
25937         fill out the MonoAssemblyName structure.
25938         (mono_assembly_open): Use the new function.
25939
25940         * icall.c (fill_reflection_assembly_name): New helper function.
25941
25942         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
25943         new function.
25944
25945         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
25946
25947 2003-11-15  Martin Baulig  <martin@ximian.com>
25948
25949         * class.c (mono_class_is_open_constructed_type): New public
25950         function; checks whether a type is an open constructed type,
25951         ie. whether it still contains type parameters.
25952         (mono_class_inflate_generic_type): If we're a type parameter and
25953         the inflated type is also a MONO_TYPE_(M)VAR, return the original
25954         type.
25955
25956         * class.h (MonoGenericInst): Added `guint32 is_open'.
25957
25958         * loader.c (method_from_methodspec): Check whether we're an open
25959         or closed constructed type and set `ginst->is_open'.
25960
25961         * reflection.c (mono_reflection_bind_generic_parameters): Check
25962         whether we're an open or closed constructed type and set
25963         `ginst->is_open'.
25964         (mono_reflection_inflate_method_or_ctor): Don't inflate methods
25965         from open constructed types.
25966
25967 2003-11-15  Martin Baulig  <martin@ximian.com>
25968
25969         * reflection.c (mono_reflection_bind_generic_parameters): If we're
25970         a generic instance (instead of a generic type declaration) with
25971         unbound generic parameters, bind them to our actual types.
25972
25973 2003-11-14  Martin Baulig  <martin@ximian.com>
25974
25975         * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
25976
25977         * reflection.c (mono_reflection_bind_generic_parameters): If we're
25978         an interface type, populate `res->interfaces' with instantiated
25979         versions of all the interfaces we inherit.
25980
25981 2003-11-13  Aleksey Demakov  <avd@openlinksw.com>
25982
25983         * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
25984         when MONO_PATH is set but doesn't contain the install dir.
25985
25986 2003-11-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25987
25988         * icall.c:
25989         (ves_icall_Type_GetInterfaces): don't return an interface twice when
25990         it's also implemented in base classes. Fixes bug #50927.
25991
25992 2003-11-13  Zoltan Varga  <vargaz@freemail.hu>
25993
25994         * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
25995         if this method is called from a finalizer. Fixes #50913.
25996
25997 2003-11-12  Miguel de Icaza  <miguel@ximian.com>
25998
25999         * threads.c: Implement VolatileRead/VolatileWrite
26000
26001         * icall.c: Add new icalls for VolatileRead/VolatileWrite
26002
26003 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26004
26005         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied 
26006         patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
26007         2.95.3.
26008
26009         * assembly.c (mono_assembly_open): Fix windows build. Applied patch 
26010         from Peter Ross (pro@missioncriticalit.com).
26011         
26012 2003-11-12  Lluis Sanchez Gual  <lluis@ximian.com>
26013
26014         * icall.c: Added internal call for System.Environment::GetMachineConfigPath
26015
26016 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26017
26018         * assembly.c (mono_assembly_load_references): Disable check because it
26019         triggers on older corlibs which lots of people have.
26020
26021 2003-11-12  Jackson Harper  <jackson@ximian.com>
26022
26023         * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
26024         load corlib.dll if mscorlib.dll is not found.
26025         * assembly.h: Remove corlib name define.
26026         * class.c:
26027         * domain.c:
26028         * image.c: Change corlib name to mscorlib.
26029         
26030 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
26031
26032         * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
26033
26034 2003-11-11  Miguel de Icaza  <miguel@ximian.com>
26035
26036         * appdomain.h: Added loader_optimization here to sync with the C#
26037         code, and add disallow_binding_redirects field.
26038
26039 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
26040
26041         * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
26042
26043         * reflection.c (mono_image_build_metadata): Fix crash on modules
26044         with no types.
26045
26046         * reflection.h (MonoMethodInfo): Track changes to the managed structure.
26047
26048         * icall.c (ves_icall_get_method_info): Return callingConvention as
26049         well.
26050
26051         * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add 
26052         namespaces from the EXPORTEDTYPE table as well.
26053
26054         * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
26055         from all modules inside the assembly.
26056         
26057 2003-11-11  Martin Baulig  <martin@ximian.com>
26058
26059         * reflection.c (mono_reflection_bind_generic_parameters): Make
26060         this work for interfaces.
26061
26062 2003-11-11  Martin Baulig  <martin@ximian.com>
26063
26064         * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
26065
26066 2003-11-11  Martin Baulig  <martin@ximian.com>
26067
26068         * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
26069         "MonoInflatedMethod" and "MonoInflatedCtor".
26070
26071 2003-11-11  Zoltan Varga  <vargaz@freemail.hu>
26072
26073         * reflection.c (resolution_scope_from_image): Use the assembly table
26074         from the manifest module, since other modules don't have it.
26075
26076         * debug-helpers.c (mono_type_full_name): New helper function.
26077
26078         * image.h (MonoAssembly): Change 'dynamic' to a boolean.
26079
26080         * image.c (mono_image_load_file_for_image): New public function which
26081         is a replacement for the load_file_for_image in class.c.
26082
26083         * assembly.c (mono_assembly_load_module): A wrapper for the function
26084         above which does assembly association and reference loading too.
26085
26086         * class.c (mono_class_from_name): Call mono_assembly_load_module.
26087
26088 2003-11-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26089
26090         * appdomain.c: not all of the attributes for the full assembly name
26091         are required and the order doesn't matter. Fixes bug #50787.
26092
26093 2003-11-10  Dick Porter  <dick@ximian.com>
26094
26095         * locales.c: Use platform-endian UTF16
26096
26097 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
26098
26099         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26100         
26101 2003-11-10  Martin Baulig  <martin@ximian.com>
26102
26103         * metadata.c
26104         (mono_metadata_load_generic_params): Make this actually work.
26105
26106         * reflection.c (mono_reflection_bind_generic_parameters): If our
26107         parent is a generic instance, pass all the `types' to it, no
26108         matter whether it has the same number of type parameters or not.
26109
26110 2003-11-10  Zoltan Varga  <vargaz@freemail.hu>
26111
26112         * reflection.c: Emit FILE and EXPORTEDTYPE tables.
26113
26114         * assembly.c (mono_assembly_load_references): Move the image<->assembly
26115         assignment code to this function so it gets called recursively for all
26116         modules.
26117
26118         * image.c (load_modules): Remove the assembly assignment since it is
26119         now done by mono_assembly_load_references.
26120         
26121         * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): 
26122         Add 'module' argument.
26123         (mono_module_get_types): New helper function.
26124         (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
26125
26126 2003-11-08  Martin Baulig  <martin@ximian.com>
26127
26128         * class.c (mono_class_inflate_generic_method): Interface method
26129         don't have a header.
26130
26131         * reflection.c (mono_image_get_methodspec_token): Take an
26132         additional `MonoGenericInst *' argument instead of reading it from
26133         the header; this is necessary to support interfaces.
26134         (mono_image_create_token): Pass the `MonoGenericInst *' from the
26135         MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
26136         (inflated_method_get_object): Take an additional `MonoGenericInst *'
26137         argument.
26138
26139         * reflection.h (MonoReflectionInflatedMethod): Added
26140         `MonoGenericInst *ginst'.
26141
26142 2003-11-07  Zoltan Varga  <vargaz@freemail.hu>
26143
26144         * gc.c (mono_domain_finalize): Fix compilation for no GC case.
26145
26146 2003-11-06  Zoltan Varga  <zovarga@ws-zovarga2>
26147
26148         * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
26149
26150 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
26151
26152         * reflection.c 
26153         (reflection_methodbuilder_from_method_builder):
26154         (reflection_methodbuilder_from_ctor_builder): New helper functions to 
26155         initialize a ReflectionMethodBuilder structure.
26156         (mono_image_get_methodbuilder_token):
26157         (mono_image_get_ctorbuilder_token): New functions to emit memberref
26158         tokens which point to types in another module inside the same assembly.
26159
26160         * reflection.c: Use the new helper functions.
26161         
26162         * reflection.c (mono_image_basic_init): Initialize basedir and culture.
26163
26164         * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image 
26165         instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
26166
26167         * reflection.c (resolution_scope_from_image): Emit a moduleref if
26168         neccesary.
26169
26170         * reflection.c (mono_image_build_metadata): Emit metadata only for the
26171         current module. Emit the manifest only for the main module.
26172
26173         * reflection.c (mono_image_create_token): Add assertion when a 
26174         memberref needs to be created.
26175
26176         * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
26177
26178         * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a 
26179         larger buffer for the custom attribute blob. Fixes #50637.
26180         
26181 2003-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26182
26183         * threadpool.c: notify listener on async processing handles after
26184         invoking the async callback. Thanks to Zoltan.
26185
26186 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
26187
26188         * reflection.c (create_dynamic_mono_image): Call mono_image_init to 
26189         avoid code duplication.
26190
26191         * reflection.h (MonoDynamicImage): New type which is currently unused,
26192         but will be used through the ref.emit code in place of 
26193         MonoDynamicAssembly.
26194
26195         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26196         object layout.
26197
26198         * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
26199         a MonoDynamicImage instead of just a MonoImage.
26200         
26201         * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
26202         icalls to ModuleBuilder but keep their semantics, so they will work
26203         with moduleb->assemblyb. This will change later.
26204         
26205 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
26206
26207         * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
26208         object layout.
26209
26210         * reflection.c (mono_image_build_metadata): Avoid creation of a default
26211         main module, since it is now done by the managed code.
26212
26213 2003-11-03  Martin Baulig  <martin@ximian.com>
26214
26215         * reflection.c (mono_reflection_inflate_method_or_ctor): Set
26216         `ginst->klass' here.
26217         (method_encode_methodspec): Don't use the `ginst->generic_method's
26218         klass if it's a generic instance, use `ginst->klass' in this case.
26219
26220 2003-11-03  Martin Baulig  <martin@ximian.com>
26221
26222         * reflection.c (mono_image_get_generic_method_param_info):
26223         Removed, use mono_image_get_generic_param_info() instead.
26224         (mono_image_get_type_info): Write the GenericParam table before
26225         the Method table.  This is neccessary because in the GenericParam
26226         table, type parameters of the class (ie. '!0' etc.) must come
26227         before the ones from its generic methods (ie. '!!0' etc).
26228
26229 2003-11-03  Zoltan Varga  <vargaz@freemail.hu>
26230
26231         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
26232
26233 2003-11-02  Martin Baulig  <martin@ximian.com>
26234
26235         * reflection.c (create_generic_typespec): Take a
26236         `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
26237         the generic parameters from it.
26238
26239 2003-11-02  Martin Baulig  <martin@ximian.com>
26240
26241         * reflection.c (fieldref_encode_signature): Take a `MonoType *'
26242         instead of a `MonoClassField *' since we just need the type.
26243         (create_generic_typespec): New static function.  Creates a
26244         TypeSpec token for a generic type declaration.
26245         (mono_image_get_generic_field_token): New static function.
26246         (mono_image_create_token): If we're a FieldBuilder in a generic
26247         type declaration, call mono_image_get_generic_field_token() to get
26248         the token.
26249
26250 2003-11-02  Martin Baulig  <martin@ximian.com>
26251
26252         * reflection.h
26253         (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
26254         `MonoReflectionGenericInst *declaring_type' and
26255         `MonoReflectionGenericInst *reflected_type' fields.
26256
26257         * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
26258         `MonoReflectionGenericInst *declaring_type' and a
26259         `MonoReflectionGenericInst *reflected_type' argument instead of a
26260         single `MonoReflectionGenericInst *type' one.  Set
26261         `res->declaring_type' and `res->reflected_type' from them.
26262         (mono_reflection_inflate_field): Likewise.      
26263
26264 2003-11-02  Martin Baulig  <martin@ximian.com>
26265
26266         * class.c (mono_class_setup_vtable): Don't store generic methods
26267         in the vtable.  
26268
26269 2003-11-02  Martin Baulig  <martin@ximian.com>
26270
26271         * reflection.h (MonoReflectionGenericInst): Added
26272         `MonoReflectionType *declaring_type'.
26273
26274         * reflection.c (mono_reflection_bind_generic_parameters): Use
26275         `if (tb->parent)' instead of `klass->parent'.
26276
26277 2003-11-01  Zoltan Varga  <vargaz@freemail.hu>
26278
26279         * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
26280         with an empty ASSEMBLY table.
26281
26282         * reflection.c (mono_image_build_metadata): Avoid using the same loop
26283         variable in the inner and outer loops.
26284
26285 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
26286
26287         * metadata.h (mono_metadata_make_token): Put parentheses around macro
26288         argument.
26289
26290         * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
26291         
26292         * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain 
26293         icalls. Instead, do everything in managed code. This is needed since
26294         it is hard to restore the original domain etc. in unmanaged code in the
26295         presence of undeniable exceptions.
26296
26297         * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): 
26298         New icalls to push and pop appdomain refs.
26299
26300 2003-10-31  Martin Baulig  <martin@ximian.com>
26301
26302         * class.c (inflate_generic_type): Renamed to
26303         mono_class_inflate_generic_type() and made it public.
26304
26305         * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
26306         New interncall.
26307
26308         * loader.c (mono_field_from_memberref): Also set the retklass for
26309         typespecs.
26310
26311         * fielder.c (mono_image_get_inflated_field_token): New static
26312         method; creates a metadata token for an inflated field.
26313         (mono_image_create_token, fixup_method): Added support for
26314         "MonoInflatedField".
26315         (fieldbuilder_to_mono_class_field): New static function.
26316         (mono_reflection_inflate_field): New public function.
26317
26318         * reflection.h
26319         (MonoReflectionGenericInst): Added `MonoArray *fields'.
26320         (MonoReflectionInflatedField): New typedef.     
26321
26322 2003-10-30  Bernie Solomon  <bernard@ugsolutions.com>
26323
26324         * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
26325         for Solaris and other platforms without s6_addr16
26326
26327 2003-10-30  Martin Baulig  <martin@ximian.com>
26328
26329         * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
26330         argument instead of two.
26331         (mono_class_inflate_generic_signature): Likewise.
26332         (inflate_generic_header): Likewise.
26333         (mono_class_inflate_generic_method): Likewise.  In addition, if
26334         `ginst->klass' is set, it becomes the new `method->klass'.
26335
26336         * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
26337         field.
26338
26339         * reflection.c (encode_generic_method_sig): Write a 0xa as the
26340         first byte. [FIXME]
26341         (method_encode_methodspec): If we have generic parameters, create
26342         a MethodSpec instead of a MethodRef.
26343         (fixup_method): Added support for "MonoInflatedMethod" and
26344         "MonoInflatedCtor".
26345         (mono_image_create_token): Added support for "MonoInflatedMethod"
26346         and "MonoInflatedCtor".
26347         (inflated_method_get_object): New static function; returns a
26348         managed "System.Reflection.MonoInflatedMethod" object.
26349         (mono_reflection_bind_generic_method_parameters): Return a
26350         `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
26351         (mono_reflection_inflate_method_or_ctor): Likewise.
26352         (mono_image_get_generic_method_param_info): Initialize unused
26353         fields to zero.
26354         (mono_image_get_generic_param_info): Likewise.
26355
26356         * reflection.h (MonoReflectionInflatedMethod): New public
26357         typedef.  Corresponds to the managed "S.R.MonoInflatedMethod" and
26358         "S.R.MonoInflatedCtor" classes.
26359
26360         * loader.c (method_from_memberref): If we're a TypeSpec and it
26361         resolves to a generic instance, inflate the method.
26362
26363 2003-10-28  Dick Porter  <dick@ximian.com>
26364
26365         * object.c (mono_runtime_run_main): Convert command-line arguments
26366         into utf8, falling back to the user's locale encoding to do so.
26367
26368 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
26369
26370         * loader.c (mono_get_method_from_token): Avoid looking up the icalls
26371         at this time.
26372
26373         * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
26374
26375         * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
26376         up icalls at method definition time. Partially fixes #33569.
26377
26378 2003-10-25  Zoltan Varga  <vargaz@freemail.hu>
26379
26380         * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
26381         marshalling of arrays. Fixes #50116.
26382
26383         * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
26384
26385         * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
26386         points to a vtable in the dying appdomain.
26387
26388         * appdomain.c (mono_domain_unload): Move the notification of OnUnload
26389         listeners into unmanaged code inside the lock.
26390
26391         * object.c (mono_class_vtable): Turn off typed allocation in non-root
26392         domains and add some comments.
26393
26394 2003-10-25  Martin Baulig  <martin@ximian.com>
26395
26396         * class.h (MonoGenericInst): Added `MonoClass *klass' field.
26397
26398         * image.h (MonoImage): Added `GHashTable *typespec_cache'.
26399
26400         * metadata.c (mono_metadata_parse_generic_inst): Renamed to
26401         `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
26402         currently parsing.  Create the generic class and store it in
26403         `generic_inst->klass' before parsing the type arguments.  This is
26404         required to support "recursive" definitions; see mcs/tests/gen-23.cs
26405         for an example.
26406         (mono_type_create_from_typespec): Use a new `image->typespec_cache'
26407         to support recursive typespec entries.
26408
26409         * class.c (mono_class_setup_parent): If our parent is a generic
26410         instance, we may get called before it has its name set.
26411         (mono_class_from_generic): Splitted into
26412         mono_class_create_from_generic() and mono_class_initialize_generic().
26413
26414 2003-10-25  Martin Baulig  <martin@ximian.com>
26415
26416         * icall.c (ves_icall_Type_BindGenericParameters): Return a
26417         `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
26418         ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
26419         ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
26420
26421         * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
26422         (create_typespec): Likewise.
26423         (mono_reflection_bind_generic_parameters): Return a
26424         `MonoReflectionGenericInst *' instead of a `MonoClass *'.
26425         (mono_reflection_inflate_method_or_ctor): New public function.
26426
26427         * reflection.h (MonoReflectionGenericInst): New typedef.        
26428
26429 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
26430
26431         * object.c (mono_class_proxy_vtable): Run the whole vtable construction
26432         inside the domain lock. Fixes #49993.
26433         
26434         * object.c (mono_class_vtable): When typed allocation is used, 
26435         allocate vtables in the GC heap instead of in the mempool, since the
26436         vtables contain GC descriptors which are used by the collector even
26437         after the domain owning the mempool is unloaded.
26438
26439         * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
26440
26441         * domain.c (mono_domain_unload): Rename to mono_domain_free to better
26442         reflect what it does. Also invalidate mempools instead of freeing
26443         them if a define is set.
26444
26445         * appdomain.h (MonoAppDomainState): New enumeration to hold the state
26446         of the appdomain.
26447         
26448         * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
26449         hold the finalizable objects in this domain.
26450
26451         * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
26452         appdomain.
26453
26454         * appdomain.c (mono_domain_set): New function to set the current
26455         appdomain, but only if it is not being unloaded.
26456
26457         * appdomain.c threads.c threadpool.c object.c: Avoid entering an
26458         appdomain which is being unloaded.
26459         
26460         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
26461         unloading of the root appdomain.
26462
26463         * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
26464         icall to execute a method in another appdomain. Intended as a 
26465         replacement for InternalSetDomain, which can confuse the code 
26466         generation in the JIT.
26467
26468         * appdomain.c (mono_domain_is_unloading): New function to determine
26469         whenever an appdomain is unloading.
26470
26471         * appdomain.c (mono_domain_unload): New function to correctly unload
26472         an appdomain.
26473
26474         * assembly.c (mono_assembly_load_references): Check that an assembly
26475         does not references itself.
26476
26477         * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
26478         domain manually, it asks the finalizer thread to do it, then waits for
26479         the result. Also added a timeout.
26480
26481         * icall.c: Register the new icalls.
26482
26483         * threads.h threads.c: Export the mono_gc_stop_world and 
26484         mono_gc_start_world functions.
26485         
26486         * mempool.h mempool.c (mono_mempool_invalidate): New debugging 
26487         function to fill out the mempool with 0x2a.
26488
26489 2003-10-22  Zoltan Varga  <vargaz@freemail.hu>
26490
26491         * reflection.h (MonoReflectionMethodAux): New structure to store
26492         information which is rarely used, thus is not in the MonoMethod
26493         structure.
26494
26495         * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
26496         store the aux info.
26497
26498         * reflection.c (mono_methodbuilder_to_mono_method): Store param names
26499         and marshalling info into the aux structure.
26500
26501         * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
26502         from the aux structure.
26503
26504         * loader.c (mono_method_get_param_names): Retrieve the param names from
26505         the aux structure.
26506         
26507 2003-10-21  Zoltan Varga  <vargaz@freemail.hu>
26508
26509         * exception.h exception.c: Add AppDomainUnloadedException && fix 
26510         warning.
26511
26512 2003-10-21  Dick Porter  <dick@ximian.com>
26513
26514         * socket-io.c
26515         (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
26516         patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
26517
26518 2003-10-21  Martin Baulig  <martin@ximian.com>
26519
26520         * reflection.c (mono_reflection_bind_generic_parameters):
26521         `klass->parent' is NULL for interfaces.
26522
26523 2003-10-21  Martin Baulig  <martin@ximian.com>
26524
26525         * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
26526
26527 2003-10-20  Zoltan Varga  <vargaz@freemail.hu>
26528
26529         * exception.c (mono_exception_from_name_msg): New helper function for
26530         creating exceptions and initializing their message field.
26531
26532         * exception.c: Simplify functions using the new helper.
26533
26534         * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
26535         New function.
26536
26537         * object.h object.c: Remove G_GNUC_NORETURN from the signature of
26538         mono_raise_exception, since otherwise gcc doesn't generate the function
26539         epilog for raise_exception, confusing the stack unwinding in the JIT.
26540         Fixes #45043.
26541
26542         * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
26543         PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
26544         Fixes #49499.
26545
26546 2003-10-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26547
26548         * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
26549         utf8.
26550
26551 2003-10-18  Lluis Sanchez Gual  <lluis@ximian.com>
26552
26553         * icall.c: Removed GetUninitializedObject method because
26554           AllocateUninitializedClassInstance does the same.
26555
26556 2003-10-18  Martin Baulig  <martin@ximian.com>
26557
26558         * class.c (inflate_generic_signature): Renamed to
26559         mono_class_inflate_generic_signature() and made it public.
26560         (my_mono_class_from_generic_parameter): New static function; if we
26561         don't already have the generic parameter's MonoClass, create a
26562         very simple one which is just used internally in the runtime and
26563         not passed back to managed code.
26564
26565         * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
26566
26567         * metadata.h (MonoMethodSignature): Moved the
26568         `MonoGenericParam *gen_params' to the MonoMethodHeader.
26569         (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
26570
26571         * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
26572         ves_icall_MonoMethod_GetGenericArguments(); this is now an
26573         interncall on the MonoMethod class, not on MethodInfo.
26574         (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
26575         calling mono_reflection_bind_generic_method_parameters() directly.
26576
26577         * loader.c (mono_method_get_signature): If this is a MethodSpec;
26578         return the already computed `method->signature'.
26579         (method_from_methodspec): New static function to load a method
26580         from a MethodSpec entry.
26581         (mono_get_method_from_token): Call the new method_from_methodspec()
26582         for MethodSpec tokens.  
26583         (mono_get_method_from_token): If we're a generic method, load the
26584         type parameters.
26585
26586         * reflection.c (mono_image_get_memberref_token): Allow
26587         MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
26588         table.
26589         (fixup_method): Added support for MONO_TABLE_METHODSPEC.
26590         (mono_image_create_token): First check whether it's a generic
26591         method (so we'd need to create a MethodSpec), then do the other
26592         two alternatives.
26593         (mono_reflection_bind_generic_method_parameters): Return a
26594         `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
26595         called directly from the interncall.
26596
26597 2003-10-17  Zoltan Varga  <vargaz@freemail.hu>
26598
26599         * reflection.c (load_public_key): Move loading of the public key
26600         into managed code.
26601
26602         * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
26603
26604         * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
26605         fields.
26606
26607         * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
26608         culture, hash_alg and public_key. Fixes #49555.
26609
26610 2003-10-17  Martin Baulig  <martin@ximian.com>
26611
26612         * class.h (MonoGenericInst): Moved this declaration here and added
26613         `MonoMethod *generic_method'.
26614
26615         * icall.c
26616         (ves_icall_MethodInfo_GetGenericArguments): New interncall.
26617         (ves_icall_MethodInfo_BindGenericParameters): New interncall.
26618
26619         * metadata.c (mono_metadata_type_equal): Two types of
26620         MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
26621         index; ie. don't compare the address of the `MonoGenericParam'
26622         structure.
26623         (mono_metadata_load_generic_params): Removed the `MonoMethod
26624         *method' argument.
26625
26626         * metadata.h (MonoGenericInst): Moved declaration to class.h.
26627         (MonoMethodHeader): Added `MonoGenericInst *geninst'.
26628
26629         * reflection.c (method_encode_signature): Encode the number of
26630         generic parameters.
26631         (encode_generic_method_sig): New static function.
26632         (method_encode_methodspec): New static function; creates an entry
26633         in the MethodSpec table for a generic method.
26634         (mono_image_get_methodspec_token): New static function.
26635         (mono_image_create_token): Call mono_image_get_methodspec_token()
26636         for generic methods.
26637         (mono_reflection_bind_generic_method_parameters): New public
26638         function.  Instantiates a generic method.
26639
26640 2003-10-16  Martin Baulig  <martin@ximian.com>
26641
26642         * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
26643         *gen_params' here from MonoMethodHeader.
26644
26645         * metadata.c (mono_metadata_parse_method_signature): If we have
26646         generic parameters, initialize `method->gen_params' and then set
26647         the correct `type->data.generic_param' in all the parameters.
26648
26649 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
26650
26651         * threads.c (mono_threads_get_default_stacksize): New function to 
26652         return the default stacksize.
26653
26654         * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
26655         termination of the finalizer thread, since the previous method had
26656         race conditions. Fixes #49628.
26657
26658         * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
26659         as for the other managed threads.
26660
26661 2003-10-16  Martin Baulig  <martin@ximian.com>
26662
26663         * class.c (inflate_generic_signature): Copy `generic_param_count'
26664         and `gen_params'.
26665
26666         * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
26667         New interncall.
26668
26669         * metadata.c (mono_metadata_parse_method_signature): Actually set
26670         the `method->generic_param_count' here.
26671         (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
26672
26673 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
26674
26675         * object.h: Add a new field to TypedRef to simplify the implementation
26676         of the REFANY opcodes in the JIT.
26677
26678         * icall.c: Make use of the new field.
26679
26680         * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
26681         dynamically.
26682
26683 2003-10-15  Martin Baulig  <martin@ximian.com>
26684
26685         * class.c (mono_class_from_gen_param): Renamed to
26686         mono_class_from_generic_parameter() and moved most of the
26687         functionality from mono_reflection_define_generic_parameter()
26688         here; ie. we create a "real" class here.
26689         (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
26690         MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
26691         previously been called.
26692
26693         * class.h (MonoGenericParam): Moved the declaration of this struct
26694         here from metadata.h and added `MonoMethod *method'.
26695
26696         * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
26697         interncall.
26698
26699         * loader.c (mono_get_method_from_token): If we have any generic
26700         parameters, call mono_metadata_load_generic_params() to read them
26701         from the MONO_TABLE_GENERICPAR.
26702
26703         * metadata.c (mono_metadata_load_generic_params): Added
26704         `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
26705
26706         * metadata.h (MonoMethodSignature): Replaced
26707         `MonoGenericInst *geninst' with `guint16 generic_param_count'.
26708         (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
26709
26710         * reflection.c (mono_reflection_define_generic_parameter): Moved
26711         most of the functionality into the new
26712         mono_class_from_generic_parameter(); set the `method' field if
26713         we're a method parameter.       
26714
26715 2003-10-13 Bernie Solomon  <bernard@ugsolutions.com>
26716
26717         * marshal.c (emit_struct_conv): if native size is 0
26718         emit no code.
26719
26720 2003-10-14  Martin Baulig  <martin@ximian.com>
26721
26722         * icall.c: The generics API has changed in the spec since it was
26723         added to System.Type; these modifications make it match the spec
26724         again.
26725         (ves_icall_Type_GetGenericParameters): Renamed to
26726         `ves_icall_Type_GetGenericArguments'.
26727         (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
26728         (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
26729         `ves_icall_MonoType_get_HasGenericArguments'.
26730         (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
26731         `ves_icall_MonoType_get_IsGenericParameter'.
26732         (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
26733         this is no interncall anymore.
26734         (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
26735         `ves_icall_TypeBuilder_get_IsGenericParameter'.
26736
26737 2003-10-14  Martin Baulig  <martin@ximian.com>
26738
26739         * reflection.c (mono_reflection_bind_generic_parameters): Also
26740         inflate generic methods if we're reading the class from IL.
26741
26742 2003-10-13  Martin Baulig  <martin@ximian.com>
26743
26744         * reflection.c (mono_reflection_define_generic_parameter): This
26745         method isn't called directly from the icall anymore; take a
26746         `MonoReflectionAssemblyBuilder *' so we can use this for type and
26747         method generic parameters.
26748         (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
26749         (method_builder_encode_signature): Encode generic parameters.
26750         (mono_image_get_method_info): Write generic params to the
26751         MONO_TABLE_GENERICPARAM table.
26752
26753         * reflection.h (MonoReflectionMethodBuilder): Added
26754         `MonoArray *generic_params'.
26755
26756         * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
26757
26758         * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
26759         wrapper for mono_reflection_define_generic_parameter().
26760         (ves_icall_MethodBuilder_define_generic_parameter): Likewise.   
26761
26762 2003-10-13  Zoltan Varga  <vargaz@freemail.hu>
26763
26764         * marshal.h: Add missing function to fix build.
26765
26766         * marshal.c (mono_marshal_get_native_wrapper): Add support for 
26767         the SetLastError pinvoke attribute.
26768
26769         * marshal.c (mono_marshal_set_last_error): New helper function called
26770         by the generated code.
26771         
26772         * marshal.c (mono_mb_emit_branch): New helper function.
26773
26774         * marshal.c (mono_mb_emit_exception): Added exception name parameter.
26775
26776         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
26777         classes as parameters and return values of delegates. Fixes #29256. 
26778
26779 2003-10-12  Bernie Solomon  <bernard@ugsolutions.com>
26780
26781         * locales.c: use gint32 in non HAVE_ICU case
26782
26783 2003-10-11  Martin Baulig  <martin@ximian.com>
26784
26785         * mono-debug.c (mono_debug_add_method): Added a workaround for
26786         bug #48591.
26787
26788 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
26789
26790         * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
26791         delegates passed to native code must use the STDCALL calling 
26792         convention. Fixes #35987.
26793
26794 2003-10-10  Martin Baulig  <martin@ximian.com>
26795
26796         * class.c (inflate_generic_type): If we're inflating for a generic
26797         type instance (and not for a generic method), return
26798         MONO_TYPE_MVAR unchanged.
26799
26800 2003-10-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26801
26802         * string-icalls.c: Join ignores null strings in the source array.
26803         * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
26804         * threads.c: GetAvailableTheads is slightly more accurate.
26805
26806 2003-10-09  Bernie Solomon  <bernard@ugsolutions.com>
26807
26808         * threads.h threads.c : add mono_threads_set_default_stacksize
26809         and pass default to CreateThread calls.
26810
26811 2003-10-09  Dick Porter  <dick@ximian.com>
26812
26813         * icall.c:
26814         * locales.h:
26815         * locales.c: Internal calls for constructing CultureInfo and
26816         related objects from libicu (if its available.)
26817
26818 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
26819
26820         * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
26821
26822 2003-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26823
26824         * threadpool.c: added an argument to async_invoke_thread that is the
26825         item to process, pass the MonoAsyncResult to the thread start function
26826         when creating a new thread. This way we don't need to acquire any lock
26827         when we're creating a new thread. Readded a semaphore for faster
26828         response times (instead of that Sleep i added).
26829
26830 2003-10-08  Bernie Solomon  <bernard@ugsolutions.com>
26831
26832         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
26833         get daylight change dates better on Windows, fix handling
26834         of platforms without tm_gmtoff.
26835
26836 2003-10-06  Martin Baulig  <martin@ximian.com>
26837
26838         * class.c (inflate_generic_method): Renamed to
26839         mono_class_inflate_generic_method() and made public.
26840         (mono_class_init): Don't inflate the generic methods here.
26841         (mono_class_from_generic): Added `gboolean inflate_methods'
26842         argument.  Inflate the methods here.
26843
26844         * loader.c (mono_method_get_param_names): Ignore instances of
26845         generic types for the moment.
26846
26847         * reflection.c (fixup_method): Added support for inflated methods.
26848         (mono_image_create_token): Use mono_image_get_methodref_token()
26849         for inflated methods.
26850         (mono_custom_attrs_from_param): Ignore instances of generic types
26851         for the moment.
26852         (mono_reflection_bind_generic_parameters): New public function.
26853         Moved all the functionality from
26854         ves_icall_Type_BindGenericParameters() here and added support for
26855         dynamic types.
26856         (mono_reflection_define_generic_parameter): Initialize
26857         `klass->methods' here.
26858
26859         * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
26860         functionality into mono_reflection_define_generic_parameter().
26861         (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
26862         TypeBuilder, return that TypeBuilder.
26863
26864 2003-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26865
26866         * appdomain.c: removed mono_delegate_semaphore.
26867
26868         * threadpool.c:
26869         (mono_thread_pool_add): moved hash table creation inside and the thread 
26870         creation outside of the critical region.
26871         (mono_thread_pool_finish): removed obsolete code.
26872         (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
26873         continue or exit the thread depending on the queue.
26874
26875 2003-10-07  Bernie Solomon  <bernard@ugsolutions.com>
26876
26877         * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
26878         marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
26879         handle more bool marshalling options
26880
26881 2003-10-07  Zoltan Varga  <vargaz@freemail.hu>
26882
26883         * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
26884         arrays of structs. Also add a more descriptive error message when
26885         a structure member is marshalled as LPArray.
26886
26887 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
26888
26889         * marshal.c (mono_marshal_get_native_wrapper): Add support for
26890         marshalling arrays of complex types. Fixes #29098. Also remove an
26891         usused and incomplete function.
26892
26893 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
26894
26895         * gc.c: report heap_size - free_bytes as total memory allocated
26896         (bug#49362).
26897
26898 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
26899
26900         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally 
26901         fix timezone handling problems on Windows.
26902         
26903         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
26904         asserts when the year is outside the range handled by ms the functions.
26905
26906         * class.c (setup_interface_offsets): If the class is an interface,
26907         fill out its interface_offsets slot.
26908
26909 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26910
26911         * threadpool.c: mark threadpool threads as background.
26912
26913 2003-10-03  Bernie Solomon  <bernard@ugsolutions.com>
26914
26915         * decimal.c - define DECINLINE to nothing if not using GCC
26916
26917 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
26918
26919         * assembly.c: More refcount fixes.
26920
26921 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26922
26923         * string-icalls.c: if we're not trimming, return the same string.
26924         When not splitting, don't create a new string.
26925
26926 2003-10-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26927
26928         * image.c:
26929         (mono_image_open): increment the ref_count inside the critical section.
26930
26931 2003-10-02  Zoltan Varga  <vargaz@freemail.hu>
26932
26933         * image.c (mono_image_open): Fix reference counting bug.
26934
26935 2003-09-30  Bernie Solomon  <bernard@ugsolutions.com>
26936
26937         * marshal.c (mono_marshal_type_size) struct alignment changed for 
26938         64bit machines.  (emit_ptr_to_str_conv) Fix bool conversions for 
26939         64bits. Avoid leak in mono_marshal_get_native_wrapper when
26940         mono_lookup_pinvoke_call throws.        
26941
26942 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
26943
26944         * reflection.c (mono_reflection_parse_type): Fix #49114.
26945
26946         * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
26947         temporary workaround for cygwin header problem.
26948
26949         * object.c (mono_object_isinst): Synchronize this with the code
26950         generated by the JIT for casts.
26951
26952 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
26953
26954         * reflection.c (encode_type): Fix #38332.
26955
26956 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
26957
26958         * marshal.c (mono_marshal_method_from_wrapper): New function to return
26959         the original method from the wrapper method.
26960
26961 2003-09-25  Martin Baulig  <martin@ximian.com>
26962
26963         * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
26964         interncall since it was identical to `Type.GetGenericTypeDefinition()'.
26965         (ves_icall_Type_get_IsGenericInstance): New interncall.
26966
26967 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
26968
26969         * object.c: fix cast warning in big endian code.
26970
26971 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
26972
26973         * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
26974         
26975 2003-09-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
26976
26977         * assembly.c: don't call check_env from mono_assembly_load. It's
26978         already done once in mono_assemblies_init and may cause headaches when
26979         multiple threads are loading assemblies.
26980
26981 2003-09-19  Martin Baulig  <martin@ximian.com>
26982
26983         * reflection.c (mono_reflection_define_generic_parameter): Don't
26984         allocate `klass->methods', set `klass->flags' to
26985         TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
26986
26987 2003-09-18  Martin Baulig  <martin@ximian.com>
26988
26989         * class.c (mono_class_init): Don't create `class->methods' if it's
26990         already initialized.
26991
26992         * metadata.c (mono_metadata_load_generic_params): Make this
26993         actually work.
26994
26995         * reflection.c (mono_reflection_define_generic_parameter): Set
26996         parent class and interfaces from the constraints.
26997
26998         * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
26999         to keep this struct in sync with the declaration in TypeBuilder.cs.
27000
27001 2003-09-17  Martin Baulig  <martin@ximian.com>
27002
27003         * metadata.h (MonoType): Replaced the data's `int type_param'
27004         field with `MonoGenericParam *generic_param'.
27005         (MonoGenericParam): Added `MonoClass *klass'.
27006
27007         * class.c (mono_class_from_gen_param): Removed the
27008         `MonoImage *image' and `int type_num' arguments.
27009
27010         * metadata.c (mono_metadata_parse_generic_param): New static
27011         method; creates a MonoGenericParam which just contains the index.
27012         (do_mono_metadata_parse_type): Call
27013         mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
27014         MONO_TYPE_MVAR.
27015
27016         * reflection.c (mono_image_typedef_or_ref): Generic type
27017         parameters may be in the same assembly, but never use a typedef
27018         for them.
27019         (mono_reflection_define_generic_parameter): We're now creating a
27020         "real" class for the type parameter; it's now safe to call
27021         mono_class_from_mono_type() on the class'es type, it'll do the
27022         right thing.
27023
27024 2003-09-16  Martin Baulig  <martin@ximian.com>
27025
27026         * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
27027         `symfile->range_entry_size' and `symfile->class_entry_size' here;
27028         the `symfile' data structure must be fully initialized before it
27029         gets added to the table.
27030
27031 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
27032
27033         * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
27034
27035         * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
27036         class init trampolines.
27037
27038 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
27039
27040         * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
27041         to the built-in profiler to turn off time and allocation profiling
27042         respectively.
27043
27044 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
27045
27046         * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
27047         g_direct_equal.
27048
27049         * debug-helpers.c (mono_method_full_name): Print the wrapper type
27050         in human readable form.
27051
27052 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
27053
27054         * reflection.c icall.c: Fixed warnings.
27055
27056         * image.c (load_class_names): Use a temporary hash table to hold the
27057         namespaces in order to avoid doing many string comparisons.
27058
27059         * image.h: Fix typo.
27060
27061         * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
27062         Pass NULL instead of g_direct_equal to the GHashTable constructor 
27063         since the NULL case is short-circuited inside g_hash_table_lookup, 
27064         leading to better performance.  
27065
27066         * metadata.c (mono_metadata_custom_attrs_from_index): New function to
27067         obtain the first custom attribute for a given index. Depends on the
27068         CustomAttribute table being sorted by the parent field.
27069
27070         * reflection.c (mono_custom_attrs_from_index): Use the new function 
27071         for better performance.
27072
27073 2003-09-07  Martin Baulig  <martin@ximian.com>
27074
27075         * class.c (mono_class_init): If we're a generic instance, inflate
27076         all our methods instead of loading them from the image.
27077         (mono_class_from_generic): Set `class->methods = gklass->methods'.
27078
27079 2003-09-07  Martin Baulig  <martin@ximian.com>
27080
27081         * mono-debug-debugger.c: Added support for constructors.
27082
27083 2003-09-06  Martin Baulig  <martin@ximian.com>
27084
27085         * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
27086         New interncall.
27087
27088         * reflection.c (mono_reflection_setup_generic_class): Call
27089         ensure_runtime_vtable() to create the vtable.
27090
27091 2003-09-05  Martin Baulig  <martin@ximian.com>
27092
27093         * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
27094         MONO_TYPE_MVAR.
27095
27096 2003-09-04  Martin Baulig  <martin@ximian.com>
27097
27098         * reflection.c (mono_reflection_define_generic_parameter): Generic
27099         parameters start with zero.
27100
27101 2003-09-04  Martin Baulig  <martin@ximian.com>
27102
27103         * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
27104
27105         * reflection.h (MonoReflectionGenericParam): New typedef.
27106         (MonoReflectionTypeBuilder): Added `generic_params' fields to get
27107         the generic parameters from the managed TypeBuilder.
27108
27109         * reflection.c (mono_reflection_define_generic_parameter): New function.
27110         (mono_reflection_create_runtime_class): Encode generic parameters.
27111         (mono_reflection_setup_generic_class): New function; this is
27112         called after adding adding all generic params to the TypeBuilder.
27113         (encode_type): Added MONO_TYPE_VAR.
27114
27115 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
27116
27117         * class.h class.c (mono_class_needs_cctor_run): Moved this method
27118         here from the JIT.
27119
27120         * assembly.h assembly.c: Moved the AOT loading code into an assembly
27121         load hook.
27122
27123 2003-09-03  Zoltan Varga  <vargaz@freemail.hu>
27124
27125         * reflection.h reflection.c class.h class.c: Delete duplicate 
27126         definition of mono_type_get_name () from reflection.c and export the
27127         one in class.c.
27128
27129         * class.c: Class loading fixes from Bernie Solomon 
27130         (bernard@ugsolutions.com).
27131
27132         * reflection.c: Endianness fixes from Bernie Solomon 
27133         (bernard@ugsolutions.com).
27134         
27135 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
27136
27137         * assembly.h assembly.c: Define a file format version for AOT
27138         libraries.
27139         
27140         * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
27141
27142         * appdomain.h (MonoJitInfo): New field to determine whenever the
27143         code is domain neutral.
27144         
27145 2003-08-31  Miguel de Icaza  <miguel@ximian.com>
27146
27147         * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
27148
27149 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
27150
27151         * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir): 
27152         (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
27153         Avoid caching the result since strings must be domain specific. Fixes
27154         #48050.
27155
27156 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
27157
27158         * marshal.c (mono_marshal_init): Make this callable multiple times
27159         since it is hard to find a correct place to call it.
27160
27161         * object.c (mono_runtime_class_init): Execute static constructors in
27162         the correct appdomain.
27163
27164         * image.c (build_guid_table): Handle the case when multiple images have
27165         the same GUID.
27166
27167 2003-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27168
27169         * icall.c: added a couple of icalls for System.Web.
27170
27171 2003-08-28  Martin Baulig  <martin@ximian.com>
27172
27173         * icall.c (ves_icall_Type_BindGenericParameters): Use
27174         `klass->generic_inst' instead of `&klass->byval_arg' in the
27175         mono_type_get_object() call.  The returned type must be
27176         MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
27177
27178 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
27179
27180         * NOTES: New file.
27181
27182         * object.c (mono_class_proxy_vtable): Make it thread safe.
27183
27184         * pedump.c: Fix warning.
27185
27186         * object.c appdomain.h: Get rid of metadata_section. 
27187         It is no longer needed and it was causing deadlocks with domain->lock.
27188
27189         * appdomain.c (add_assemblies_to_domain): Make it thread safe.
27190
27191 2003-08-26  Martin Baulig  <martin@ximian.com>
27192
27193         * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
27194
27195 2003-08-26  Martin Baulig  <martin@ximian.com>
27196
27197         * pedump.c (main): Call mono_metadata_init(),
27198         mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
27199         and mono_loader_init().
27200
27201 2003-08-26  Zoltan Varga  <vargaz@freemail.hu>
27202
27203         * loader.h: Add missing include to fix build.
27204
27205         * image.h: mono_image_load_references is no more.
27206
27207         * assembly.c: Reworked assembly loading to make it really thread safe.
27208         After these changes, the assembly returned by mono_assembly_open is
27209         fully initialized, i.e. all its references assemblies are loaded.
27210
27211         * assembly.c (mono_image_load_references): Renamed to 
27212         mono_assembly_load_references, and made private, since clients no
27213         longer need to call it.
27214
27215         * class.c: Removed calls to mono_assembly_load_references, since it was
27216         a source of deadlocks.
27217
27218         * loader.h loader.c class.h class.c: Protect data structures using a 
27219         new lock, the loader lock.
27220
27221         * class.c (mono_class_setup_vtable): Create temporary hash tables and
27222         GPtrArrays only when needed.
27223
27224         * class.c (mono_class_layout_fields): Ignore the dummy field inserted 
27225         into empty structures by mcs. Fixes pinvoke7.cs.
27226         
27227         * domain.c (mono_init): Call a new initialization function.
27228
27229         * appdomain.c (mono_runtime_init): Call the new initializer function
27230         of the marshal module.
27231
27232         * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
27233         inserted into empty structures by mcs. Fixes pinvoke7.cs.
27234
27235         * marshal.h marshal.c: Added locks around the wrapper caches to make
27236         this module thread safe.
27237
27238         * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
27239         this argument. Fixes pinvoke1.exe.
27240
27241 2003-08-25  Lluis Sanchez <lluis@ximian.com>
27242
27243         * object.h: Added call_type field to MonoMethodMessage and the corresponding
27244         enumeration of values. Removed fields to store remote call output values in
27245         MonoAsyncResult. Not needed any more.
27246         * object.c: Initialize call_type and async_result fields in mono_message_init.
27247         * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
27248         dispatching the message.
27249         mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
27250         async call to finish. To do it use a message with EndInvoke call type.
27251
27252 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
27253
27254         * loader.h loader.c (mono_method_hash_marhal_info): New function which
27255         determines whenever a method has marshalling info.
27256
27257 2003-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27258
27259         * assembly.c: fix the build on windows.
27260
27261 2003-08-22 Lluis Sanchez <lluis@ximian.com>
27262
27263         * object.cs: Fixed bug #47785.
27264
27265 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
27266
27267         * string-icalls.c (StringReplace): If their are no occurances of
27268         the old string found return a reference to the supplied
27269         string. This saves some memory and matches MS behavoir.
27270         
27271 2003-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27272
27273         * socket-io.c: fixed compilation for systems that define AF_INET6
27274         and don't define SOL_IP/SOL_IPV6.
27275
27276 2003-08-21  Zoltan Varga  <vargaz@freemail.hu>
27277
27278         * object.c (mono_object_isinst): Fix casts to TransparentProxy in
27279         the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
27280
27281         * rawbuffer.c rawbuffer.h: Make this module thread safe.
27282
27283         * domain.c: Make this module thread safe.
27284
27285         * domain.c (mono_init): Call new initialization function.
27286
27287         * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
27288         reference types too. Fixes #38812.
27289
27290         * image.c (mono_image_init): Fixed warnings.
27291
27292         * class.c (mono_class_from_typeref): Handle assembly load failure
27293         correctly.
27294
27295         * appdomain.c (add_assemblies_to_domain): Handle the case when
27296         the references of an assembly are not yet loaded.
27297
27298         * metadata.c image.c assembly.c: Moved initialization of global
27299         variables to a separate function called at startup since lazy 
27300         initialization of these variables is not thread safe.
27301         
27302         * image.c assembly.c: Made this module thread safe by adding locks in 
27303         the appropriate places.
27304
27305         * domain.c (mono_init): Call the new initialization functions of the
27306         three modules.
27307
27308 2003-08-20  Lluis Sanchez Gual  <lluis@ximian.com>
27309
27310         * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
27311           make a direct call. It is proxy's work to make the call asynchronous.
27312           mono_delegate_end_invoke(): If the targe is a proxy, just collect
27313           the return values.
27314         * object.cs: mono_method_call_message_new(): read AsyncResult and
27315           state object from parameters list, if this info is requested.
27316         * object.h: Added fields to store remote call output values in
27317           MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
27318
27319 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27320
27321         * object.h: add needed fields to MonoThread.
27322         * threads.c, threads.h: allow registering a function to cleanup data
27323         allocated per thread by the JIT.
27324
27325 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27326
27327         * loader.h: portability fix by Bernie Solomon
27328         * <bernard@ugsolutions.com>.
27329
27330 2003-08-16  Zoltan Varga  <vargaz@freemail.hu>
27331
27332         * reflection.h reflection.c (mono_param_get_objects): Changed this to 
27333         return a MonoArray. This simplifies the code and also ensures that
27334         the cache allways contains an object reference as a value.
27335
27336         * icall.c (ves_icall_get_parameter_info): Simplified using the new
27337         function.
27338
27339 2003-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27340
27341         * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
27342         fixes a problem with byte ordering when getting the address family for
27343         a socket.
27344
27345 2003-08-15  Zoltan Varga  <vargaz@freemail.hu>
27346
27347         * .cvsignore: Added monosn.
27348
27349         * reflection.h reflection.c loader.c: Added support for parameter
27350         marshalling to dynamically created types. Fixes #47295.
27351
27352 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
27353
27354         * rand.c: remove useless warnings.
27355
27356 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27357
27358         * class.c: implemented ldtoken for methods and fieldrefs.
27359
27360 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27361
27362         * threadpool.c: when mono_async_invoke was called, no one took care of
27363         monitoring the queue. So if the method invoked took some time and we
27364         got new async invoke requests after 500 ms (the thread created waited
27365         that long in WaitForSingleObject), the new async invoke was not called
27366         until the previous one finished.
27367
27368         This is fixed now. Thanks to Totte for helping with it.
27369
27370 2003-08-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27371
27372         * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
27373
27374 2003-08-11  Martin Baulig  <martin@ximian.com>
27375
27376         * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
27377
27378 2003-08-06  Martin Baulig  <martin@ximian.com>
27379
27380         * mono-debug-debugger.c: Added support for static fields,
27381         properties and methods.
27382
27383 2003-08-06  Martin Baulig  <martin@ximian.com>
27384
27385         * mono-debug-debugger.c: Don't store the MonoString's vtable to
27386         make this work for applications with multiple application domains.
27387
27388 2003-08-04  Martin Baulig  <martin@ximian.com>
27389
27390         * mono-debug-debugger.c: Completely reworked the type support; the
27391         most important thing is that we're now just using one single
27392         `MonoType' instance per type.
27393
27394 Sat Aug  2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
27395
27396         * mono-endian.h, mono-endian.c, icall.c: Added icall
27397         ves_icall_System_Double_AssertEndianity to assert double word endianity
27398         on ARM (FPA). The icall uses a macro defined in mono-endian.h.
27399
27400 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27401
27402         * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
27403         support, icalls and fixes.
27404
27405 2003-07-31  Miguel de Icaza  <miguel@ximian.com>
27406
27407         * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
27408         classes that are a punctuation character in .NET is not the same a
27409         g_unichar_ispunct.
27410
27411 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
27412
27413         * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
27414
27415 2003-07-29  Miguel de Icaza  <miguel@ximian.com>
27416
27417         * icall.c: Add new MemCopy internalcall.
27418         (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
27419         Simplified code; It is not necessary to handle all the cases here,
27420         as the C# code takes care of it.  Only handle the case of the name
27421         resource embedded into the assembly.
27422
27423         Changed signature to return the data pointer and the size of the
27424         data. 
27425
27426 2003-07-26  Miguel de Icaza  <miguel@ximian.com>
27427
27428         * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
27429         encoded.        (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
27430
27431 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
27432
27433         * socket-io.c: ignore EINTR error in select.
27434
27435 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
27436
27437         * class.h, class.c: removed unused subclasses field in MonoClass.
27438
27439 2003-07-29  Lluis Sanchez Gual  <lluis@ximian.com>
27440
27441         * icall.c: improve fix of get_base_definition(). If the parent class
27442           doesn't have the mehod, look at the parent of the parent.
27443         * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
27444           to check if a parameter is an in or out parameter
27445           (PARAM_ATTRIBUTE_IN is not set by default).
27446           mono_method_return_message_restore(): Use mono_class_value_size to
27447           get the size of a value type. mono_type_stack_size (parameterType)
27448           does not return the correct value if parameterType is byRef.
27449           mono_load_remote_field(), mono_load_remote_field_new(),
27450           mono_store_remote_field(), mono_store_remote_field_new():
27451           raise exception if the remote call returns an exception.
27452
27453 2003-07-28  Martin Baulig  <martin@ximian.com>
27454
27455         * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
27456         method.  This is a wrapper around mono_runtime_invoke() which
27457         boxes the instance object if neccessary.
27458
27459 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27460
27461         * class.c, class.h, image.c, image.h, loader.c, metadata.c,
27462         metadata.h, row-indexes.h, verify.c: first cut of generics support.
27463
27464 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27465
27466         * icall.c: disable mcs bug workaround.
27467
27468 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
27469
27470         * object.c (mono_runtime_class_init): Take the metadata_section
27471         mutex before obtaining the domain mutex.
27472
27473         * appdomain.h: Added definition of metadata_section mutex here. 
27474
27475         * object.c: define metadata_mutex here.
27476
27477 2003-07-24  Ravi Pratap  <ravi@ximian.com>
27478
27479         * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
27480         fixed.
27481
27482 2003-07-24  Lluis Sanchez Gual  <lluis@ximian.com>
27483
27484         * reflection.c: Fix bug #46669
27485
27486 2003-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27487
27488         * exception.c:
27489         * exception.h:
27490         * icall.c:
27491         * object.h: fill in the type name for TypeLoadException.
27492
27493 2003-07-23  Ravi Pratap  <ravi@ximian.com>
27494
27495         * class.c: Fixes from Paolo in response to bug #45415 (Subclass
27496         relationship between TypeBuilders while compiling corlib) and bug
27497         45993 (Array types returned from the runtime while compiling
27498         corlib were from the loaded corlib).
27499
27500 2003-07-22  Martin Baulig  <martin@ximian.com>
27501
27502         * mono-debug-debugger.c: Reworked the type support a bit more;
27503         distinguish between types and classes.
27504
27505 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
27506
27507         * icall.c: add IsArrayImpl icall.
27508
27509 2003-07-22  Zoltan Varga  <vargaz@freemail.hu>
27510
27511         * class.c (mono_class_layout_fields): Fix gc aware auto layout by
27512         initializing real_size only once. Also fix bug #46602.
27513
27514 2003-07-21  Jerome Laban <jlaban@wanadoo.fr>
27515
27516         * object.c: Renamed mono_metadata_section to metadata_section.
27517
27518 2003-07-21  Lluis Sanchez Gual  <lluis@ximian.com>
27519
27520         * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
27521           empty array if the type is an array. Fixed.
27522           ves_icall_MonoMethod_get_base_definition: if the base method
27523           is abstract, get the MethodInfo from the list of methods of
27524           the class.
27525         * reflection.c: ParameterInfo.PositionImpl should be zero-based
27526           and it was 1-based. Fixed in mono_param_get_objects.
27527
27528 2003-07-20  Martin Baulig  <martin@ximian.com>
27529
27530         * mono-debug.h: Set version number to 31.
27531         (mono_debug_init): Added `MonoDomain *' argument.
27532
27533         * mono-debug-debugger.c: Reworked the type support; explicitly
27534         tell the debugger about builtin types; pass the `klass' address to
27535         the debugger.
27536
27537 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
27538
27539         * image.c: Allow new metadata tables to be loaded without a
27540         warning. Also update the warning message to give the new constant value.
27541                 
27542 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
27543
27544         * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
27545         metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c: 
27546         array type representation changes.
27547
27548 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
27549
27550         * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
27551         on Environment.Exit () call.
27552
27553 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
27554
27555         * icall.c, reflection.h, reflection.c, verify.c: cleanups,
27556         requires a matching corlib.
27557
27558 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
27559
27560         * Changelog: My editor decided to add a CR to each line. Sorry about that.
27561           Committed again without the CRs.
27562         
27563 2003-07-17  Lluis Sanchez Gual  <lluis@ximian.com>
27564
27565         * socket-io.c: Get system_assembly using mono_image_loaded(), instead
27566           getting it from the "this" socket instance. Did not work
27567           if the socket is a subclass of Socket.
27568           Also fixed bug #35371.
27569
27570 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
27571
27572         * metadata.c: fixed size for TypedByRef.
27573         * loader.c: when searching for a method, consider the vararg amrker.
27574         * unicode.c, decimal.c: constify some arrays.
27575
27576 2003-07-15  Dick Porter  <dick@ximian.com>
27577
27578         * socket-io.c: Fixed compilation for gcc < 3.2.
27579
27580         Fixed compilation for machines that don't have AF_INET6 (thanks to
27581         Bernie Solomon <bernard@ugsolutions.com> for that part.)
27582
27583         Fixed compile warnings.
27584         
27585         Fixed formatting and line endings.
27586
27587 2003-07-14  Jerome Laban <jlaban@wanadoo.fr>
27588
27589         * socket-io.h:
27590         * socket-io.c: Added IPv6 support.
27591
27592 2003-07-13  Zoltan Varga  <vargaz@freemail.hu>
27593
27594         * class.c (mono_class_is_assignable_from): New function to implement
27595         the is_assignable_from logic. Used by mono_object_isinst, 
27596         Type::IsAssignableFrom () and the interpreter.
27597
27598         * class.c (mono_class_is_subclass_of): Make all classes a subclass of
27599         Object, even interfaces.
27600         
27601         * object.c (mono_object_isinst): Implement in terms of 
27602         is_assignable_from.
27603
27604         * icall.c (ves_icall_type_is_assignable_from): New icall.
27605
27606 2003-07-11  Zoltan Varga  <vargaz@freemail.hu>
27607
27608         * domain.c (foreach_domain): fix compiler warning.
27609
27610 2003-07-11  Dietmar Maurer  <dietmar@ximian.com>
27611
27612         * image.c (load_metadata_ptrs): use g_strndup because strndup is
27613         not available on all plattforms
27614
27615 2003-07-10  Zoltan Varga  <vargaz@freemail.hu>
27616
27617         * image.h image.c: Store the metadata version string in MonoImage.
27618         * icall.c: New icall to retrieve the image version.
27619         * reflection.c (create_dynamic_image): Fill in the image version field
27620         * reflection.c (build_compressed_metadata): Use the image version
27621         from the image structure.
27622
27623 2003-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27624
27625         * appdomain.c: modified comment.
27626         * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
27627         That will be its last iteration when mono_gc_cleanup is called from
27628         mono_runtime_cleanup and before the domain is unloaded.
27629
27630         Fixes bug #45962.
27631
27632 2003-07-04  Dietmar Maurer  <dietmar@ximian.com>
27633
27634         * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
27635         attributes.
27636
27637 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27638
27639         * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
27640         rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
27641         Bernie Solomon <bernard@ugsolutions.com>.
27642
27643 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
27644
27645         * object.c, object.h: provide mono_object_new_fast() for faster
27646         allocation in some special cases.
27647
27648 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
27649
27650         * object.h, reflection.h, verify.c: fixes for some 64bit issues,
27651         mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
27652
27653 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
27654
27655         * threadpool.c: fix leaks.
27656
27657 2003-07-01  Dick Porter  <dick@ximian.com>
27658
27659         * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
27660         using MonoGHashTables.  Fixes threadpool bug posted to list.
27661
27662 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
27663
27664         * image.h, image.c: added support to load an assembly from a byte array.
27665         * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added 
27666         assembly bundle support.
27667
27668 2003-06-27  Dietmar Maurer  <dietmar@ximian.com>
27669
27670         * threadpool.c (mono_thread_pool_add): keep a reference to the
27671         AsyncResult to prevent GC
27672
27673 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
27674
27675         * class.c: leak fix.
27676
27677 2003-06-25  Dick Porter  <dick@ximian.com>
27678
27679         * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
27680         for the async object, the WaitHandle object will close the handle.
27681         Fixes bug 45321.
27682
27683 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
27684
27685         * class.c: in mono_array_class_get (), lookup from the hash with the
27686         same type we insert: this works around a bug in
27687         mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
27688         lluis. The real fix will have to wait for after the release.
27689
27690 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
27691
27692         * icall.c: fix memory leak when getting type members.
27693
27694 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
27695
27696         * reflection.c: added more pubtoken special cases.
27697
27698 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
27699
27700         * class.c: handle field offset correctly when class size
27701         is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
27702
27703 2003-06-20  Martin Baulig  <martin@ximian.com>
27704
27705         * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
27706         *image' field.
27707
27708 2003-06-20  Martin Baulig  <martin@ximian.com>
27709
27710         * image.h, mono-debug-debugger.h: Fixed compiler warnings.
27711
27712 2003-06-20  Martin Baulig  <martin@ximian.com>
27713
27714         * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed.  We
27715         just distinguish between variables in registers and variables at
27716         an offset relative to a register.
27717
27718 2003-06-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27719
27720         * icall.c: #ifdef out latest changes until mcs is fixed.
27721
27722 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27723
27724         * icall.c: return members in metadata order.
27725
27726 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
27727
27728         * icall.c: avoid infinite loop in GetTimeZoneData.
27729
27730 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
27731
27732         * icall.c: added Marshal.Prelink/All icalls.
27733
27734 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
27735
27736         * object.c, object.h: fix warnings and do some overflow checking
27737         when creating arrays.
27738
27739 2003-06-17  Dick Porter  <dick@ximian.com>
27740
27741         * file-io.h:
27742         * file-io.c: File attributes need to be tweaked slightly when
27743         passed from the managed to the w32 world.
27744
27745 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
27746         * profiler.h profiler-private.h profiler.c: Rework last patch
27747         based on suggestion by Paolo.
27748         
27749 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
27750
27751         * profiler.h profiler-private.h profiler.c: Added infrastructure for 
27752         instruction level coverage data collection.
27753         * profiler.h profiler.c (: Added new callback function which can be
27754         used by the profiler to limit which functions should have coverage
27755         instrumentation.
27756         * profiler.c (mono_profiler_load): Call g_module_build_path to
27757         generate the file name of the profiler library.
27758
27759 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
27760
27761         * profiler.c, profiler.h, profiler-private.h: added basic block 
27762         coverage profiling API.
27763
27764 2003-06-15  Zoltan Varga  <vargaz@freemail.hu>
27765
27766         * reflection.c (mono_reflection_create_runtime_class): Add support
27767         for events in dynamically generated code.
27768
27769         * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
27770         not allocated.
27771
27772 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
27773
27774         * icall.c: when getting timezone info, return reasonable values if we
27775         can't get the actual data.
27776
27777 2003-06-14  Dick Porter  <dick@ximian.com>
27778
27779         * threads.c (start_wrapper): Remove the reference to the thread
27780         object in the TLS data, so the thread object can be finalized.
27781         This won't be reached if the thread threw an uncaught exception,
27782         so those thread handles will stay referenced :-( (This is due to
27783         missing support for scanning thread-specific data in the Boehm GC
27784         - the io-layer keeps a GC-visible hash of pointers to TLS data.)
27785
27786 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
27787
27788         * reflection.c: ensure streams and tables are first allocated with
27789         ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
27790
27791 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
27792
27793         * icall.c: fixed GetElementType for byrefs (bug# 44792).
27794
27795 2003-06-13  Zoltan Varga  <vargaz@freemail.hu>
27796
27797         * reflection.c (mono_reflection_create_runtime_class): Add support for
27798         properties to dynamically created classes.
27799         * reflection.c: Fix a few places where non-MonoObjects were inserted
27800         into the tokens hashtable.
27801
27802 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
27803
27804         * object.c: some support to handle out of memory exceptions.
27805
27806 2003-06-12  Dietmar Maurer  <dietmar@ximian.com>
27807
27808         * marshal.c (mono_marshal_get_native_wrapper): support reference
27809         return types
27810
27811 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
27812
27813         * object.h, object.c: more portability stuff from Bernie Solomon.
27814         Unexport mono_object_allocate(). Added mono_object_unbox ().
27815         Set exitcode when an unhandled exception is thrown.
27816
27817 2003-06-11  Dietmar Maurer  <dietmar@ximian.com>
27818
27819         * marshal.c (mono_marshal_get_native_wrapper): use custom
27820         marshaler for return types.
27821
27822 2003-06-10  Dick Porter  <dick@ximian.com>
27823
27824         * socket-io.c: Don't assume that one of struct ip_mreqn or struct
27825         ip_mreq is available
27826
27827 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
27828
27829         * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
27830         mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
27831         by Bernie Solomon <bernard@ugsolutions.com>.
27832
27833 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
27834
27835         * gc.c (mono_gc_init): Avoid error message on shutdown when
27836         GC_DONT_GC=1 is used.
27837
27838         * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal): 
27839         New icall to return the GUID of a module.
27840
27841 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
27842
27843         * class.c: ensure instance size always includes the parent's size
27844         even whem class size is set explicitly (fixes bug#44294).
27845
27846 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
27847
27848         * profiler.h, profiler.c: made the simple profiler thread-safe,
27849         get more accurate timing info. Allow the loading of an
27850         externally-developed profiler module.
27851
27852 2003-06-05  Dietmar Maurer  <dietmar@ximian.com>
27853
27854         * marshal.c (mono_marshal_get_native_wrapper): improved
27855         class/byref arguments.
27856         (mono_marshal_get_native_wrapper): better string marshaling support.
27857
27858 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
27859
27860         * class.c: ensure .pack and .size are handled correctly and
27861         simplified layout of static fields.
27862
27863 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
27864
27865         * appdomain.c
27866         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
27867
27868         * loader.c (mono_lookup_pinvoke_call): look for modules in the
27869         current directory (fix bug 44008)
27870
27871 2003-06-03  Dietmar Maurer  <dietmar@ximian.com>
27872
27873         * marshal.c (mono_marshal_get_native_wrapper): started support for
27874         custom marshalers.
27875         (mono_delegate_to_ftnptr): consider marshalling specifications
27876
27877 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
27878
27879         * reflection.c, reflection.h: emit custom marshal info.
27880
27881 2003-06-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27882
27883         * object.c: free the GError.
27884         * icall.c: added CloseEvent_internal.
27885         * threads.[ch]:
27886         (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
27887         call.
27888
27889 2003-06-01  Zoltan Varga  <vargaz@freemail.hu>
27890
27891         * loader.c (mono_method_get_signature): Add support for dynamic
27892         assemblies.
27893
27894 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
27895
27896         * reflection.c: fixed bug #43905.
27897
27898 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
27899
27900         * class.c, domain.c, icall.c, metadata.h, object.h: support for
27901         handling TypedReference and ArgIterator.
27902         * loader.c, loader.h: added function to get signature at call site.
27903
27904 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
27905
27906         * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more 
27907         data readonly. Buglets and warning fixes. Some MethodSpec support.
27908
27909 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
27910
27911         * class.h, class.c, object.c: remove relative numbering support.
27912
27913 2003-05-26  Miguel de Icaza  <miguel@ximian.com>
27914
27915         * marshal.c (mono_marshal_get_native_wrapper): For now, do not
27916         free the string, until we get a chance to fix Gtk#
27917
27918 2003-05-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
27919
27920         * marshal.c: revert last patch.
27921
27922 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
27923
27924         * icall.c: updates for new mono_class_vtable() not calling
27925         the type constructor anymore.
27926
27927 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
27928
27929         * object.h, object.c: separate vtable creation from type
27930         initialization. Make running the .cctor thread safe.
27931
27932 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
27933
27934         * marshal.c (mono_marshal_get_native_wrapper): free string return values.
27935
27936 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
27937
27938         * loader.c (mono_get_method): consider calling convention
27939
27940 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
27941
27942         * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
27943         to return the invisible global type for a module.
27944
27945         * reflection.c (mono_image_build_metadata): Emit global fields too.
27946
27947 2003-05-20  Peter Williams  <peterw@ximian.com>
27948
27949         * loader.c (mono_lookup_internal_call): Add a few newlines.
27950
27951 2003-05-20  Zoltan Varga  <vargaz@freemail.hu>
27952
27953         * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
27954         literal strings.
27955
27956         * appdomain.c (set_domain_search_path): Recalculate search path when
27957         AppDomainSetup.PrivateBinPath changes.
27958
27959         * object.c (mono_class_compute_gc_descriptor): It turns out some
27960         parts of the class libs (like System.Thread) holds pointers to
27961         GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
27962         to treat native int a pointer type here.
27963         
27964 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
27965
27966         * appdomain.h, domain.c: add hashtable for jump target resolution.
27967
27968 2003-05-19  Zoltan Varga  <vargaz@freemail.hu>
27969
27970         * reflection.h reflection.c icall.c: Added new icalls 
27971         GetManifestResourceInfoInternal, GetModulesInternal and support
27972         infrastructure.
27973
27974 2003-05-16  Dick Porter  <dick@ximian.com>
27975
27976         * icall.c:
27977         * file-io.h:
27978         * file-io.c: Implement System.IO.MonoIO::GetTempPath
27979
27980 2003-05-14  Lluis Sanchez Gual  <lluis@ideary.com>
27981
27982         * object.c: mono_store_remote_field: little fix to previous patch.
27983
27984 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
27985
27986         * class.c: add constructors to array classes.
27987         * icall.c: special case array construction for InternalInvoke (),
27988
27989 2003-05-14  Zoltan Varga  <vargaz@freemail.hu>
27990
27991         * class.h class.c reflection.c object.c: Added support for field
27992         defaults in dynamically generated classes.
27993
27994 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
27995
27996         * reflection.c: properly encode charset for ddlimport.
27997
27998 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
27999
28000         * threads.c: allow compiling without GC.
28001
28002 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
28003
28004         * appdomain.h, object.c, object.h, threads.c, threads.h: added
28005         handling of thread static data.
28006
28007 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
28008
28009         * reflection.h, reflection.c: added mono_custom_attrs_free ().
28010
28011 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
28012
28013         * class.c (mono_array_class_get): always set the serializable flags
28014         (mono_array_class_get): always set the SEALED attribute for array types
28015
28016 2003-05-12  Dietmar Maurer  <dietmar@ximian.com>
28017
28018         * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
28019         attributes (fix for bug 42021).
28020
28021 2003-05-12  Dick Porter  <dick@ximian.com>
28022
28023         * gc.c: Don't run finalizers when the finalizer thread is
28024         finishing up, because the default domain has already been
28025         destroyed.
28026
28027 2003-05-11  Miguel de Icaza  <miguel@ximian.com>
28028
28029         * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
28030         value is null, we should throw an exception.   This is slightly
28031         different than the other conventions used for the constructor.
28032
28033 2003-05-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28034
28035         * socket-io.c: fixed windows build.
28036
28037 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28038
28039         * socket-io.c: patch by Jerome Laban that fixes bug #42393.
28040
28041 2003-05-10  Zoltan Varga  <vargaz@freemail.hu>
28042
28043         * object.c (mono_string_new_wrapper): Compatibility fix for MS
28044         compilers.
28045
28046 2003-05-09  Zoltan Varga  <vargaz@freemail.hu>
28047
28048         * class.c (mono_class_layout_fields): Add experimental GC aware
28049         auto layout facility. Requires class library changes to work correctly.
28050
28051         (mono_class_setup_vtable): Avoid overriding explicit interface
28052         method implementations. Fixes iface3.exe test.
28053
28054         * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
28055         object reference.
28056         (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
28057         (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
28058
28059         * metadata.h: Add new type classification macro which determines
28060         whenever the type holds an object reference.
28061
28062 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
28063
28064         * marshal.c (mono_marshal_get_native_wrapper): cleanups
28065
28066 2003-05-07  Zoltan Varga  <vargaz@freemail.hu>
28067
28068         * gc.c (finalizer_thread): Work around a GC bug.
28069
28070 2003-05-07  Dietmar Maurer  <dietmar@ximian.com>
28071
28072         * marshal.c (emit_struct_conv): allow unions
28073
28074         * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
28075
28076 2003-05-06  Dietmar Maurer  <dietmar@ximian.com>
28077
28078         * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
28079
28080 2003-05-06  Martin Baulig  <martin@ximian.com>
28081
28082         * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
28083
28084 2003-05-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28085
28086         * socket-io.c:
28087         (Select_internal): allow NULLs, don't create arrays if not needed.
28088         Coupled with Socket.cs changes.
28089
28090         * threadpool.c:
28091         (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
28092         register a finalizer for it that will close the semaphore handle. This
28093         fixes the leak and make Lupus' test run with > 4080 loops.
28094
28095 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
28096
28097         * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
28098         Jerome Laban (bug #42287)
28099
28100 2003-05-02  Martin Baulig  <martin@ximian.com>
28101
28102         * debug-mono-symfile.h
28103         (MonoSymbolFile): Moved declaration into mono-debug.h.
28104         (MonoDebugMethodJitInfo): Likewise.
28105         (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
28106         argument.
28107         (_mono_debug_address_from_il_offset): Take a
28108         MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
28109
28110         * mono-debug.h
28111         (MonoDebugDomainData): New struct.
28112         (mono_debug_get_domain_data): New function.
28113         (mono_debug_add_method): Take an additional `MonoDomain *'
28114         argument.
28115         (mono_debug_source_location_from_address): Likewise.
28116         (mono_debug_il_offset_from_address): Likewise.
28117         (mono_debug_address_from_il_offset): Likewise.
28118
28119 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
28120
28121         * reflection.c: one more check for null type in custom attrs.
28122
28123 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28124
28125         * reflection.c: avoid warning (comparison is always false due to limited
28126         range of data type).
28127
28128 2003-05-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28129
28130         * icall.c: throw an exception in Type.GetField if the argument 'name'
28131         is NULL.
28132
28133 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
28134
28135         * reflection.c: fixed handling of enums in named arguments to custom
28136         attributes (bug #42123).
28137
28138 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
28139
28140         * reflection.c: use the right array element type and handle
28141         a null for a Type argument, too.
28142
28143 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
28144
28145         * reflection.c: handle arrays as arguments to custom attributes.
28146
28147 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
28148
28149         * reflection.c: handle a string value in a custom attr
28150         ctor that takes an object.
28151
28152 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
28153
28154         * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
28155         (fix bug #42063)
28156
28157 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
28158
28159         * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
28160
28161 2003-04-27  Martin Baulig  <martin@ximian.com>
28162
28163         * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
28164         MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
28165         MONO_DEBUGGER_EVENT_BREAKPOINT.
28166         (mono_breakpoint_trampoline_code): Removed.
28167         (mono_debugger_event_handler): The last argument is now a
28168         `guint32'.
28169         (mono_debugger_insert_breakpoint_full): Removed the
28170         `use_trampoline' argument.
28171         (mono_debugger_method_has_breakpoint): Likewise.
28172         (mono_debugger_trampoline_breakpoint_callback): Renamed to
28173         mono_debugger_breakpoint_callback(); take the method and
28174         breakpoint number as arguments.
28175
28176 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
28177
28178         * metadata.c: fix off by one when loading parameters attributes.
28179
28180 2003-04-24  Martin Baulig  <martin@ximian.com>
28181
28182         * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
28183
28184 2003-04-24  Martin Baulig  <martin@ximian.com>
28185
28186         * mono-debug-debugger.c: Moved all code which interacts with the
28187         Mono Debugger here.
28188
28189         * debug-mono-symfile.c: This code now just deals with the symbol
28190         file itself, the debugger code is now in mono-debug-debugger.c.
28191
28192 2003-04-23  Martin Baulig  <martin@ximian.com>
28193
28194         * mono-debug.c (mono_debug_source_location_from_il_offset):
28195         New method; like mono_debug_source_location_from_address(), but
28196         takes an IL offset instead of a machine address.
28197
28198 2003-04-23  Martin Baulig  <martin@ximian.com>
28199
28200         * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
28201         `line' field; this is now computed by the debugger.
28202
28203 2003-04-23  Martin Baulig  <martin@ximian.com>
28204
28205         * mono-debug.[ch]: New files.  This is the new debugging interface.
28206
28207         * mono-debug-debugger.[ch]: New files.  Moved all code which
28208         interacts with the Mono Debugger here.
28209
28210 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
28211
28212         * domain.c (mono_init): initialize mono_defaults.monitor_class
28213
28214 2003-04-21  Miguel de Icaza  <miguel@ximian.com>
28215
28216         * reflection.c (method_encode_code): Add a spicy exception to help
28217         future compiler authors.
28218
28219 2003-04-21  Martin Baulig  <martin@ximian.com>
28220
28221         * icall.c
28222         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
28223         Make this work with relative pathnames; g_filename_to_uri() needs
28224         an absolute filename.
28225
28226 2003-04-18  Zoltan Varga  <vargaz@freemail.hu>
28227
28228         * icall.c: Track name changes in Object and ValueType.
28229
28230 2003-04-18  Dietmar Maurer  <dietmar@ximian.com>
28231
28232         * metadata.c (mono_type_stack_size): size should be a multiple of
28233         sizeof (gpointer)
28234
28235 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28236
28237         * gc.c:
28238         (internal_domain_finalize): moved into mono_domain_finalize. No need
28239         to create another thread because the finalizers will be run in the
28240         finalizer thread.
28241         
28242         (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
28243         (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
28244         to be run (MS does this too).
28245
28246 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
28247
28248         * object.c (mono_class_compute_gc_descriptor): Update comment.
28249
28250         * loader.h marshal.h marshal.c: Added synchronized method wrappers.
28251
28252         * image.h: Add synchronized wrapper cache.
28253
28254         * image.c (do_mono_image_open): Initialize cache.
28255
28256         * reflection.c (create_dynamic_mono_image): Initialize cache.
28257
28258 2003-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28259
28260         * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
28261         ves_icall_System_Buffer_ByteLengthInternal.
28262
28263 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
28264
28265         * reflection.c: setup klass->nested_in earlier. Allow
28266         a dash in the assembly name.
28267
28268 2003-04-15  Dietmar Maurer  <dietmar@ximian.com>
28269
28270         * metadata.c (mono_type_to_unmanaged): dont access
28271         type->data.klass for MONO_TYPE_OBJECT
28272         (mono_type_to_unmanaged): consider System.Delegate class
28273
28274 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
28275
28276         * class.c: just setup supertypes in the proper place instead of
28277         initializing the full element class for arrays.
28278
28279 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
28280
28281         * class.c: ensure the element class of arrays is initialized.
28282         Setup the supertype info for array classes, too.
28283
28284 2003-04-14  Miguel de Icaza  <miguel@ximian.com>
28285
28286         * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
28287
28288 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28289
28290         * Makefile.am: re-added -m option when running cygpath. This way,
28291         MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
28292         separator.
28293         * mono-config.c: same codepath for locating mono config file for WIN32
28294         and the rest.
28295         * assembly.c: if mono_assembly_setrootdir is called, don't override
28296         the value set.
28297
28298 2003-04-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28299
28300         * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
28301         MONO_ASSEMBLIES variable.
28302
28303 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
28304
28305         * icall.c: added Assembly::GetNamespaces() icall.
28306
28307 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28308
28309         * reflection.c: fix from Jaak <jaak@zd.com.pl>.
28310
28311 2003-04-10  Lluis Sanchez Gual  <lluis@ideary.com>
28312
28313         * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
28314         * object.c: fixed bug in the construction of vtable for proxies
28315
28316 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
28317
28318         * object.c (mono_array_new): Mark mono_array_new as an icall.
28319
28320 2003-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28321
28322         * class.c: fixed test for public method when overriding interfaces.
28323         Closes bug #40970.
28324
28325 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
28326
28327         * appdomain.h, domain.c: added mono_domain_foreach() to
28328         be able to access the currently loaded appdomains.
28329         * object.c: make string interning work across sppdomains.
28330         Mark some functions for use as icalls.
28331
28332 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
28333
28334         * class.c reflection.c: Fix memory leaks reported by ccmalloc.
28335
28336         * reflection.h reflection.c: Allocate long living data using 
28337         GC_MALLOC_ATOMIC so the collector does not need to scan it.
28338
28339         * reflection.c: Double the allocation size in streams instead of
28340         increasing it, to prevent unneccesary copying on large assemblies.
28341         
28342         * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
28343         creation if the assembly does not have the Run flag set.
28344
28345 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
28346
28347         * class.h: avoid the C++ keywords in header files (Jerome Laban
28348         spotted and fixed this).
28349
28350 2003-04-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28351
28352         * object.c:
28353         (mono_unhandled_exception): fill in the arguments for the
28354         UnhandledException event. Only trigger that event for the default
28355         domain (as MS does).
28356
28357 2003-04-04  Zoltan Varga  <vargaz@freemail.hu>
28358
28359         * object.c: Improve typed allocation stuff based on suggestions from
28360         Paolo. Also turn it on if the GC library supports it.
28361
28362 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
28363
28364         * object.c object.h class.h: Added experimental typed allocation
28365         facility using the interfaces in gc_gcj.h.
28366
28367         * os/gc_wrapper.h: Added new include files.
28368         
28369 2003-04-03  Martin Baulig  <martin@ximian.com>
28370
28371         All the following changes are conditional to `WITH_INCLUDED_LIBGC'
28372         which is not yet enabled by default.
28373
28374         * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
28375         functions.
28376         (mono_gc_lock, mono_gc_unlock): New static functions.
28377
28378         * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
28379         functions; stop/start the world for the garbage collector.  This
28380         is using the windows API; we need to complete the SuspendThread()/
28381         ResumeThread() implementation in the io-layer to make this work on Unix.
28382         (mono_gc_push_all_stacks): New public function; tells the garbage
28383         collector about the stack pointers from all managed threads.
28384
28385 2003-04-03  Martin Baulig  <martin@ximian.com>
28386
28387         * object.h (MonoThread): Added `gpointer stack_ptr'.
28388
28389         * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
28390
28391 2003-04-03  Martin Baulig  <martin@ximian.com>
28392
28393         * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
28394
28395 2003-04-03  Zoltan Varga  <vargaz@freemail.hu>
28396
28397         * reflection.c (typebuilder_setup_fields): Initialize field.first and
28398         field.last.
28399
28400 2003-04-02  Miguel de Icaza  <miguel@ximian.com>
28401
28402         * loader.c (mono_lookup_internal_call): Report the corlib that is
28403         out of sync.
28404
28405 2003-03-05  Aleksey Demakov <avd@openlinksw.com>
28406
28407         * icall.c (ves_icall_type_GetTypeCode): fixed check for
28408         System.DBNull (it's class not valuetype).
28409
28410 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
28411
28412         * reflection.c: set table_idx in MonoReflectionArrayMethod object even 
28413         if the array method was already assigned a token (fixes bug#40646).
28414
28415 2003-04-02  Zoltan Varga  <vargaz@freemail.hu>
28416
28417         * reflection.c (mono_reflection_get_type): Attempt type resolve even
28418         if no assembly is given.
28419
28420 2003-04-01  Miguel de Icaza  <miguel@ximian.com>
28421
28422         * metadata.h: Added the new tables.
28423
28424         * row-indexes.h: Added definitions for new tables.
28425
28426         * metadata.c: Add schemas for new tables, and add support for
28427         computing the sizes of them.
28428
28429         * class.c: Update for handling the new type cases.
28430
28431 2003-04-01  Dietmar Maurer  <dietmar@ximian.com>
28432
28433         * metadata.h (MONO_TYPE_IS_VOID): new macro
28434
28435 2003-03-31  Martin Baulig  <martin@ximian.com>
28436
28437         * threads.h (MonoThreadCallbacks): Added `thread_created'.
28438
28439         * threads.c (mono_thread_new_init): Call `thread_created' in the
28440         mono_thread_callbacks.
28441
28442 2003-03-31  Lluis Sanchez Gual <lluis@ideary.com>
28443
28444         * loader.h: added marshalbyrefobject_class to mono_defaults
28445         * domain.c: added initialization of mono_defaults.marshalbyrefobject_class 
28446         * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
28447           generation of output parameters.
28448           ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
28449         * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
28450           contextbound and the target object belongs to the context of the caller.
28451         * object.h: added context and unwrapped_server variables in MonoRealProxy.
28452         * object.c: Implemented support for interfaces and abstract classes
28453           in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
28454           proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
28455
28456 2003-03-30  Zoltan Varga  <vargaz@freemail.hu>
28457
28458         * class.h class.c (mono_class_is_subclass_of): New function.
28459         
28460         * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
28461         routines for most common case (calls from ArrayList::ToArray).
28462
28463         * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown 
28464         routine so programs which call Environment::Exit() can be profiled.
28465
28466         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle): 
28467         Added MONO_ARCH_SAVE_REGS.
28468
28469         * icall.c (ves_icall_type_is_subtype_of): Use new function.
28470
28471 2003-03-29  Miguel de Icaza  <miguel@ximian.com>
28472
28473         * blob.h: Add a couple of new MonoType types definitions.
28474
28475         * tabledefs.h: Add a couple of new call convs.
28476
28477 2003-03-27  Zoltan Varga  <vargaz@freemail.h>
28478
28479         * reflection.h (MonoReflectionDynamicAssembly): track changes in
28480         the layout of the class.
28481
28482         * reflection.c (alloc_table): double the size on overflow to avoid
28483         unnecessary copying.
28484
28485         * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
28486         avoid filling out metadata tables and blobs. Also set mb->ilgen to
28487         null so it can be garbage collected.
28488         
28489 2003-03-27  Zoltan Varga  <vargaz@freemail.hu>
28490
28491         * reflection.c (mono_reflection_get_type): Return the resolved type
28492         only if it is in the assembly we searched.
28493
28494         * reflection.c (ensure_runtime_vtable): Initialize method slots.
28495
28496         * class.c (mono_class_setup_vtable): Set the slot of the overriding
28497         method.
28498
28499 2003-03-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28500
28501         * appdomain.c:
28502         (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
28503         the right one is 'file:///blah', but MS allows it.
28504         * assembly.c:
28505         (mono_assembly_open): allow 'file://blah'
28506
28507         Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
28508
28509 2003-03-26  Aleksey Demakov <avd@openlinksw.com>
28510
28511         * socket-io.c: fixes bug #40310.
28512
28513 2003-03-25  Zoltan Varga  <vargaz@freemail.hu>
28514
28515         * reflection.c (mono_reflection_parse_type): handle deeply nested
28516         types correctly.
28517
28518         * reflection.c (mono_image_create_token): Use unique token values
28519         since they will be put into a hash table.
28520
28521         * class.c (mono_class_setup_vtable): If a method occurs in more than
28522         one place in the vtable, and it gets overriden, then change the
28523         other occurances too.
28524
28525         * marshal.c (mono_marshal_get_managed_wrapper): Added support for
28526         object as return type.
28527
28528 2003-03-22  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
28529
28530         * icall.c: Deleted "ToString" implementation for double and float
28531         because they are full implemented in managed code.
28532
28533 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
28534
28535         * reflection.c, reflection.h: implemented and exported functions
28536         to retrieve info about custom attributes.
28537
28538 2003-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28539
28540         * appdomain.c: moved Uri handling to assembly.c
28541         * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
28542         work when using a file Uri in *nix and windows.
28543
28544         * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
28545         GetReferencedAssemblies.
28546
28547 2003-03-18  Dick Porter  <dick@ximian.com>
28548
28549         * icall.c: Rename a couple of internal calls
28550
28551         * threads.c: Set the thread state to Stopped when a thread exits.
28552         Fixes bug 39377.
28553
28554 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>
28555
28556         * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
28557         New icall.
28558
28559         * object.c (mono_class_vtable): fix warning.
28560
28561 2003-03-17  Zoltan Varga  <vargaz@freemail.hu>  
28562
28563         * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
28564
28565         * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
28566         memory.
28567         (method_encode_clauses): Create exception info structures in the right
28568         order.
28569         (mono_reflection_setup_internal_class): Initialize supertypes field.
28570
28571         * class.c object.c: Handle interfaces which implement other interfaces 
28572         correctly.
28573
28574         * class.h class.c: Move the supertypes array initialization code into 
28575         a separate function so it can be used for dynamic types too. Also call
28576         it earlier, in mono_class_init(), since it can be used before the
28577         type is initialized.
28578
28579 2003-03-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28580
28581         * Makefile.am:
28582         * assembly.c:
28583         * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
28584
28585         * appdomain.c:
28586         * appdomain.h:
28587         * marshal.c:
28588         * object.c: remove warnings.
28589
28590 2003-03-13  Martin Baulig  <martin@ximian.com>
28591
28592         * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
28593         (MonoDebugLexicalBlockEntry): New types.
28594
28595         * debug-mono-symfile.c
28596         (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
28597
28598 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28599
28600         * process.c: ret can be any non-zero value accroding to MS doc.
28601
28602 2003-03-07  Miguel de Icaza  <miguel@ximian.com>
28603
28604         * class.c (mono_marshal_load_type_info): Fix buglet:  Noticed when
28605         fixing a warning for a miss-used prototype, would have cause
28606         random memory corruption.
28607
28608 2003-03-07  Martin Baulig  <martin@ximian.com>
28609
28610         * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
28611         getting really annoying ....
28612
28613 2003-03-07  Zoltan Varga  <vargaz@freemail.hu>
28614
28615         * reflection.c (fixup_method): added support for array methods.
28616
28617 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
28618
28619         * socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
28620         (pointed out by Michael Adams).
28621
28622 2003-03-04  Dick Porter  <dick@ximian.com>
28623
28624         * icall.c: Temporarily reverted the Double and Single ToString()
28625         change, because it broke nunit.
28626
28627 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
28628
28629         * object.h, threads.h: make include files compatible with C++
28630         (patch by Jerome Laban <jlaban@wanadoo.fr>).
28631
28632 2003-03-04  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
28633
28634         * icall.c: Erased ToString helper functions for Double and Single.
28635         Now, that implementations ar all in managed code (Double and Single
28636         Formatters).
28637
28638 2003-03-03  Lluis Sanchez Gual  <lluis@ideary.com>
28639
28640         * appdomain.c: Added method for initializing the default context of
28641         a domain. Added internal call for getting the default context.
28642         * appdomain.h: Added context variable in MonoDomain struct.
28643         * domain.c: mono_domain_set also sets the default context of the domain
28644         * icall.c: Mapped internal method InternalGetDefaultContext.
28645         * object.c: mono_object_get_virtual_method returns always a remoting
28646         wrapper if the object is a transparent proxy.
28647         mono_runtime_invoke_array: when creating an object by calling the
28648         constructor, if the created object is a proxy, then the constructor should
28649         be called using the a remoting wrapper.
28650
28651 2003-03-03  Dick Porter  <dick@ximian.com>
28652
28653         * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
28654         variable so it compiles on solaris.  Problem spotted by
28655         Christopher Taylor <ct@cs.clemson.edu>
28656
28657 2003-03-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28658
28659         * appdomain.c:
28660         (get_info_from_assembly_name): don't leak value.
28661
28662         * icall.c:
28663         (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
28664         result.
28665
28666 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
28667
28668         * assembly.c: export mono_image_load_references ().
28669         * class.c: handle function pointers. mono_class_from_name() now
28670         supports nested type names directly.
28671
28672 2003-02-28  Zoltan Varga  <vargaz@freemail.hu>
28673
28674         * reflection.h reflection.c: Encode already created dynamic methods 
28675         and fields correctly as a DEF instead of a REF.
28676
28677         * reflection.c: Get rid of the force_ref argument to 
28678         mono_image_typedef_or_ref since it was wrong in the first place.
28679
28680         * string-icalls.c: add error checking to string constructors according
28681         to the MSDN docs.
28682
28683         * reflection.c: Emit types in the order their TypeBuilders were 
28684         created. Previously, a new table index was assigned to each type before
28685         the tables were emitted. This was wrong because the signature blob
28686         might already refer to a type by its original table index.
28687
28688 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>
28689
28690         * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
28691         change.
28692         
28693 2003-02-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28694
28695         * Makefile.am: make assemblies dir have \ instead of / on windows.
28696
28697 2003-02-27  Zoltan Varga  <vargaz@freemail.hu>  
28698
28699         * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
28700         iterate over the NESTEDCLASS table using a linear search since the
28701         table is not guaranteed to be sorted by the secondary key.
28702
28703         * class.c (mono_class_create_from_typedef): fixed up call to
28704         mono_metadata_nesting_typedef.
28705         
28706 2003-02-27  Dietmar Maurer  <dietmar@ximian.com>
28707
28708         * marshal.c (mono_string_to_byvalstr): clear the memory as
28709         suggested by Jerome Laban <jlaban@wanadoo.fr>
28710
28711 2003-02-26  Dick Porter  <dick@ximian.com>
28712
28713         * process.c: Cope with padding in .rsrc blocks
28714
28715 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
28716
28717         * metadata.h: reverted the filter_len change, it breaks reflection
28718         
28719 2003-02-26  Dietmar Maurer  <dietmar@ximian.com>
28720
28721         * metadata.h: added a new field to store the filter_len
28722         
28723
28724 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
28725
28726         * reflection.c: handle custom attributes for types and members
28727         created with Reflection.Emit (bug#38422).
28728
28729 2003-02-22  Zoltan Varga  <vargaz@freemail.hu>
28730
28731         * reflection.c: define RTSpecialName automatically for constructors for
28732         compatibility with MS.NET.
28733
28734         * reflection.c (mono_reflection_create_runtime_class): initialize
28735         nested_in field of dynamically created classes.
28736
28737 2003-02-22  Martin Baulig  <martin@ximian.com>
28738
28739         * debug-mono-symfile.h: Incremented version number.
28740
28741 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
28742
28743         * object.h icall.c process.c: fix warnings.
28744
28745 2003-02-21  Zoltan Varga  <vargaz@freemail.hu>
28746
28747         * appdomain.h appdomain.c:
28748         (mono_domain_try_type_resolve): split the 
28749         name_or_tb argument into a name and a tb argument.
28750         (mono_domain_has_type_resolve): new function to check whenever the
28751         application has registered a TypeResolve event handler.
28752         
28753         * icall.c reflection.h reflection.c: move the type resolve logic into
28754         mono_reflection_get_type () so it will be invoked when 
28755         Assembly::GetType () is called.
28756
28757         * reflection.c:
28758         (mono_reflection_get_type): renamed to get_type_internal.
28759         (mono_reflection_get_type): fixed type name generation so it works 
28760         for nested types too.
28761         (mono_reflection_get_type): call has_type_resolve () to avoid the 
28762         costly type name generation if there is no resolve event handler.
28763
28764 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
28765
28766         * class.c, image.c: load exported types from file references.
28767
28768 2003-02-19  Lluis Sanchez Gual  <lluis@ideary.com>
28769
28770         * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
28771           used to cache the managed methods used to create proxies and make 
28772           remote invocation of methods.
28773         * class.h: Added in MonoVTable a flag to indicate that a class needs 
28774           to be remotely created.
28775         * object.c: Modified the method mono_class_vtable(). It now initializes 
28776           the remote flag of the vtable. Modified mono_object_new_specific(), 
28777           so now it checks the remote flag.
28778         * icall.c: Added a couple of internal methods, one for enabling instance 
28779           creation interception for a type, and one for creating objects bypassing
28780           the remote check.
28781
28782 2003-02-18  Martin Baulig  <martin@ximian.com>
28783
28784         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
28785         New interncall to get a method's metadata token.
28786
28787         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
28788         New interncall for the debugger.
28789
28790 2003-02-18  Dietmar Maurer  <dietmar@ximian.com>
28791
28792         * class.c (mono_class_setup_vtable): allocate supertype array
28793
28794 2003-02-18  Martin Baulig  <martin@ximian.com>
28795
28796         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
28797
28798 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28799
28800         * reflection.c:
28801         (assembly_name_to_aname): jump over unknown properties (i've found
28802         something like: 'type, assembly, version=xxx, custom=null, public...',
28803         so now will ignore custom=null and still get the rest of the values).
28804
28805 2003-02-17  Dick Porter  <dick@ximian.com>
28806
28807         * threads.c: Have Thread.Start() wait for a semaphore to signal
28808         that the thread has set up all its local data.  This fixes bug
28809         34323, where Abort() raced the new thread's TLS data.
28810
28811         Also removes the handle_store() call from start_wrapper, because
28812         threads are now always created suspended and there is no longer a
28813         race between the parent and child threads to store the info.
28814
28815 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
28816
28817         * image.c: explain the #- heap issue in a message, hopefully
28818         avoiding FAQs on mono-list.
28819
28820 2003-02-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28821
28822         * icall.c:
28823         (GetEntryAssembly): if the domain has not invoked
28824         AppDomain.ExecuteAssembly yet, return the assembly of the default
28825         AppDomain.
28826
28827 2003-02-16  Zoltan Varga  <vargaz@freemail.hu>
28828
28829         * class.c (mono_ldtoken): make it work in dynamic assemblies.
28830
28831 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
28832
28833         * metadata.c, reflection.c: simple speedup to type hash
28834         and equals code.
28835
28836 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
28837
28838         * image.c, image.h, class.c, assembly.c: move module loading
28839         to MonoImage. When loading metadata, consider alignemnet from
28840         the start of metadata, not from the metadata address in memory.
28841
28842 2003-02-13  Zoltan Varga  <vargaz@freemail.hu>
28843
28844         * reflection.c (mono_reflection_get_custom_attrs): Added support for 
28845         AssemblyBuilder objects. Factored out custom attribute creation into
28846         a separate function.
28847         (create_custom_attr): new function to create custom attributes.
28848
28849 2003-02-12  Miguel de Icaza  <miguel@ximian.com>
28850
28851         * Makefile.am: Got tired of typing the full pathname to pedump.
28852         Until there is another option, am installing this.
28853
28854 2003-02-12  Dietmar Maurer  <dietmar@ximian.com>
28855
28856         * class.c (class_compute_field_layout): always set field->parent 
28857         (mono_ldtoken): use mono_defaults.fieldhandle_class;
28858
28859 2003-02-11  Dick Porter  <dick@ximian.com>
28860
28861         * threads-types.h:
28862         * monitor.c: Rewrote Monitor, making lock much faster and
28863         Pulse/Wait work as specified.  Also uses much fewer handles, and only
28864         creates them as needed.
28865
28866         * exception.c: Added SynchronizationLockException
28867
28868         * threads.c: Deleted old Monitor implementation.  The new one is
28869         in a new file.
28870
28871 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
28872
28873         * class.c: handled TypedReference type code. Set the correct size for
28874         class data. Setup interface_offsets for interface classes, too.
28875
28876 2003-02-09  Martin Baulig  <martin@ximian.com>
28877
28878         * debug-mono-symfile.h: Reflect latest symbol writer changes.
28879
28880 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
28881
28882         * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
28883         * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
28884         * object.c: fixed mono_object_get_virtual_method () for interfaces.
28885         * verify.c: check for code that runs after the end of the method.
28886
28887 2003-02-08  Pedro Mart?nez Juli?  <yoros@wanadoo.es>
28888
28889         * icall.c: Added "System.Math::Floor", "System.Math::Round" and
28890         "System.Math::Round2".
28891         * sysmath.h: Added Floor, Round and Round2 definitions.
28892         * sysmath.c: Modified certain functions that were not 100% compliant
28893         with MS.NET (math precision) and added the implementation of Floor,
28894         Round and Round2.
28895
28896 2003-02-07  Martin Baulig  <martin@ximian.com>
28897
28898         * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
28899
28900 2003-02-07  Martin Baulig  <martin@ximian.com>
28901
28902         * debug-mono-symfile.c: Reflected latest symwriter changes.
28903         (mono_debug_create_mono_symbol_file): Removed.
28904         (mono_debug_open_mono_symbol_file): Take an argument which
28905         specifies whether to create a dynamic symbol file.
28906
28907 2003-02-07  Dietmar Maurer  <dietmar@ximian.com>
28908
28909         * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
28910
28911 2003-02-05  Martin Baulig  <martin@ximian.com>
28912
28913         * reflection.c (mono_image_build_metadata): Make this public,
28914         protect it against being called multiple times, don't create
28915         resources and don't build the compressed metadata here.
28916         (mono_image_create_pefile): Do this here.
28917
28918         * icall.c
28919         ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
28920
28921 2003-02-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28922
28923         * socket-io.c: fixed bug #36322.
28924
28925 2003-02-06  Piers Haken <piersh@friskit.com>
28926
28927         * appdomain.[ch]:
28928         * class.h:
28929         * debug-mono-symfile.c:
28930         * icall.c:
28931         * loader.c:
28932         * mono-config.c:
28933         * monosn.c:
28934         * reflection.c:
28935         * socket-io.c: warning cleanups
28936
28937 2003-02-06  Dietmar Maurer  <dietmar@ximian.com>
28938
28939         * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
28940         function. works like remoting invoke, but does a check for the Proxy first.
28941
28942 2003-02-05  Miguel de Icaza  <miguel@ximian.com>
28943
28944         * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
28945
28946 2003-02-05  Dietmar Maurer  <dietmar@ximian.com>
28947
28948         * marshal.c (mono_marshal_get_native_wrapper): only allocate an
28949         array of pointers.
28950         (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
28951         (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
28952
28953         * object.c (mono_store_remote_field_new): used by the new jit
28954         instead of mono_store_remote_field
28955         (mono_load_remote_field_new): used by the new jit
28956         instead of mono_load_remote_field
28957
28958 2003-02-05  Patrik Torstensson
28959
28960         * appdomain.c: changed unload to take the domain id instead
28961         of domain
28962         
28963         * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
28964
28965
28966 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28967
28968         * appdomain.c: don't look for assemblies in ApplicationBase if
28969         PrivateBinPathProbe is set.
28970
28971 2003-02-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28972
28973         * object.c: make the first argument in main_args contain the absolute
28974         path to the assembly. Fixes bug #37511.
28975
28976 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28977
28978         * icall.c: get correct UTC offset for countries not using daylight
28979         time saving. Fixes bug #30030.
28980
28981 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
28982
28983         * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
28984         and 1 are the family).
28985
28986 2003-02-04  Dietmar Maurer  <dietmar@ximian.com>
28987
28988         * icall.c (ves_icall_InternalExecute): removed wrong assertion
28989
28990         * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
28991
28992 2003-02-04  Zoltan Varga  <vargaz@freemail.hu>
28993
28994         * reflection.c: added support for SignatureHelper tokens, which is
28995         needed by the Calli opcode.
28996
28997         * reflection.h: track changes to SignatureHelper class.
28998
28999         * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
29000
29001 2003-02-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29002
29003         * appdomain.c: fixed loading assemblies from PrivateBinPath.
29004
29005 2003-02-03  Patrik Torstensson
29006         * appdomain.[c|h], domain.c : 
29007          - Added support for getting a domain via domain id
29008          - Support for setting and getting domain from System.AppDomain 
29009            (used in cross appdomain channel)
29010          - Added support for get/set for a MonoAppContext on a thread 
29011            (Context class in System.Runtime.Remoting.Contexts),
29012          - Removed hack in Get/SetData and ExecuteAssembly.
29013         
29014         * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
29015         the managed world to get control when a proxy is created.
29016
29017         * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
29018         
29019 2003-02-03  Miguel de Icaza  <miguel@ximian.com>
29020
29021         * icall.c
29022         (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
29023         Populate the codebase field as well.
29024
29025 2003-02-02  Martin Baulig  <martin@ximian.com>
29026
29027         * debug-mono-symfile.c
29028         (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
29029         (mono_debug_symfile_add_method): Allow interncalls.
29030
29031 2003-01-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29032
29033         * icall.c: throw parse exception if strtod fails or the string is empty.
29034
29035 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
29036
29037         * marshal.c: handle object type separately from defined
29038         class types.
29039
29040 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
29041
29042         * marshal.c: handle NATIVE_LPSTR for strings when it's
29043         explicitly specified.
29044
29045 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
29046
29047         * reflection.c, reflection.h, icall.c: setup the reflection
29048         handle cache for ModuleBuilders and AssemblyBuilders.
29049
29050 2003-01-30  Dietmar Maurer  <dietmar@ximian.com>
29051
29052         * reflection.c (reflection_methodbuilder_to_mono_method): set
29053         pinvoke flag
29054
29055 2003-01-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29056
29057         * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
29058
29059 2003-01-29  Dick Porter  <dick@ximian.com>
29060
29061         * threads.c: No need for the fake_thread kludge now that Thread
29062         doesn't run a class constructor
29063         
29064 2003-01-29  Dick Porter  <dick@ximian.com>
29065
29066         * threads.c: Use g_direct_hash instead of the rather bogus
29067         g_int_hash
29068
29069 2003-01-29  Dietmar Maurer  <dietmar@ximian.com>
29070
29071         * marshal.c (mono_marshal_get_native_wrapper): add check for null
29072         (fix pinvoke12.exe)
29073         (mono_marshal_get_struct_to_ptr): generate valid IL code
29074         (mono_marshal_get_ptr_to_struct): generate valid IL code
29075         (*): correctly set sig->pinvoke, we need to memdup the signature
29076         to do that
29077
29078 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
29079
29080         * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
29081         to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
29082
29083 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29084
29085         * profiler.c: provide more callers information.
29086
29087 2003-01-28  Dietmar Maurer  <dietmar@ximian.com>
29088
29089         * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
29090
29091         * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
29092
29093         * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
29094
29095 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29096
29097         * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
29098         exception instead of going into an infinite loop on dates which it 
29099         can't yet handle.
29100
29101         * string-icalls.c (ves_icall_System_String_get_Chars): raise 
29102         out-of-range exception if needed.
29103
29104         * class.c (mono_class_setup_vtable): allow a virtual method to provide
29105         an implementation for an interface method and to override an inherited
29106         method at the same time. 
29107         Imagine a scenario when a virtual method is used to override a
29108         virtual abstract method in a parent class, and this same method 
29109         provides an implementation for an method inherited from an interface. 
29110         In this case, the interface resolution code will set im->slot, which 
29111         means that the virtual method override pass will skip this method 
29112         which means a pointer to the abstract method inherited from the parent
29113         will remain in the vtable of this non-abstract class.
29114
29115         * class.c: (mono_class_setup_vtable): continue search for a real 
29116         method if only an abstract method is found.     
29117
29118 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
29119
29120         * reflection.c: add size to encoding for ByValStr and ByValArray
29121         marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
29122
29123 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29124
29125         * class.c (mono_class_setup_vtable): pass the override info as an
29126         argument.
29127
29128         * class.c (mono_class_setup_vtable): set the slot of overriding methods
29129         correctly.
29130         
29131         * reflection.c (ensure_runtime_vtable); add support for method 
29132         overrides.
29133         
29134 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29135
29136         * reflection.c (resolution_scope_from_image): Hack to work to work with
29137         dynamic assemblies.
29138
29139         * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and 
29140         added a 'force_ref' argument to force this function to allways return 
29141         a TypeRef. This is needed by mono_image_get_memberref_token ().
29142         
29143 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29144
29145         * reflection.c (mono_image_get_type_info): interfaces really don't have
29146         a parent.
29147
29148         * reflection.c (mono_image_basic_init): fill out missing fields of
29149         image structure.
29150
29151         * reflection.c (mono_image_basic_init): Invoke assembly load hooks for 
29152         dynamic assemblies. This is required so dynamic assemblies show up in
29153         AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
29154         Type::GetType() etc. This is consistent with MS behaviour.
29155
29156         * image.c image.h reflection.c: add newly created classes to the name 
29157         cache so mono_class_get () will find them.      
29158
29159 2003-01-27  Zoltan Varga  <vargaz@freemail.hu>
29160
29161         First part of changes to get IKVM.NET running under mono.
29162         
29163         * appdomain.h, appdomain.c: added new function 
29164         mono_domain_try_type_resolve() which will emit TypeResolve events. 
29165         This function will call AppDomain::DoTypeResolve to do the actual work.
29166
29167         * class.h, class.c, loader.c, object.c, reflection.h, reflection.c: 
29168         moved existing code dealing with dynamic tokens to a new function 
29169         called mono_reflection_lookup_dynamic_token (). This function will 
29170         raise TypeResolve events when appropriate. Since reflection.c is not 
29171         part of libmetadata, a new hook function called 
29172         mono_lookup_dynamic_token() is added to class.c which will call this.
29173
29174         * assembly.h assembly.c: make the invoke_load_hook function public,
29175         so it can be called for dynamic assemblies.
29176
29177         * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
29178
29179         * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the 
29180         type isn't found.
29181
29182         * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a 
29183         MonoGHashTable, since it contains pointers to objects which the GC 
29184         needs to track.
29185
29186         * assembly.c (search_loaded): remove unused variable.
29187         
29188 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
29189
29190         * object.c: fixed issue exposed by gcc-generated IL programs
29191         that use RVA data for pointers.
29192
29193 2003-01-25  Martin Baulig  <martin@ximian.com>
29194
29195         * threads.c (start_wrapper): Moved the initialization of
29196         `start_func' above the mono_new_thread_init() call to which we
29197         pass it as argument.
29198
29199 2003-01-24  Martin Baulig  <martin@ximian.com>
29200
29201         * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
29202         the MonoThread pointer.
29203
29204 2003-01-21  Miguel de Icaza  <miguel@ximian.com>
29205
29206         * icall.c: Rename `PowImpl' to Pow.
29207
29208 2003-01-23  Dick Porter  <dick@ximian.com>
29209
29210         * threads.c (start_wrapper): Create a Thread object if needed, so
29211         the Main() thread can do the class initialisation in a subthread
29212         that has been set up to allow managed code execution.
29213
29214         Pass the thread ID instead of the MonoThread pointer to the thread
29215         start and attach callbacks.  This change is required, because the
29216         jit thread start callback must be called _before_ the Thread
29217         object can be created.
29218         
29219         (mono_thread_init): Removed much object creation code that is no
29220         longer needed.  No managed code is called from here now.
29221
29222         * object.c (mono_runtime_exec_managed_code): Create a subthread
29223         for Main, and call back to the runtime to use it.
29224         Set the exit code when Main exits.
29225
29226         * gc.c: Make sure domain finalisation happens in a subthread.
29227         Re-enable threaded GC, fixing bug 31333 (again).
29228
29229         * environment.c: System.Environment internall calls (so far just
29230         ExitCode is here, the others are still in icall.c)
29231
29232         * appdomain.c (mono_runtime_cleanup): All threads running managed
29233         code should have finished before mono_runtime_cleanup() is
29234         reached, so no need to clean up threads.
29235
29236 2003-01-22  Martin Baulig  <martin@ximian.com>
29237
29238         * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
29239         `gpointer func' arguments.      
29240         (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
29241         but added `MonoThread *thread' argument.
29242         (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
29243
29244         * threads.c (mono_new_thread_init): Added `gpointer func' argument
29245         and pass it to the mono_thread_start_cb callback.
29246         (mono_install_thread_callbacks): New public function to install a
29247         set of callbacks which are set by the debugger.
29248         (mono_thread_init): The last argument is now a MonoThreadAttachCB.
29249
29250 2003-01-22  Martin Baulig  <martin@ximian.com>
29251
29252         * Makefile.am: Install debug-mono-symfile.h.
29253
29254 2003-01-21  Aleksey Demakov <avd@openlinksw.com>
29255
29256         * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
29257
29258 2003-01-21  Dietmar Maurer  <dietmar@ximian.com>
29259
29260         * added the following fix from Jackson Harper <jackson@latitudegeo.com>
29261         * class.c (mono_ptr_class_get): correctly set access levels of pointers
29262         (mono_array_class_get): correctly set access levels of arrays
29263
29264 2003-01-20      Patrik Torstensson
29265         * image.h (MonoAssemblyName): changed major, minor, build, revision
29266         from signed to unsigned.
29267
29268 2003-01-20  sean kasun <skasun@azstarnet.com>
29269
29270         * reflection.c (load_cattr_value): Now this handles
29271         MONO_TYPE_SZARRAY.  Fixes bug #35629
29272
29273 2003-01-20  Miguel de Icaza  <miguel@ximian.com>
29274
29275         * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
29276         integer value
29277
29278 2003-01-18  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29279
29280         * decimal.c: fixed bug #26056.
29281
29282 2003-01-17  Martin Baulig  <martin@ximian.com>
29283
29284         * gc.c: Raise an ExecutionEngineException instead of using g_error().
29285
29286 2003-01-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29287
29288         * exception.[ch]:
29289         (mono_get_exception_type_initialization): new function.
29290
29291         * object.c: throw a TypeInitializationException when an exception is
29292         thrown invoking the class constructor.
29293
29294 2003-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29295
29296         * reflection.c: fixed attribute reading.
29297
29298 2003-01-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29299
29300         * icall.c:
29301         (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
29302         provided, look for the type in the calling assembly and then in
29303         mscorlib; if the assembly name is provided, only try that one.
29304
29305 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
29306
29307         * object.c: register the vtable before there is a chance it's
29308         queried again recursively.
29309
29310 2003-01-13  Duncan Mak  <duncan@ximian.com>
29311
29312         * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
29313         gc-internal.h. 
29314         
29315 2003-01-12  Patrik Torstensson <totte@race-x-change.com>
29316
29317         * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
29318
29319 2003-01-11  Martin Baulig  <martin@ximian.com>
29320
29321         * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
29322         this to 20 for the release.
29323
29324 2003-01-10  Dietmar Maurer  <dietmar@ximian.com>
29325
29326         * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
29327
29328         * loader.c (mono_method_get_marshal_info): bug fix
29329
29330         * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
29331         structures with explicit layout
29332
29333 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29334
29335         * profiler.c: made the output more readable (and sorted). 
29336         Added caller information for the allocation profiler.
29337
29338 2003-01-09  Sebastien Pouliot  <spouliot@videotron.ca>
29339
29340         * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
29341
29342 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29343
29344         * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
29345         to get value types.
29346         
29347 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
29348
29349         * object.c, profiler.h, profiler.c, profiler-private.h:
29350         Added object allocation profiler.
29351
29352 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
29353
29354         * reflection.h, reflection.c: handle global methods.
29355         Compress blob entries.
29356
29357 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
29358
29359         * marshal.c: fix compilation.
29360
29361 2003-01-09  Dietmar Maurer  <dietmar@ximian.com>
29362
29363         * loader.c (mono_method_get_marshal_info): impl.
29364
29365         * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
29366
29367 2003-01-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29368
29369         * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
29370         for reference types.
29371
29372 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
29373
29374         * loader.c: fixed off by one error in loaded parameter names.
29375
29376 2003-01-08  Dietmar Maurer  <dietmar@ximian.com>
29377
29378         * marshal.c (mono_marshal_get_icall_wrapper): like
29379         mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
29380         instead of a MonoMethod.
29381
29382 2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29383
29384         * decimal.c: fixed bug #36537.
29385
29386 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
29387
29388         * marshal.c: throw a missing method exception if a
29389         P/Invoke method is not found.
29390
29391 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
29392
29393         * icall.c: allow a null this for constructors.
29394
29395 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
29396
29397         * icall.c: raise the proper exceptions if the arguments to the
29398         internal Invoke are incorrect.
29399
29400 2003-01-03  Dietmar Maurer  <dietmar@ximian.com>
29401
29402         * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
29403
29404 2003-01-03  Martin Baulig  <martin@ximian.com>
29405
29406         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29407
29408 2002-12-31  Martin Baulig  <martin@ximian.com>
29409
29410         * debug-mono-symfile.c: Completely rewrote the type section.
29411         Instead of using individual malloc()ed fields, we use one big
29412         continuous memory area and offsets into this area.
29413         See the comments in the source code for details.
29414
29415 2002-12-30  Martin Baulig  <martin@ximian.com>
29416
29417         * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
29418
29419 2002-12-30  Martin Baulig  <martin@ximian.com>
29420
29421         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
29422         line number table in this data blob instead of using an external
29423         pointer.
29424
29425 2002-12-28  Martin Baulig  <martin@ximian.com>
29426
29427         * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
29428
29429 2002-12-22  Rachel Hestilow  <hestilow@ximian.com>
29430
29431         * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
29432         as a boxed return type.
29433
29434 2002-12-21  Miguel de Icaza  <miguel@ximian.com>
29435
29436         * appdomain.c
29437         (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
29438         g_build_filename to properly get separators on the filename created.
29439
29440         * object.h: Small change, introduce MonoMarshalByRefObject to
29441         track the layout of that structure in the C# universe as we make
29442         changes there.
29443
29444 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
29445
29446         * object.c: removed assert to allow static fields on interfaces.
29447         * loader.c: a TypeSpec may be used for any type, not just arrays.
29448
29449 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
29450
29451         * class.c, class.h: added mono_class_array_element_size ().
29452         Ignore static methods in interfaces.
29453
29454 2002-12-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29455
29456         * threads.c: fixed the build under cygwin.
29457
29458 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
29459
29460         * reflection.c: handle nullref constants. Allocate keys for
29461         reflection handles with the GC.
29462
29463 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29464
29465         * threads.c, threads.h: added mono_thread_get_abort_signal()
29466         to get a suitable signal for thread abort.
29467
29468 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
29469
29470         * metadata.c: fix handling of ExportedType table.
29471
29472 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29473
29474         * icall.c: added WriteWindowsDebugString internal call.
29475
29476 2002-12-15  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29477
29478         * reflection.h: added fields to match C# implementation.
29479
29480 2002-12-14  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29481
29482         * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
29483
29484 2002-12-12  Juli Mallett  <jmallett@FreeBSD.org>
29485
29486         * gc.h, gc-internal.h: Rename header for GC internal calls to
29487         gc-internal.h from gc.h as to not clash with Boehm GC having its
29488         header installed as <gc.h> in outside include paths.
29489         * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
29490         * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
29491
29492 2002-12-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29493
29494         * icall.c: assign minor, build and revision in FillName.
29495
29496 2002-12-11  Zoltan Varga  <vargaz@freemail.hu>
29497
29498         * image.h reflection.h reflection.c class.h class.c loader.c object.c:
29499         Added support for running code generated by Reflection.Emit.
29500
29501 2002-12-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29502
29503         * appdomain.c: check for NULL argument in LoadFrom.
29504
29505 2002-12-10  Dick Porter  <dick@ximian.com>
29506
29507         * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
29508
29509 2002-12-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29510
29511         * appdomain.c: fix buglet when building exe file name.  Handle full
29512         assembly name (needed after latest changes to AssemblyName).
29513         * image.c:
29514         (mono_image_close): free some hashtables.
29515
29516 2002-12-05  Dietmar Maurer  <dietmar@ximian.com>
29517
29518         * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN 
29519         instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation 
29520         on some systems (redhat 7.3) 
29521
29522 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
29523
29524         * threads.c: delete the critical section of a sync block,
29525         spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
29526
29527 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
29528
29529         * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
29530
29531 2002-12-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29532
29533         * appdomain.[ch]: handle the assembly preload event to try loading the
29534         assemblies using the paths we have in the current domain.
29535
29536         * assembly.[ch]: created an assembly preload hook that is called to try
29537         loading the assembly by other means that the ones provided here.
29538
29539         * domain.c: initialize the domain search path.
29540
29541         From now on, assemblies (TODO: except corlib and System) are loaded
29542         according to these rules when using mono_assembly_load ():
29543
29544                 1. It tries to load the assembly from the ApplicationBase
29545                 of the current domain appending .dll and .exe (TODO: have to
29546                 try loading from name/name.dll and name/name.exe).
29547
29548                 2. It tries the search path specified in PrivateBinPath for the
29549                 current domain (if any).
29550
29551                 3. Previous behavior.
29552
29553 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
29554
29555         * icall.c: implemented GetInterfaceMap() related icall.
29556         * domain.c, loader.h: load MethodInfo in mono_defaults.
29557
29558 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
29559
29560         * gc.c: disable the finalizer thread for now, untill all the issues
29561         with it are resolved.
29562
29563 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
29564
29565         * string-icalls.c: handle embedded nulls in string ctor when the
29566         length is specified.
29567
29568 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
29569
29570         * class.c: look for explicit interface implementation in parent
29571         classes, too.
29572
29573 2002-12-03  Dietmar Maurer  <dietmar@ximian.com>
29574
29575         * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3) 
29576
29577 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
29578
29579         * gc.c: protect handles with a critical section.
29580
29581 2002-12-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29582
29583         * icall.c:
29584         (ves_icall_type_from_name): it now has throwOnError and ignoreCase
29585         parameters. If no assembly specified, try getting the type from all
29586         the assemblies in the current domain, else, load the assembly and get
29587         the type from it.
29588
29589 2002-11-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29590
29591         * marshal.c: applied patch from Aleksey Demakov that fixes
29592         ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
29593
29594 2002-11-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29595
29596         * icall.c: fixed get_location.
29597
29598 2002-11-28  Dietmar Maurer  <dietmar@ximian.com>
29599
29600         * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
29601         declarations to make it work with older gcc. 
29602
29603         * loader.c (mono_get_method): set signature->pinvoke for native calls
29604
29605 2002-11-20  Dick Porter  <dick@ximian.com>
29606
29607         * threads.c (mono_thread_init): Set the main thread's handle
29608
29609 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
29610
29611         * gc.c: allow compilation without GC support. Changed to match the
29612         mono coding style.
29613
29614 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
29615
29616         * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
29617
29618 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
29619
29620         * reflection.c: set a public key token on the core assemblies.
29621
29622 2002-11-18  Dick Porter  <dick@ximian.com>
29623
29624         * threads.c: Split out some thread initialisation so that other
29625         files can set the start callback function.
29626
29627         * gc.c: Run finalisers in a separate thread, to avoid stack
29628         overflow.  Fixes bug 31333.
29629
29630         * appdomain.c: Set up GC finalisation thread.
29631
29632         * reflection.c: 
29633         * object.c: 
29634         * domain.c: Use gc.h macros for GC_malloc
29635         
29636 2002-11-15  Dick Porter  <dick@ximian.com>
29637
29638         * threadpool.c: 
29639         * threads.c:
29640         * appdomain.c: Removed mono_runtime_init_with_attach(),
29641         mono_thread_create_arg(), and mono_thread_init_with_attach(), by
29642         merging the extra parameter with the existing function.  Removed
29643         unneeded code in mono_thread_attach().
29644
29645 2002-11-14  Dietmar Maurer  <dietmar@ximian.com>
29646
29647         * image.c (mono_image_loaded_by_guid): a method to get loaded
29648         images by guid. 
29649         (load_metadata_ptrs): we store the guid as string.
29650
29651 2002-11-11  Dietmar Maurer  <dietmar@ximian.com>
29652
29653         * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
29654
29655         * metadata.c (mono_guid_to_string): imported method form Zoltan
29656         Varga (slightly modified)
29657
29658         * assembly.c (mono_assembly_open): load precompiled code
29659
29660         * loader.h (MonoMethod): we store the method token for use in the
29661         aot compiler. 
29662
29663 2002-11-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29664
29665         * appdomain.c: insert the loaded assemblies in the domain->assemblies in
29666         the hook function called when an assembly is loaded.
29667         
29668         * domain.c: Modified file.
29669         (mono_domain_assembly_load): removed hash table insertion of assemblies.
29670
29671         Fixes bug #33196.
29672
29673 2002-11-07  Miguel de Icaza  <miguel@ximian.com>
29674
29675         * reflection.c: Map PEFileKind to the value expected by the WinNT
29676         image loader. 
29677
29678 2002-11-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29679
29680         * rand.c: use /dev/urandom. If it fails to open, use the previous one.
29681         Read until the buffer is filled completely.
29682
29683 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29684
29685         * icall.c: implemented MonoType.InternalGetEvent ().
29686
29687 2002-11-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29688
29689         * appdomain.c: implemented InitAppDomainSetup. Delayed
29690         AppDomain.SetupInformation until mono_runtime_exec_main, where we get
29691         the entry_assembly.
29692
29693         * assembly.c: base_dir is now an absolute path ending with
29694         G_DIR_SEPARATOR.
29695
29696         * icall.c: modified get_location according to the above changes.
29697
29698         * object.c: init AppDomain.SetupInformation for the default domain after
29699         we have the entry assembly.
29700
29701         * domain.c: when unloading a domain, setup = NULL.
29702
29703 2002-11-04  Dietmar Maurer  <dietmar@ximian.com>
29704
29705         * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
29706
29707 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
29708
29709         * object.h, object.c: introduced mono_object_get_virtual_method ()
29710         to lookup the method invoked on an object when a callvirt is done on
29711         a method.
29712         * icall.c: make MethodInfo::Invoke() always do a virtual call.
29713
29714 2002-11-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29715
29716         * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
29717         current domain when loaded an assembly and failed to load it.
29718
29719         * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
29720
29721 2002-10-31  Dick Porter  <dick@ximian.com>
29722
29723         * icall.c: 
29724         * file-io.h: 
29725         * file-io.c: Return the error status in a parameter, as the
29726         GetLastError() value has long since been blown away if we try and
29727         look it up in a subsequent internal call invocation.  Delete the
29728         GetLastError() internal call, because it's useless.
29729
29730 2002-10-31  Dietmar Maurer  <dietmar@ximian.com>
29731
29732         * class.[ch]: added cast_class to fix bug 29517
29733
29734 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
29735
29736         * marshal.c: create valid IL code in the filter clause:
29737         the new JIT is less forgiving:-)
29738
29739 2002-10-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29740
29741         * icall.c: removed get_property internal call.
29742
29743 2002-10-25  Zoltan Varga  <vargaz@freemail.hu>
29744
29745         * appdomain.h domain.c: Added an ID to appdomains.
29746         
29747         * threads.c threads.h icall.c: Implement icall
29748         Thread:GetDomainID(), and remove unused icall 
29749         CurrentThreadDomain_internal.
29750
29751 2002-10-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29752
29753         * icall.c: Don't recurse through the base types in GetConstructor.
29754         Fixes bug #32063. 
29755
29756 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
29757
29758         * mempool.h, mempool.c: added mono_mempool_empty() and
29759         mono_mempool_stats().
29760
29761 2002-10-23  Dick Porter  <dick@ximian.com>
29762
29763         * file-io.c: 
29764         * file-io.h: 
29765         * icall.c: Added MonoIO.GetFileType internal call
29766
29767 2002-10-17  Dick Porter  <dick@ximian.com>
29768
29769         * appdomain.c (mono_runtime_cleanup): Don't signal the async
29770         delegate semaphore before waiting for all threads to finish,
29771         because new threads can also call async delegates.  Fixes bug
29772         32004.
29773
29774         * threadpool.c (async_invoke_thread): Only wait for 500ms instead
29775         of 3 seconds, in case another async job is queued.  (This part is
29776         needed because the bug fix reintroduced the 3s exit lag.)  This
29777         makes the mono_runtime_shutdown flag superfluous.
29778
29779 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
29780
29781         * reflection.c: include ehader size in method section headers.
29782         Really check for suplicated modules entries.
29783
29784 2002-10-17  Martin Baulig  <martin@gnome.org>
29785
29786         * debug-mono-symfile.c: Added back support for locals.
29787
29788 2002-10-14  Martin Baulig  <martin@gnome.org>
29789
29790         * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
29791         MONO_TYPE_VOID.
29792
29793 2002-10-14  Martin Baulig  <martin@gnome.org>
29794
29795         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
29796         mono_class_get() instead of looking in the class cache. 
29797
29798 2002-10-13  Martin Baulig  <martin@gnome.org>
29799
29800         * debug-mono-symfile.c: Set version number to 28, include the
29801         signature in method names.
29802
29803 2002-10-13  Martin Baulig  <martin@gnome.org>
29804
29805         * debug-mono-symfile.h: Set version number to 27.
29806
29807 2002-10-11  Martin Baulig  <martin@gnome.org>
29808
29809         * gc.c: Don't register/unregister NULL pointers as disappearing links.
29810
29811 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
29812
29813         * metadata.c, metadata.h: added helper function to allocate signatures.
29814
29815 2002-10-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29816
29817         * icall.c: added internal call to get the location of machine.config.
29818
29819 2002-10-08  Martin Baulig  <martin@gnome.org>
29820
29821         * debug-mono-symfile.c: Ignore classes with a pending init for the
29822         moment.
29823
29824 2002-10-03  Dick Porter  <dick@ximian.com>
29825
29826         * threads.c: Freebsd pthread_t is a pointer
29827
29828 2002-10-03  Dick Porter  <dick@ximian.com>
29829
29830         * socket-io.c: Implemented GetHostName_internal
29831
29832 2002-10-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29833
29834         * mono-config.c:
29835         (mono_config_parse_file): don't leak the text.
29836
29837 2002-10-02  Martin Baulig  <martin@gnome.org>
29838
29839         * debug-mono-symfile.c: Added support for methods.
29840
29841 2002-10-01  Martin Baulig  <martin@gnome.org>
29842
29843         * debug-mono-symfile.c: Don't emit methods and line numbers for
29844         the dynamic symbol file, just write the type table.  We can easily
29845         have an external helper program which creates a symbol file for an
29846         IL file.        
29847
29848 2002-10-01  Dick Porter  <dick@ximian.com>
29849
29850         * threads.c (ves_icall_System_Threading_Thread_Start_internal):
29851         Only add the handle to the cleanup array when we're about to
29852         launch the thread.  Bug 31425 deadlocked when the test was run on
29853         mono under w32.
29854
29855 2002-10-01  Martin Baulig  <martin@gnome.org>
29856
29857         * debug-mono-symfile.c: Added support for properties.
29858
29859 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
29860
29861         * reflection.c: unaligned store fix from Mark Crichton
29862         <crichton@gimp.org>.
29863
29864 2002-09-27  Martin Baulig  <martin@gnome.org>
29865
29866         * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
29867         New interncall.
29868
29869 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
29870
29871         * assembly.h, assembly.c: use a sane API to hook into the assembly
29872         loading process instead of a useless special-purpouse hack
29873         (ngen needs a hook, too, for example).
29874
29875 2002-09-27  Dick Porter  <dick@ximian.com>
29876
29877         * threads.c (mono_thread_init): Call GetCurrentProcess() so
29878         io-layer can set up some process handle info.  Not needed on w32,
29879         but doesn't hurt either.
29880
29881         * process.c: Pass the program name in the second parameter to
29882         CreateProcess, so the path is searched.  Include the working
29883         directory. Implemented process name, process enumeration, and some
29884         process detail internal calls.
29885         
29886         * icall.c: Added internal calls for process lookup, and some
29887         process details
29888
29889 2002-09-26  Martin Baulig  <martin@gnome.org>
29890
29891         * assembly.c (mono_install_open_assembly_hook): New global
29892         function to install a function to be invoked each time a new
29893         assembly is loaded.
29894         (mono_assembly_open): Run this callback function if set.
29895
29896         * debug-mono-symfile.c: Put back line numbers for the dynamic
29897         symbol file and also record the .il file as source file.  This
29898         allows us to install the temporary symbol file as `file.dbg' just
29899         like a compiler-generated one.
29900
29901 2002-09-26  Nick Zigarovich <nick@chemlab.org>
29902
29903         * Corrected typo in gc.c (BOHEM vs BOEHM).
29904
29905 2002-09-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
29906
29907         * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
29908         GetProperties. Also avoid calling g_slist_length in GetProperties and
29909         GetMethods.
29910
29911 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
29912
29913         * reflection.c: avoid unaligned stores (bug spotted by
29914         Mark Crichton  <crichton@gimp.org>).
29915
29916 2002-09-25  Martin Baulig  <martin@gnome.org>
29917
29918         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
29919         instead of guint64 for addresses and added prologue/epilogue info.
29920
29921 2002-09-25  Martin Baulig  <martin@gnome.org>
29922
29923         * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
29924         store line number info.  For the dynamic symbol file, we only need
29925         to provide the JIT generated dynamic line number info for the dynamic
29926         symbol file.
29927
29928 2002-09-25  Martin Baulig  <martin@gnome.org>
29929
29930         * debug-mono-symfile.h: Incremented version number.
29931
29932 2002-09-24  Martin Baulig  <martin@gnome.org>
29933
29934         * class.c (mono_debugger_class_init_func): New global function
29935         pointer variable.
29936         (mono_class_init): If mono_debugger_class_init_func is non-NULL,
29937         call it.
29938
29939         * debug-mono-symfile.c (mono_debug_symfile_add_type): New
29940         function.  This is called via the mono_debugger_class_init_func
29941         hook to add all types to the dynamic type table.
29942         (ves_icall_MonoDebugger_GetType): New interncall to get a class
29943         from its metadata token.
29944
29945         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
29946         New interncall for the debugger.
29947
29948 2002-09-24  Nick Drochak <ndrochak@gol.com>
29949
29950         * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
29951         before using it in case it is null.
29952         
29953 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
29954
29955         * metadata.c: allow custom modifiers in local var signatures
29956         (bug spotted by Zoltan Varga).
29957
29958 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
29959
29960         * class.c: deal with the <Module> class that may have a NULL vtable.
29961         Eliminate warnings.
29962
29963 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
29964
29965         * image.c, image.h: more strong name helpers.
29966         * monosn.c: more work: convert pem keys to cryptoapi format.
29967
29968 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
29969
29970         * string-icalls.c: speedup IndexOf.
29971
29972 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
29973
29974         * icall.c: updates from Zoltan.2.Varga@nokia.com.
29975
29976 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
29977
29978         * icall.c: cleanup: use mono_object_domain ().
29979
29980 2002-09-23  Martin Baulig  <martin@gnome.org>
29981
29982         * debug-mono-symfile.c: Improved type support.
29983
29984 2002-09-22  Martin Baulig  <martin@gnome.org>
29985
29986         * debug-mono-symfile.c: Added support for reference types and strings.
29987
29988 2002-09-22  Martin Baulig  <martin@gnome.org>
29989
29990         * debug-mono-symfile.c: Started to work on the type table.
29991
29992 2002-09-21  Martin Baulig  <martin@gnome.org>
29993
29994         * debug-mono-symfile.c: Largely reworked the symbol table format.
29995         The symbol table is now incrementally updated each time a new
29996         method is added.  We're now also using our own magic and version
29997         so that you don't need to recompile all your classes if the
29998         dynamic table changes.
29999         (mono_debug_update_mono_symbol_file): Removed.
30000         (mono_debug_symfile_add_method): New function to add a method.
30001
30002 2002-09-21  Martin Baulig  <martin@gnome.org>
30003
30004         * icall.c
30005         ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
30006         New interncall.
30007
30008         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
30009         New interncall to get a method from its metadata token.
30010
30011 2002-09-21  Martin Baulig  <martin@gnome.org>
30012
30013         * debug-mono-symfile.c: Create type table.
30014
30015 2002-09-20  Martin Baulig  <martin@gnome.org>
30016
30017         * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
30018
30019 2002-09-20  Martin Baulig  <martin@gnome.org>
30020
30021         * debug-mono-symfile.c: Provide information about params and locals.
30022
30023 2002-09-20  Martin Baulig  <martin@gnome.org>
30024
30025         * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
30026         New interncall.
30027
30028         * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
30029         interncall to get a method from its metadata token.
30030
30031 2002-09-20  Martin Baulig  <martin@gnome.org>
30032
30033         * debug-mono-symfile.c: Added a few checks for method->header
30034         being non-NULL.  This should never happen, but for the moment
30035         let's use a g_warning() rather than a g_assert().
30036
30037 2002-09-19  Mark Crichton  <crichton@gimp.org>
30038
30039         * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
30040         even if support for it isn't present.  Added an #ifdef to fix this.
30041
30042         * socket-io.c: Added checks back for Solaris support.
30043
30044 2002-09-19  Martin Baulig  <martin@gnome.org>
30045
30046         * debug-mono-symfile.c (read_string, write_string): Reflect latest
30047         changes in the symbol file format.
30048
30049 2002-09-18  Martin Baulig  <martin@gnome.org>
30050
30051         * debug-mono-symfile.c: Set version number to 21.
30052
30053 2002-09-18  Dick Porter  <dick@ximian.com>
30054
30055         * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
30056         on netbsd.  Fixes bug 30051.
30057
30058 2002-09-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30059
30060         * reflection.c:
30061         (set_version_from_string): little fix.
30062
30063 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30064
30065         * monosn.c, Makefile.am: added strong name utility.
30066         * reflection.h, reflection.c: implemented delayed signing,
30067         locale, version and hash id assembly attributes.
30068
30069 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30070
30071         * loader.c, metadata.c: load param attributes in signatures.
30072
30073 2002-09-16  Martin Baulig  <martin@gnome.org>
30074
30075         * debug-mono-symfile.c: Added string table with all method names.
30076
30077 2002-09-14  Martin Baulig  <martin@gnome.org>
30078
30079         * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
30080         fast method lookup.
30081
30082 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30083
30084         * reflection.c: record the public key token of referenced assemblies.
30085
30086 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30087
30088         * image.c, image.h: added functions to get the strong name and the
30089         public key of an assembly.
30090         * pedump.c: use them.
30091
30092 2002-09-12  Dietmar Maurer  <dietmar@ximian.com>
30093
30094         * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
30095
30096 2002-09-12  Miguel de Icaza  <miguel@ximian.com>
30097
30098         * marshal.c (mono_marshal_get_managed_wrapper): Added
30099         MONO_TYPE_BOOLEAN 
30100
30101 2002-09-11  Martin Baulig  <martin@gnome.org>
30102
30103         * gc.c: Call GC_unregister_disappearing_link() on all links when
30104         finalizing them, this is necessary to aviod a crash in boehm's
30105         finalize handler.
30106
30107 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30108
30109         * gc.c: handle GetTarget for finalized objects spotted and fixed by
30110         nick@chemlab.org.
30111
30112 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
30113
30114         * icall.c: implemented MonoType::Module.
30115         * reflection.c, reflection.h: mono_module_get_object () from
30116         Tomi Pakarinen <tomi.pakarinen@welho.com>.
30117
30118 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
30119
30120         * icall.c: ignore overridden methods in GetMethods ().
30121         Fix for FieldInfo::SetValue().
30122         * object.c: handle float/double in runtime invoke.
30123
30124 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
30125
30126         * object.c: allow a constructor to be called again on an object.
30127
30128 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30129
30130         * class.h, class.c: move field layout code to it's own function and
30131         export it. Get an interface id earlier. Move fields in MonoClass
30132         so they are more cache friendly and align the bitfields.
30133         * loader.c: temporary handle get_param_names() for a runtime method.
30134         * reflection.c, reflection.h: more code to handle runtime creation of
30135         types.
30136
30137 2002-09-09  Martin Baulig  <martin@gnome.org>
30138
30139         * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
30140         signature with the pinvoke field being set for the actual call.
30141
30142 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30143
30144         * icall.c: removed some unused icalls. Start of map of glib charsets
30145         to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
30146
30147 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30148
30149         * debug-helpers.c: break infinite loop (found and fixed by
30150         Holger Arnold <harnold@gmx.de>).
30151
30152 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
30153
30154         * icall.c: target may be null in create_delegate.
30155
30156 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30157
30158         * marshal.c: handle a boolean return type.
30159
30160 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
30161
30162         * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
30163
30164 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30165
30166         * gc.c: fix weakreferences.
30167
30168 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
30169
30170         * icall.c: added icall to get default codepage.
30171
30172 2002-09-03  Dick Porter  <dick@ximian.com>
30173
30174         * threads.h: 
30175         * threads.c: Use MonoThread instead of MonoObject where
30176         apropriate.
30177
30178         Store running thread objects in a hash table, so that we have all
30179         the info to hand when waiting for them to finish
30180         (means we don't need OpenThread() any more, so mingw builds should
30181         be fully functional again.)
30182
30183         * verify.c:
30184         * object.h: Added thread ID to MonoThread
30185
30186 2002-09-03  Martin Baulig  <martin@gnome.org>
30187
30188         * icall.c (System.Reflection.Assembly::get_location): New interncall.
30189
30190 2002-09-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30191
30192         * icall.c: fixed leak in get_temp_path. Thanks lupus.
30193
30194 2002-09-03  Martin Baulig  <martin@gnome.org>
30195
30196         * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
30197         argument to store the end address of the disassembled instruction.
30198
30199         * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
30200         here from debug-symfile.h.
30201         (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
30202         JIT into this struct.
30203         (MonoSymbolFile): Added `char *image_file' field.
30204         (MonoDebugGetMethodFunc): Removed.
30205         (mono_debug_update_mono_symbol_file): Removed the hash table argument.
30206         (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
30207         (mono_debug_find_method): New method.
30208
30209         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
30210         create a full symbol file.
30211         (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
30212         and static symbol files.
30213         (mono_debug_find_method): The symbol file keeps an internal method hash,
30214         call this to get a MonoDebugMethodInfo from a MonoMethod.
30215
30216         * debug-symfile.[ch]: Removed.
30217
30218 2002-08-29  Miguel de Icaza  <miguel@ximian.com>
30219
30220         * image.c (do_mono_image_open): Remove linker version check.
30221
30222 2002-08-29  Dietmar Maurer  <dietmar@ximian.com>
30223
30224         * marshal.c (mono_marshal_get_managed_wrapper): don't cache
30225         wrappers for instance methods.
30226         
30227 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30228
30229         * icall.c: added ves_icall_System_IO_Path_get_temp_path.
30230
30231 2002-08-28  Dick Porter  <dick@ximian.com>
30232
30233         * Makefile.am: Export HOST_CC for w32 builds
30234
30235 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
30236
30237         * file-io.c process.c: MonoString are null terminated, no
30238         need for mono_string_to_utf16() anymore.
30239
30240 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30241
30242         * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
30243
30244 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
30245
30246         * icall.c, reflection.h: speedup System.MonoType.
30247
30248 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
30249
30250         * reflection.c: allow null as the value of a string argument in
30251         custom attributes constructors.
30252
30253 2002-08-27  Martin Baulig  <martin@gnome.org>
30254
30255         * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
30256         `trampoline_address' field.
30257
30258 2002-08-27  Dietmar Maurer  <dietmar@ximian.com>
30259
30260         * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
30261         check (fixes bug #29486) 
30262
30263 2002-08-27  Martin Baulig  <martin@gnome.org>
30264
30265         * debug-mono-symfile.c: Changed the file format in a way that allows us
30266         open it read-only and to use a specially malloced area for all the
30267         dynamic data.  We can now also generate a symbol file on-the-fly if we're
30268         debugging IL code and there is no MCS generated symbol file for it.
30269
30270 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
30271
30272         * object.c: added a define for a good string and array
30273         creation speedup (not enabled by default because we need to deal with
30274         the synch stuff).
30275
30276 2002-08-26  Martin Baulig  <martin@gnome.org>
30277
30278         * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
30279         function to create a dynamic symbol file.  This is used by the
30280         debugger to create a symbol file for IL code on-the-fly.
30281
30282 2002-08-26  Martin Baulig  <martin@gnome.org>
30283
30284         * loader.c (mono_lookup_pinvoke_call): Include the error message
30285         from g_module_error() in the error message.
30286
30287 2002-08-24  Martin Baulig  <martin@gnome.org>
30288
30289         * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
30290         function to update the symbol file.  The symbol file is mmap()ed
30291         writable, but private.  This allows us to install the symbol file
30292         together with the assembly.
30293
30294 2002-08-24  Martin Baulig  <martin@gnome.org>
30295
30296         * debug-mono-symfile.[ch]: New files.  Similar to debug-symfile.[ch]
30297         but they can read the new symbol file format which mcs is now creating.
30298
30299         * debug-symfile.c (mono_debug_find_source_location): Moved to
30300         debug-mono-symfile.c; this is now operating on the new symbol file.
30301
30302 2002-08-23  Martin Baulig  <martin@gnome.org>
30303
30304         * debug-helpers.c (mono_method_desc_from_method): New function to get
30305         a MonoMethodDesc from a MonoMethod.
30306
30307 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
30308
30309         * object.c: fixes assertion failure caused by multiple ExecuteAssembly
30310         calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
30311
30312 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
30313
30314         * string-icalls.[ch]: make helper methods static.
30315
30316 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30317
30318         * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
30319         types to it and to SetValueInternal.
30320
30321         * object.c: Moved handle_enum label to its proper place. This was the
30322         f... bug! ;-)
30323
30324         This time i compiled mcs and gtk-sharp and they both work.
30325
30326 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30327
30328         * icall.c: reverted partially my previous patch until 
30329         object.c:set_value handles enums correcly.
30330
30331 2002-08-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30332
30333         * icall.c:
30334         (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
30335         (ves_icall_System_Environment_get_MachineName): removed warning when
30336         compiling under cygwin.
30337
30338 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
30339
30340         * object.c: fixed field_get_value() for reference types.
30341
30342 2002-08-22  Dick Porter  <dick@ximian.com>
30343
30344         * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
30345         Don't free a buffer while it's still needed.  Patch from Jonathan
30346         Liger <Jonathan.liger@wanadoo.fr>
30347
30348 2002-08-21  Miguel de Icaza  <miguel@ximian.com>
30349
30350         * icall.c (ves_icall_System_Environment_get_Platform): Add new
30351         internal call.
30352
30353 2002-08-21  Dietmar Maurer  <dietmar@ximian.com>
30354
30355         * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
30356         (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
30357
30358         * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
30359         we call unmanaged code which throws exceptions.
30360
30361 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30362
30363         * appdomain.h: added per-domain entry_assembly.
30364         * appdomain.c: ensure mono_runtime_exec_main () gets non-null
30365         arguments.
30366         * icall.c: Assembly::GetEntryAssembly icall.
30367         * object.c: set domain->entry_assembly in mono_runtime_exec_main().
30368         Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
30369
30370 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30371
30372         * appdomain.h, gc.c: added mono_domain_finalize ().
30373
30374 2002-08-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30375
30376         * object.c:
30377         (mono_print_unhandled_exception): changed g_warning by g_printerr
30378         because g_log has a 1024 characters limit (yeah, i got a big stack
30379         trace). Don't print exception name, that should be in ToString 
30380         returned string.
30381
30382 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30383
30384         * icall.c: added ves_icall_FieldInfo_SetValueInternal.
30385         * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
30386
30387 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30388
30389         * object.c:
30390         (mono_print_unhandled_exception): after previous commit, i realized
30391         that MS calls ToString on the exception. I changed this function to
30392         do that. This way we get stack_trace for free.
30393
30394 2002-08-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30395
30396         * object.c:
30397         (mono_print_unhandled_exception): invoke Message property instead of
30398         getting 'message' field from Exception. Don't allocate memory for
30399         'trace' and 'message' if not needed.
30400
30401 2002-08-18  Dick Porter  <dick@ximian.com>
30402
30403         * unicode.c: Fix asserts to match Encoder.cs checks
30404
30405 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30406
30407         * marshal.c: fix unaligned store issue and a few wrong
30408         opcode argument types.
30409
30410 2002-08-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30411
30412         * icall.c: added GetUninitializedObjectInternal internal call.
30413
30414 2002-08-16  Dietmar Maurer  <dietmar@ximian.com>
30415
30416         * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
30417         to the right domain.
30418
30419 2002-08-14  Dietmar Maurer  <dietmar@ximian.com>
30420
30421         * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
30422
30423         * class.c (class_compute_field_layout): set blittable to false for Strings
30424
30425         * appdomain.c (mono_domain_transfer_object): added support for ISerializable
30426
30427 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30428
30429         * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
30430         first chunk of code to create types at runtime. Code to
30431         handle ReflectedType/DeclaringType. Make reflection handles
30432         domain specific.
30433
30434 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
30435
30436         * class.c: set correct name in arrays.
30437
30438 2002-08-13  Dietmar Maurer  <dietmar@ximian.com>
30439
30440         * appdomain.c (mono_domain_transfer_object): make it work with
30441         valuetypes. bug fixes.
30442
30443 2002-08-12  Dick Porter  <dick@ximian.com>
30444
30445         * object.h: Rename some parameters to avoid c++ keywords (Patch
30446         from Joseph Wenninger <kde@jowenn.at>)
30447
30448 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
30449
30450         * icall.c: added icall to implement Assembly.GetFile*.
30451
30452 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30453
30454         * reflection.h, reflection.c: code to embed managed resources.
30455
30456 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
30457
30458         * class.c: move all the type size stuff into
30459         class_compute_field_layout().
30460
30461 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
30462
30463         * class.c: ensure enums have always the correct instance size.
30464         * unicode.c: remove wrong assert.
30465
30466 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
30467
30468         * assembly.c: fix mem corruption issue.
30469         * image.h, image.c: added mono_image_get_resource () to access
30470         managed resources.
30471         * icall.c: implemented Assembly.EntryPoint property and some
30472         Managed Resources related internalcalls.
30473
30474
30475 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30476
30477         * image.c, image.h: impemented mono_image_get_entry_point ().
30478         * appdomain.c: use mono_image_get_entry_point.
30479
30480 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30481
30482         * reflection.c: support the object type argument when loading
30483         custom attributes.
30484
30485 2002-08-05  Dietmar Maurer  <dietmar@ximian.com>
30486
30487         * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
30488         String as return type.
30489
30490 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
30491
30492         * reflection.c: fix encoding of named args for custom attrs to match
30493         the ms implementation. Read them back when instantiating custom
30494         attributes.
30495
30496 2002-08-02  Radek Doulik  <rodo@ximian.com>
30497
30498         * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
30499         by Dietmar as quick fix
30500         (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
30501         16 as stack size, used on more places as quick fix before Dietmar
30502         will fix it properly
30503
30504 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
30505
30506         * object.h, object.c: added accessors for fields and properties.
30507
30508 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
30509
30510         * class.c, class.h: made mono_class_get_field_from_name ()
30511         loop on parent types.
30512         Added mono_class_get_property_from_name ().
30513
30514 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
30515
30516         * class.c, class.h: move the code to setup the type vtable in its own
30517         function so that it can be reused also for types created at runtime.
30518         Eliminate the "class" identifier from the header file.
30519         * reflection.c: setup the vtable for enums so that we can create
30520         objects for use in SetConstant ().
30521
30522 2002-08-02  Dietmar Maurer  <dietmar@ximian.com>
30523
30524         * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
30525         instead of the delegate itself as this pointer (bug #28383)
30526
30527 2002-08-01  Dietmar Maurer  <dietmar@ximian.com>
30528
30529         * marshal.c (mono_marshal_get_managed_wrapper): added return type
30530         conversions.
30531
30532 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30533
30534         * loader.c: don't set the pinvoke bit on icalls.
30535
30536 2002-07-31  Dietmar Maurer  <dietmar@ximian.com>
30537
30538         * debug-helpers.c (mono_method_full_name): only print a number to
30539         indicate wrapper type (so that the output is more readable in traces).
30540
30541 2002-07-30  Dietmar Maurer  <dietmar@ximian.com>
30542
30543         * class.c (mono_class_init): include method override patch from Paolo
30544
30545 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
30546
30547         * icall.c: fixed GetTypeCode().
30548
30549 2002-07-29  Dietmar Maurer  <dietmar@ximian.com>
30550
30551         * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
30552         use real delegate invoke function to make it work with multicast
30553         delegates (fix bug# 28291).
30554
30555 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
30556
30557         * object.c: load constant strings.
30558
30559 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
30560
30561         * reflection.c: no magic numbers.
30562         * tabledefs.h: security action enum.
30563
30564 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
30565
30566         * assembly.c: fix possible memory corruption.
30567
30568 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
30569
30570         * reflection.h, reflection.c: added support for linking resources.
30571         * verify.c: check we have an updated corlib.
30572
30573 2002-07-25  Dietmar Maurer  <dietmar@ximian.com>
30574
30575         * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
30576         string arrays.
30577         (mono_marshal_string_array): null terminate unmanaged string arrays.
30578         (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
30579
30580 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
30581
30582         * icall.c: Type.GetType () can now return also types from the
30583         calling assembly.
30584
30585 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30586
30587         * loader.h, loader.c: stack walking support.
30588         * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
30589         GetCallingAssembly.
30590
30591 2002-07-24  Dietmar Maurer  <dietmar@ximian.com>
30592
30593         * marshal.c: added optimisations for blittable types 
30594
30595         * class.c (mono_array_class_get): do not set blittable attribute on arrays
30596         (mono_class_setup_mono_type): set blittable attribute for single
30597         and double.
30598
30599         * marshal.c (mono_string_utf8_to_builder): impl.
30600         (mono_string_builder_to_utf8): impl.
30601         (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
30602
30603 2002-07-23  Dietmar Maurer  <dietmar@ximian.com>
30604
30605         * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
30606         (mono_marshal_get_managed_wrapper): impl. byref types
30607
30608 2002-07-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30609
30610         * icall.c:
30611         (search_method): don't display debug message. 
30612
30613 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
30614
30615         * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
30616
30617 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
30618
30619         * appdomain.c: set the missing filename when throwing exception.
30620
30621 2002-07-22  Dietmar Maurer  <dietmar@ximian.com>
30622
30623         * metadata.c (mono_type_size): code cleanup
30624         (mono_type_stack_size): removed some test code
30625
30626 2002-07-21  Miguel de Icaza  <miguel@ximian.com>
30627
30628         * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
30629         mono_get_exception_file_not_found now.
30630
30631         * exception.c (mono_exception_from_name_two_strings): New version
30632         that will call a constructor with two string arguments. 
30633         (mono_get_exception_file_not_found): New helper routine, used to
30634         report file-not-found errors.
30635
30636 2002-07-20  Dick Porter  <dick@ximian.com>
30637
30638         * process.h:
30639         * process.c: Pass file handles to CreateProcess
30640         
30641         * icall.c:
30642         * file-io.h:
30643         * file-io.c: Implemented CreatePipe
30644
30645 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
30646
30647         * metadata.c (mono_get_param_info): set alignment for value types
30648
30649 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
30650
30651         * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
30652         Constify mono_domain_assembly_open().
30653         * loader.c: handle null namespace in icalls.
30654
30655 2002-07-19  Dietmar Maurer  <dietmar@ximian.com>
30656
30657         * marshal.c (emit_ptr_to_str_conv): marshal object as structs
30658         (emit_str_to_ptr_conv): marshal object as structs
30659
30660         * metadata.c (mono_type_to_unmanaged): marshal object as structs
30661
30662         * marshal.c (mono_marshal_get_runtime_invoke): support value types
30663
30664 2002-07-18  Dietmar Maurer  <dietmar@ximian.com>
30665
30666         * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
30667         (mono_marshal_get_native_wrapper): we an now return value types
30668
30669 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30670
30671         * verify.c: more checks implemented.
30672
30673 2002-07-17  Dietmar Maurer  <dietmar@ximian.com>
30674
30675         * marshal.c (mono_delegate_to_ftnptr): invoke the right method
30676         (fix bug #27695)
30677         (mono_marshal_get_native_wrapper): allow byref arguments
30678         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
30679         impl. PtrToStringXXX methods
30680         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
30681         (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
30682         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
30683         (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
30684         (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
30685
30686 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30687
30688         * reflection.c: fix buglet in parsing an assembly name.
30689
30690 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
30691
30692         * marshal.c (emit_ptr_to_str_conv): first impl.
30693
30694 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
30695
30696         * object.c, class.h: cache the vtable in the class as suggested by
30697         vargaz@freemail.hu (Zoltan Varga).
30698
30699 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
30700
30701         * class.h, loader.c: added mono_field_from_token().
30702         * verify.c: first cut of type checking code.
30703
30704 2002-07-16  Dietmar Maurer  <dietmar@ximian.com>
30705
30706         * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
30707
30708 2002-07-15  Dietmar Maurer  <dietmar@ximian.com>
30709
30710         * marshal.c (mono_marshal_get_native_wrapper): handle enum types
30711         (fix bug #27782)
30712         (mono_marshal_get_remoting_invoke): impl.
30713         (mono_delegate_begin_invoke): impl.
30714         (mono_mb_emit_save_args): impl.
30715         (mono_delegate_end_invoke): impl.
30716         (mono_marshal_get_delegate_begin_invoke):
30717         (mono_marshal_get_delegate_end_invoke):
30718         (mono_marshal_get_delegate_invoke): generate a special name for
30719         those methods (including the signature) and associate them whith
30720         the delegate class. 
30721
30722 2002-07-13  Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
30723
30724         * reflection.[ch]: 
30725         (mono_reflection_type_from_name): now it has a MonoImage parameter
30726         which is used as the default image to search the type in. If the image
30727         is NULL or getting the type from it fails, it defaults to corlib.
30728
30729         * icall.c: changed 1 call to mono_reflection_type_from_name to match
30730         new parameter.
30731
30732 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
30733
30734         * reflection.c: update the parameter table index.
30735
30736 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30737
30738         * domain.c: don't include the mark byte in the string hash.
30739
30740 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30741
30742         * icall.cs: icall for Type.GetTypeCode ().
30743         * verify: a couple of fixes and disabled local initialization checks.
30744
30745 2002-07-12  Dietmar Maurer  <dietmar@ximian.com>
30746
30747         * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
30748
30749         * debug-helpers.c (mono_method_full_name): print the type of the
30750         runtime wrapper
30751
30752         * metadata.c (mono_signature_hash): a hash function for signatures
30753         (mono_signature_hash): better hash algorithm
30754
30755         * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
30756
30757         * debug-helpers.c (mono_method_full_name): this can now generate
30758         method names with signatures
30759
30760         * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
30761         method dont have this pointers.
30762
30763 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
30764
30765         * reflection.c: fixup typebuilder tokens.
30766         * image.c: fix buglet.
30767         * marshal.h: remove whitespace.
30768         * metadata.h, metadata.c: reinstate code that was removed.
30769         * verify.c: handle catch directives and fix another couple of bugs.
30770
30771 2002-07-11  Dietmar Maurer  <dietmar@ximian.com>
30772
30773         * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
30774         (mono_marshal_get_native_wrapper): make it comp. with the old code
30775         (mono_marshal_get_native_wrapper): support boolean
30776         (mono_marshal_get_managed_wrapper): support more types
30777
30778 2002-06-25  Dietmar Maurer  <dietmar@ximian.com>
30779
30780         * class.c (class_compute_field_layout): compute class->blittable attribute.
30781
30782 2002-07-09  Dick Porter  <dick@ximian.com>
30783
30784         * threads.c: Make the thread cleaning up cope with threads that
30785         call ExitThread()
30786
30787 2002-07-08  Radek Doulik  <rodo@ximian.com>
30788
30789         * reflection.c (method_encode_code): use non-translated values to
30790         compute finally_start, this fixes exception handling on ppc, yay!
30791
30792         * decimal.h (struct signscale): fix endianess
30793
30794 2002-07-07  Radek Doulik  <rodo@ximian.com>
30795
30796         * reflection.c: swap box_val and not val
30797
30798 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
30799
30800         * reflection.c, reflection.h: handle full assembly info in type name.
30801         Handle Type arguments when loading custom attributes.
30802         * icall.c: updated to use new mono_reflection_type_from_name () method.
30803
30804 2002-07-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30805
30806         * loader.c:
30807         (method_from_memberref): also print assembly name when method not found.
30808
30809 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30810
30811         * icall.c:
30812         (ves_icall_TypeGetProperties): fixed bug #27473. 
30813
30814 2002-07-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
30815
30816         * reflection.c: display image name and token when cannot find the
30817         .ctor for an attribute.
30818
30819 2002-07-05  Martin Baulig  <martin@gnome.org>
30820
30821         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
30822
30823 2002-07-04  Dick Porter  <dick@ximian.com>
30824
30825         * threads.c (mono_thread_cleanup): Nasty kludge to get this to
30826         compile on mingw.  This will cause mingw builds to not wait for
30827         subthreads to terminate after the main thread does.  I've lodged a
30828         bug with the mingw developers for them to wrap OpenThread().
30829
30830 2002-07-03  Dick Porter  <dick@ximian.com>
30831
30832         * threads.c: Store thread IDs instead of handles, because
30833         GetCurrentThread() returns a pseudohandle and therefore stores
30834         useless values.  mono_thread_cleanup() continues checking the
30835         array of threads until it is empty, to cope with subthreads
30836         spawning new threads after the main thread has finished.
30837
30838         * profiler.h:
30839         * profiler.c:
30840         * profiler-private.h: Pass the thread ID to thread profiler
30841         functions, instead of a handle
30842
30843 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
30844
30845         * verify.c: fixes to make it more usable.
30846         * pedump.c: added --verify code to verify IL code in an assembly.
30847
30848 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30849
30850         * reflection.c: turn errors into warnings to allow compiling corlib.
30851
30852 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
30853
30854         * reflection.c: add special cases to compile corlib.
30855
30856 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30857
30858         * reflection.c: handle properties with only a set method.
30859
30860 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
30861
30862         * opcodes.h: add enum with opcodes in opval order.
30863
30864 2002-07-01  Dick Porter  <dick@ximian.com>
30865         
30866         * object.h:
30867         * object.c (mono_runtime_run_main): Removed unneeded argument
30868
30869 2002-06-28  Martin Baulig  <martin@gnome.org>
30870
30871         * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
30872
30873 2002-06-27  Dick Porter  <dick@ximian.com>
30874
30875         * threads.c: Store the handle in both the parent thread and in the
30876         subthread, to minimise the time between starting a new thread and
30877         storing its ID.
30878
30879 2002-06-26  Dick Porter  <dick@ximian.com>
30880
30881         * appdomain.c (mono_runtime_cleanup): Close the socket library
30882         after all the threads have finished, not before
30883
30884 2002-06-26  Martin Baulig  <martin@gnome.org>
30885
30886         * debug-symfile.c (mono_debug_find_source_location): Added
30887         `guint32 *line_number' argument.  If it's not NULL, store the line number
30888         there and return the file name without the line number.
30889
30890 2002-06-25  Dick Porter  <dick@ximian.com>
30891
30892         * icall.c:
30893         * process.h:
30894         * process.c: Process forking and other support functions
30895
30896 2002-06-25  Dick Porter  <dick@ximian.com>
30897
30898         * image.c (do_mono_image_open): Set ref_count to 1, so that bad
30899         things dont happen when the image is closed.
30900         (mono_image_lookup_resource): Walk the resource section looking
30901         for a particular entry
30902
30903         * cil-coff.h: PE resource section decoding
30904
30905 2002-06-25  Dick Porter  <dick@ximian.com>
30906         
30907         * assembly.h:
30908         * assembly.c: 
30909         (mono_assembly_foreach): Accessor functions to walk the list of
30910         loaded assemblies
30911         (mono_assembly_set_main):
30912         (mono_assembly_get_main): Process methods need to know which
30913         assembly is the "main" one
30914
30915         * object.c (mono_runtime_run_main): Record the main assembly
30916
30917         * debug-helpers.c: Fix typo
30918
30919 2002-06-24  Dietmar Maurer  <dietmar@ximian.com>
30920
30921         * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
30922         (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
30923
30924 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
30925
30926         * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
30927
30928 2002-06-21  Miguel de Icaza  <miguel@ximian.com>
30929
30930         * image.c (do_mono_image_open): Initialize reference count,
30931         otherwise we leak the MonoImage.
30932
30933 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
30934
30935         * reflection.c: small tweak to handle self-hosting.
30936
30937 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
30938
30939         * reflection.c: fix type name parse code.
30940
30941 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
30942
30943         * reflection.c: break out of the loop.
30944         * image.c: special case corlib.
30945
30946 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
30947
30948         * reflection.c: add all the custom attrs at the end to ensure the
30949         ctors have been properly initialized when the attributes are defined
30950         in the current assembly.
30951
30952 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30953
30954         * reflection.c: handle correctly multiple-nested types.
30955
30956 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
30957
30958         * row-indexes.h: fix typos.
30959         * reflection.c: adjust for typos and fix method_def_or_ref
30960         encoding in MethodImpl table.
30961
30962 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
30963
30964         * reflection.c: fix entry point patching (thanks Serge!).
30965
30966 2002-06-18  Dietmar Maurer  <dietmar@ximian.com>
30967
30968         * verify.c: add check for System.Exception
30969
30970 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
30971
30972         * image.c, class.c: minifix for code just c&p'ed.
30973         * reflection.c: warning fix.
30974         * object.h, loader.h, domain.c: load also StringBuilder.
30975
30976 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
30977
30978         * marshal.h, marshal.c: some support code to handle complex marshaling.
30979
30980 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30981
30982         * class.h, class.c, reflection.c: handle ignorecase in GetType ().
30983         Better signatures with vtable error dump.
30984
30985 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
30986
30987         * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
30988
30989 2002-06-17  Dietmar Maurer  <dietmar@ximian.com>
30990
30991         * icall.c (ves_icall_Type_GetField): impl.
30992
30993 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
30994
30995         * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
30996         to retrieve a marshal description blob for a field or param.
30997
30998 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
30999
31000         * reflection.h, reflection.c: change order of nested type emission
31001         to avoid table corruption. The NestedTypes table is sorted.
31002         * icall.c: change order of GetConstructor results to workaround mcs bug.
31003
31004 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31005
31006         * reflection.h, reflection.c: handle field and param marshal
31007         information.
31008
31009 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31010
31011         * icall.c, marshal.c marshal.h: more Marshal class implementation.
31012
31013 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31014
31015         * reflection.c: fix call convention.
31016
31017 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31018
31019         * reflection.h, reflection.c: mono_image_get_memberref_token()
31020         takes a type instead of a class, now. Added
31021         mono_image_get_array_token() to create tokens for the special
31022         multi-dim array methods.
31023
31024 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31025
31026         * assembly.c: handle modules (no assembly table). Split
31027         loading references in its own function.
31028         * class.c: handle moduleref resolution scope.
31029         * image.c, image.h: cache module name in image.
31030
31031 2002-06-07  Martin Baulig  <martin@gnome.org>
31032
31033         * reflection.c (mono_image_get_type_info): Only add a class layout entry
31034         if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
31035
31036 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31037
31038         * icall.c: more signature fixes that used uint instead of int.
31039
31040 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31041
31042         * reflection.c: fixed signature of field refs.
31043
31044 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31045
31046         * class.c, reflection.c: handle typerefs of nested types
31047         (both on read and when writing files).
31048
31049 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
31050
31051         * icall.c: fix method signatures that tried to workaround the previous
31052         typo, d'oh!
31053
31054 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31055
31056         * debug-helpers.c: fix typo.
31057
31058 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31059
31060         * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
31061         rewrote the PE/COFF writing code (our programs are understood by the
31062         ms runtime, now).
31063
31064 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
31065
31066         * gc.c, gc.h, icall.c: weakreference support.
31067
31068 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
31069
31070         * Makefile.am, mono-config.c: use $(sysconfdir).
31071
31072 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31073
31074         * icall.c: changed default precision of Double.ToString() to 15.
31075         Fixed memory leak. Unified with Single.ToString.
31076
31077 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
31078
31079         * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
31080
31081 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
31082
31083         * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
31084         gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
31085         warnings and compilation fixes from Dennis Haney (davh@davh.dk)
31086         and myself.
31087
31088 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31089
31090         * debug-symfile.c, sysmath.c: yet more compilation fixes.
31091
31092 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31093
31094         * reflection.c, socket-io.c: more compilation fixes.
31095
31096 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31097
31098         * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
31099         domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
31100         unicode.c: warning and compiler compatibility fixes.
31101
31102 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31103
31104         * class.h, metadata.c: fixed warnings/compilation errors.
31105
31106 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
31107
31108         * Makefile.am, mono-config.c, mono-config.h: configuration file
31109         support routines.
31110         * loader.c, loader.h: make Dll mapping configurable at runtime in the
31111         config file. Export methods to insert and lookup mappings.
31112
31113 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
31114
31115         * reflection.c: handle types and boxed objects in custom attr
31116         constructors.
31117
31118 2002-05-30  Martin Baulig  <martin@gnome.org>
31119
31120         * debug-symfile.c
31121         (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
31122
31123 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
31124
31125         * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
31126         to lookup the implmap row for a P/Invoke method.
31127         * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
31128         P/Invoke method from the runtime on an as needed basis.
31129
31130 2002-05-28  Dietmar Maurer  <dietmar@ximian.com>
31131
31132         * metadata.c (mono_metadata_parse_signature): impl.
31133
31134 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31135
31136         * class.c: handle .pack directive.
31137
31138 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
31139
31140         * object.c: initialize static fields with RVA data.
31141
31142 2002-05-25  Martin Baulig  <martin@gnome.org>
31143
31144         * debug-symfile.c
31145         (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
31146
31147 2002-05-24  Martin Baulig  <martin@gnome.org>
31148
31149         * debug-symfile.c
31150         (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
31151         (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
31152         `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
31153
31154 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31155
31156         * object.c: special case string ctros in invoke.
31157         * gc.c: silly whitespace changes.
31158
31159 2002-05-23  Dietmar Maurer  <dietmar@ximian.com>
31160
31161         * threadpool.[ch]: impl. a threadpool that can
31162         be used by mint and mono.
31163
31164 2002-05-22  Martin Baulig  <martin@gnome.org>
31165
31166         * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
31167         The first argument is now a `MonoReflectionModuleBuilder *', the return
31168         value is a `MonoReflectionModuleBuilder *'.  Use the AssemblyBuilder's
31169         `methods' field to get the method builder.  The `token' argument is the
31170         unfixed token.
31171
31172         * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
31173         invalid characters instead of g_assert_not_reached()ing.  This seems
31174         to be the behaviour of mscorlib.
31175
31176 2002-05-22  Dietmar Maurer  <dietmar@ximian.com>
31177
31178         * object.c (mono_runtime_invoke_array): applied patch from Rachel
31179         Hestilow to fix bug #25104
31180
31181 2002-05-21  Martin Baulig  <martin@gnome.org>
31182
31183         * debug-symfile.c (mono_debug_find_source_location): New function.
31184         Looks up an IL offset in the line number table and returns the source
31185         location as a string.
31186
31187 2002-05-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31188
31189         * icall.c:
31190         (mono_double_ToStringImpl): changed %f by %g until we have something
31191         better.
31192
31193 2002-05-21  Nick Drochak  <ndrochak@gol.com>
31194
31195         * icall.c : Use different name for Math.Pow's icall.  Needed to check
31196         parameters first in C#.
31197
31198 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31199
31200         * icall.c, reflection.h: added icall to get info about an event.
31201
31202 2002-05-20  Radek Doulik  <rodo@ximian.com>
31203
31204         * object.c (mono_value_box): don't use memcpy for boxing on BIG
31205         endian
31206         (mono_value_box): don't use memcpy for small sizes on
31207         architectures with unaligned access
31208
31209 2002-05-20  Martin Baulig  <martin@gnome.org>
31210
31211         * reflection.c (mono_reflection_setup_internal_class): Don't crash
31212         if `tb->parent == NULL'.
31213         (mono_reflection_create_internal_class): New function.  This is
31214         called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
31215         for enum types.
31216
31217         * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
31218         New interncall.
31219
31220 2002-05-19  Martin Baulig  <martin@gnome.org>
31221
31222         * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
31223         argument to get the length, don't default to the array length.
31224
31225 2002-05-18  Miguel de Icaza  <miguel@ximian.com>
31226
31227         * assembly.c (mono_assembly_setrootdir): New function used to
31228         override the MONO_ASSEMBLIES directory.
31229
31230 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31231
31232         * icall.c: ValueType_GetHashCode() initialize local var.
31233
31234 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31235
31236         * reflection.c: sort custom attributes table.
31237
31238 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31239
31240         * reflection.c: support named args in custom attributes (write support).
31241
31242 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
31243
31244         * reflection.c: fix finally position calculation.
31245
31246 2002-05-15  Radek Doulik  <rodo@ximian.com>
31247
31248         * reflection.c: fixed endianess at many places
31249
31250         * icall.c (ves_icall_InitializeArray): comment out debug msg
31251
31252 2002-05-15  Dietmar Maurer  <dietmar@ximian.com>
31253
31254         * object.c (mono_unhandled_exception): new function to handle
31255         unhandled exceptions.
31256         (mono_unhandled_exception): call the UnhandledException event.
31257         (mono_runtime_delegate_invoke): impl.
31258
31259 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
31260
31261         * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
31262         returns the RVA, not the direct pointer to the data. Handle the case
31263         when the class size is fixed.
31264
31265 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
31266
31267         * reflection.c: fix some endianess issues.
31268
31269 2002-05-14  Dietmar Maurer  <dietmar@ximian.com>
31270
31271         * object.c (mono_runtime_invoke): is now able to catch exceptions.
31272
31273         * threads.c (mono_thread_init): added a callback which is invoked
31274         at thread start.
31275
31276 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
31277         
31278         * icall.c: make GetHashCode return non-negative values.
31279
31280 2002-05-14  Dan Lewis  <dihlewis@yahoo.co.uk>
31281
31282         * object.c, icall.c, gc.c: revert to address-based hashcode.
31283
31284 2002-05-13  Miguel de Icaza  <miguel@ximian.com>
31285
31286         * icall.c (mono_double_ParseImpl): Added ParseImpl method.
31287
31288 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31289
31290         * icall.c, class.c: special case <Module>.
31291
31292 2002-05-13  Dan Lewis  <dihlewis@yahoo.co.uk>
31293
31294         * icall.c: fix bug in GetNow().
31295
31296 2002-05-11  Dietmar Maurer  <dietmar@ximian.com>
31297
31298         * object.c (mono_runtime_class_init): make sure that we call all
31299         static class constructors.
31300
31301 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
31302
31303         * reflection.c: sort methodsemantics table.
31304
31305 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
31306
31307         * reflection.h, reflection.c: honour init locals setting.
31308
31309 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
31310
31311         * icall.c: copied Double ToStringImpl for Single ToStringImpl
31312
31313 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31314
31315         * reflection.c: support ContructorBuilders in attribute blob creation.
31316
31317 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31318
31319         * reflection.c: some changes to build a binary that can be run
31320         directly in windows.
31321
31322 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31323
31324         * loader.c: print a big message when an icall can't be found.
31325
31326 2002-05-06  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31327
31328         * string-icalls.c: fix bug 24248.
31329
31330 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
31331
31332         * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
31333         icall.c, reflection.h: separate assembly loading by pathname and by
31334         assembly name. Use the MONO_PATH env var to search for assemblies.
31335
31336 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31337
31338         * assembly.c, image.h: add some support for assemblies
31339         with multiple modules.
31340         * class.c, class.h: export mono_class_from_typeref().
31341         * loader.c: remove duplicated code and use mono_class_from_typeref(),
31342         instead.
31343
31344 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31345
31346         * unicode.c: Char.IsNumber doesn't include hex digits as the ms
31347         documentation says (the ECMA one is correct).
31348
31349 2002-05-02  Dick Porter  <dick@ximian.com>
31350
31351         * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
31352         Don't name the synchronisation mutex.
31353
31354 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
31355
31356         * rand.c
31357         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
31358         Make the prototypes match.
31359         (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
31360         Same.
31361
31362         * icall.c
31363         (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
31364         systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
31365         all systems have tm.tm_zone, so use strftime() with %Z to print
31366         the timezone abreviation into a temp string.
31367
31368         * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
31369         rather than mono_array_addr() on a MonoString on Big Endian
31370         machines.
31371
31372 2002-04-30  Dietmar Maurer  <dietmar@ximian.com>
31373
31374         * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
31375         fix bug 24041
31376
31377 2002-04-30  Dick Porter  <dick@ximian.com>
31378
31379         * socket-io.c: Cope with SOCKET being an integer rather than a
31380         pointer now.
31381
31382         * threads.c: Added Thread_free_internal, to deal with thread
31383         handle cleanup.  Moved calls to handle_store() and handle_remove()
31384         to start_wrapper(), so each can only be called once.  Allocate
31385         synchronisation blocks with GC_malloc(), and use GC finalisation
31386         to close the handles.
31387
31388         * icall.c: added System.Threading.Thread::Thread_free_internal
31389
31390 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31391
31392         * icall.c: support Environment.Exit, CommandLineArgs().
31393
31394 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
31395
31396         * object.c, object.h: added mono_runtime_run_main () and
31397         mono_runtime_get_main_args () for use in System.Environment.
31398
31399 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
31400
31401         * gc.c: fix thinko, enable actual finalization since the jit is now
31402         fixed.
31403
31404 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31405
31406         * gc.c, object.c: take into account that an object may be offset wrt the address
31407         returned by GC_malloc().
31408
31409 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
31410
31411         * image.c: handle files without entries in the assembly table (modules).
31412
31413 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
31414
31415         * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow 
31416         mcs selfhosting again (build breaker) and did move the check to class instead. parent is
31417         allowed to be null when it's System.Object class setup.
31418
31419 2002-04-27  Martin Baulig  <martin@gnome.org>
31420
31421         * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
31422         if `tb->parent == NULL' rather than crashing.
31423
31424 2002-04-28  Nick Drochak  <ndrochak@gol.com>
31425
31426         * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error.  Was
31427         calling acos() where asin() should have been called.
31428
31429 2002-04-26  Martin Baulig  <martin@gnome.org>
31430
31431         * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
31432         instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
31433         there's a subdirectory called `System', but we don't want to read that
31434         subdirectory as an assembly.
31435
31436 2002-04-25  Martin Baulig  <martin@gnome.org>
31437
31438         * debug-symfile.c: Reflect latest MonoString changes.
31439
31440 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
31441
31442         * rand.c, rand.h: instance method icalls need to have an explicit
31443         this pointer as first argument in the C implementation.
31444
31445 2002-04-25  Nick Drochak <ndrochak@gol.com>
31446
31447         * icall.c: Fix typo in map for GetNonZeroBytes
31448
31449 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
31450
31451         * string-icalls.c : String does now passes unit tests without any 
31452         errors, the following changes has been made:
31453         
31454         Implemented replace methods.
31455         Renaming of methods to (try) follow the standard.
31456         Fixed compare ordinal
31457         Made all memory allocated directly to function instead of via icall function.
31458         Small performance fix in is_in_array function
31459                         
31460  (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
31461
31462         c (mono_string_Internal_ctor_charp_int_int):
31463         (mono_string_Internal_ctor_sbytep_int_int):  Removed check for
31464         sindex < 0, throw ArgumentOutOfRangeException instead of
31465         ArgumentNullException.
31466
31467         Added new check for length == 0, however
31468         I need to make it return String.Empty from the C code.
31469         
31470         (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
31471         that calculate the length for us here.
31472         
31473         (mono_string_Internal_ctor_sbytep_int_int): Replaced
31474         mono_string_new_utf16 with mono_string_new, since value is utf8.
31475
31476 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31477
31478         * object.c: register the object for finalization if needed.
31479         Allocate one more char in the string for the terminating 0 char.
31480
31481 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
31482
31483         * class.c, class.h, image.c: check if a type implemenst a destructor.
31484         Use the proper key for array class lookups.
31485         * icall.c: register the icalls in the System.GC class.
31486         * gc.c, gc.h: GC-related functions and icalls.
31487
31488 2002-04-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31489
31490         * icall.c:
31491         * socket-io.c:
31492         * unicode.c: free some strings gotten from mono_string_to_utf8 and
31493         changed a couple of free () by g_free ().
31494
31495         * decimal.c: one-liner in the comments for decimal2string ().
31496
31497 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
31498
31499         * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
31500
31501 2002-04-24      Patrik Torstensson <patrik.torstensson@labs2.com>
31502
31503         * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
31504         * object.c (mono_runtime_invoke_array) : handle null in params
31505
31506 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
31507
31508         * string-icalls.c: fixed bug in split (one off bug)
31509
31510 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
31511
31512         * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
31513         * icalls.c: added String::Equals as internal method
31514
31515 2002-04-23      Patrik Torstensson <patrik.torstensson@labs2.com>
31516
31517         * threads.c: fixed bug in the double interlocked functions
31518
31519 2002-04-22      Patrik Torstensson <patrik.torstensson@labs2.com>
31520
31521         * threads.c: implemented all of the new interlocked icalls.
31522         * string-icalls.c: fix a bug in insert.
31523         * icalls.c: added the icalls for interlocked, removed old string functions.
31524         
31525 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
31526
31527         * loader.c: fix off-by-one error when reading argument names.
31528
31529 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31530
31531         * profiler.c: win32 counter implementation (untested).
31532         * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
31533         (the latter needs testing and more complete impl. from win32 folks).
31534
31535 2002-04-21  Dan Lewis  <dihlewis@yahoo.co.uk>
31536
31537         * object.c: mono_array_new_full workaround mono_array_class_get
31538         problem.
31539
31540 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31541
31542         * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
31543         * object.h (mono_string_chars): Changed casting type.
31544
31545 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31546
31547         * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
31548                            method signatures to use gunichar2 instead of gint16.
31549
31550 2002-04-20  Dan Lewis  <dihlewis@yahoo.co.uk>
31551
31552         * object.h, object.c: domain-specific versions of mono_object_new and
31553         mono_array_new.
31554
31555 2002-04-20  Dietmar Maurer  <dietmar@ximian.com>
31556
31557         * object.c: changed String layout
31558
31559         * string-icalls.c (mono_string_Internal_ctor_chara): added
31560         internal string constructors.
31561
31562 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
31563
31564         * threads.c: pass 'this' to the thread start routine.
31565
31566 2002-04-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31567
31568         * string-icalls.c: fix IndexOf and LastIndexOf. Now
31569         InternalCompareStr don't call twice mono_string_cmp_char for the last
31570         character. Improved performance in mono_string_cmp_char.
31571
31572 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
31573
31574         * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
31575         code into its own library: libmonoruntime.
31576
31577 2002-04-19  Dan Lewis  <dihlewis@yahoo.co.uk>
31578
31579         * object.h, object.c: changed array format so that szarrays do not
31580         require a bounds structure.
31581         * icall.c, appdomain.c: support for new szarray format.
31582
31583 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
31584
31585         * metadata.c: compare also the retuns type when comparing signatures:
31586         we didn't do this as an optimization since really overloaded methods
31587         must differ also in the arguments, but this doesn't work with
31588         low-level IL code (or when using explicit conversion operators: see
31589         bug#23498 for an example).
31590
31591 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
31592
31593         * loader.c: SZARRAY types can be saved as TYPESPEC, too.
31594
31595 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
31596
31597         * icall.c: make MonoType::GetElementType its own icall.
31598
31599 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
31600
31601         * icall.c: remove MonoMethod_get_Name().
31602         * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
31603         object.
31604
31605 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31606
31607         * string-icalls.c: optimized a few methods.
31608
31609 2002-04-17      Patrik Torstensson <patrik.torstensson@labs2.com>
31610
31611         * icall.c: added all new string internal calls
31612         * string-icalls.c: added, new string internal call implementation.
31613         * object.c: added mono_string_new_size for allocating a string a size
31614
31615 2002-04-17  Dietmar Maurer  <dietmar@ximian.com>
31616
31617         * object.c (mono_object_isinst): use the same code as in the
31618         optimized x86 version.
31619
31620 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
31621
31622         * profiler.c: TSC-based timer code (faster and more accurate).
31623         Not hooked up in configure, yet (set USE_X86TSC to 1).
31624
31625 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
31626
31627         * profiler.c, profiler.h: track time spent compiling methods.
31628         * threads.c: track thread creation/destruction.
31629
31630 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
31631
31632         * profiler.c, profiler.h, profiler-private.h: profiling interface
31633         and sample implementation. Moved here so that it can be used also by
31634         the jit.
31635
31636 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
31637
31638         * reflection.c, reflection.h: keep types and other handles separate in
31639         the hash tables for referred tokens. Add guid for modules.
31640
31641 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
31642
31643         * assembly.c: fix bugs found with valgrind.
31644         * metadata.h, metadata.c: added mono_metadata_guid_heap().
31645
31646 2002-04-14      Patrik Torstensson <patrik.torstensson@labs2.com>
31647
31648         * threads: added icall support for getting current domain for
31649                    the thread.
31650  
31651 2002-04-13  Martin Baulig  <martin@gnome.org>
31652
31653         * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
31654         (MonoDebugVarInfo): Added `index' field for register based addresses.
31655         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
31656         (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
31657         `MonoDebugVarInfo *params' and `guint32 this_offset' with
31658         `MonoDebugVarInfo *this_var'.
31659
31660         * debug-symfile.c (relocate_variable): New static function to write
31661         a location description for a local variable or method parameter.
31662
31663 2002-04-12  Martin Baulig  <martin@gnome.org>
31664
31665         * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
31666         stack offset and begin/end scope address of a local variable.
31667         (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
31668         'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
31669         (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
31670
31671         * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
31672         Added new relocation types for start/end scope of a local variable.
31673
31674 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
31675
31676         * object.h: add mono_object_domain() macro.
31677         * reflection.c: handle typespecs.
31678         * icall.c: MonoMethod::get_Name() implementation.
31679
31680 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31681
31682         * icall.c: String::GetHashCode() icall implementation.
31683
31684 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31685
31686         * icall.c: String::IndexOfAny icall.
31687         * object.c, object.h: make array->max_length more useful.
31688         Intrduced mono_object_class() and mono_string_length() macros.
31689
31690 2002-04-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
31691
31692         * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
31693         instead of g_unichar_isdigit.
31694
31695 2002-04-11  Nick Drochak  <ndrochak@gol.com>
31696
31697         * icall.c: Implement a simple Double.ToString().
31698
31699 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
31700
31701         * appdomain.h: only io-layer.h is supposed to be included.
31702         * icall.c: explicitly import environ. Fix warning.
31703
31704 2002-04-10  Nick Drochak  <ndrochak@gol.com>
31705
31706         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
31707                 return true even if it's not Daylight Savings time.
31708                 Only return false for the case where the function isn't
31709                 implemented for a plaform (read Windows).
31710
31711 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
31712
31713         * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
31714         data with a mutex.
31715
31716 2002-04-09  Dietmar Maurer  <dietmar@ximian.com>
31717
31718         * mempool.c (mono_mempool_alloc): only use g_malloc when
31719         absolutely necessary.
31720
31721 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
31722
31723         * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
31724
31725         * class.c (mono_class_vtable): use domain mempool to allocate vtable
31726         (mono_class_proxy_vtable): use domain mempool
31727
31728 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
31729
31730         * appdomain.h, appdomain.c: split initialization that requires the
31731         execution engine support into mono_runtime_init().
31732
31733 2002-04-08  Dietmar Maurer  <dietmar@ximian.com>
31734
31735         * class.c (mono_class_init): don't include vtable inside MonoClass
31736         to save some memory, gather some statistics.
31737         (mono_class_vtable): use g_malloc instead of GC_malloc when possible
31738
31739 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31740
31741         * icall.c: internalcall implementation for ValueType.Equals().
31742
31743 2002-04-06  Dietmar Maurer  <dietmar@ximian.com>
31744
31745         * object.c (mono_message_init): moved 
31746         (mono_runtime_exec_main): new arch. independent impl.
31747         (mono_runtime_invoke_array): new method - like
31748         mono_runtime_invoke, but you can pass an array of objects.
31749         (mono_remoting_invoke): new arch. independent impl.
31750         (mono_message_invoke): new arch. independent impl.
31751         (mono_runtime_class_init): new arch. independent impl.
31752         (mono_runtime_object_init): new arch. independent impl.
31753
31754 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
31755
31756         * metadata.c, object.c, reflection.c: documented the exported
31757         functions.
31758
31759 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
31760
31761         * icall.c: simpler code to pass the assembly builder data to corlib.
31762         Implement GetNestedTypes() internalcall.
31763
31764 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
31765
31766         * class.c: warn if a type can't be loaded.
31767
31768 2002-04-04  Dietmar Maurer  <dietmar@ximian.com>
31769
31770         * image.h: typedef MonoImageOpenStatus
31771         * types.h: removed unused file
31772         
31773 2002-04-04  Dan Lewis  <dihlewis@yahoo.co.uk>
31774
31775         * icall.c: Enum_ToObject accepts enum value arguments.
31776
31777 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
31778
31779         * class.c: move initialization of properties, events and nested
31780         classes, so that they happen for interfaces, too.
31781
31782 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
31783
31784         * icall.c: cleanup some ugly casts in Array_SetValue*.
31785
31786 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
31787
31788         * icall.c: the values array fro enums is of the correct type, now.
31789         Implement (correctly) getFullName instead of assQualifiedName for
31790         MonoType.
31791         * reflection.h, reflection.c: added mono_type_get_name ().
31792
31793 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
31794
31795         * assembly.c, image.h: for each MonoImage, record from wich assembly
31796         it was loaded.
31797         * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
31798         Make Type.Assembly work.
31799
31800 2002-04-03  Dietmar Maurer  <dietmar@ximian.com>
31801
31802         * debug-symfile.h: use char* instead of gpointer to avoid
31803         unnecessary casts.
31804
31805         * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
31806
31807         * icall.c (ves_icall_InternalExecute): impl. FielSetter
31808         (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
31809
31810 2002-03-30  Dietmar Maurer  <dietmar@ximian.com>
31811
31812         * icall.c (mono_message_init): impl. (code cleanup)
31813         (ves_icall_InternalExecute): impl. FieldGetter
31814
31815         * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
31816         defined we call all (non-static)methods through the vtable. 
31817
31818 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
31819
31820         * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
31821         finalizer even though the memory is still referenced (and the chunk of
31822         memory is not freed).
31823
31824 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
31825
31826         * assembly.c: fix brokeness.
31827
31828 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
31829
31830         * class.c: kill some warnings. Check explicit interface method
31831         implementation also without considering the namespace.
31832         Load also literal strings in static class data.
31833
31834 2002-03-29  Miguel de Icaza  <miguel@ximian.com>
31835
31836         * assembly.c (default_assembly_name_resolver): Kill memory leak. 
31837         (default_assembly_name_resolver): Make the resolver take the
31838         "base" directory where the assembly was originally defined, so we
31839         can load DLLs that are in the same directory as the assembly that
31840         is being referenced.
31841
31842 2002-03-28  Dick Porter  <dick@ximian.com>
31843
31844         * file-io.h: 
31845         * file-io.c:
31846         * socket-io.c: 
31847         * unicode.h: 
31848         * unicode.c: Warning cleanups
31849
31850 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
31851
31852         * object.h, reflection.h: use the correct type instead of MonoObject.
31853
31854 2002-03-28  Martin Baulig  <martin@gnome.org>
31855
31856         * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
31857         (mono_debug_update_symbol_file): Initialize classes if necessary.
31858
31859 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
31860
31861         * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
31862         rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
31863
31864 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
31865
31866         * assembly.h: fix function prototype.
31867         * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
31868         * mono-endian.h: use const cast.
31869
31870 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
31871
31872         * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
31873
31874 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
31875
31876         * loader.c: don't assert when a typeref can't be loaded, give
31877         a chance to the runtime to trow an exception instead.
31878         * loader.h: fix warning.
31879
31880 2002-03-28  Dietmar Maurer  <dietmar@ximian.com>
31881
31882         * class.c (mono_class_proxy_vtable): added proxy support
31883
31884 2002-03-27  Dan Lewis <dihlewis@yahoo.co.uk>
31885
31886         * icall.c: removed last of PAL calls, added System.Environment
31887         * file-io.h, file-io.c: MonoIO implementation
31888         * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
31889
31890 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
31891
31892         * appdomain.c: do not use the byte marker in ldstr table lookup.
31893         * debug-helpers.c: allow two ':' to separate class and method name.
31894         * object.c: allocate arrays bounds with the GC, too.
31895         * verify: add a few more checks.
31896
31897 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
31898
31899         * reflection.c: output also literal strings. Allocate parameter data
31900         with GC_malloc() (thanks, Martin, for catching this!).
31901
31902 2002-03-26  Martin Baulig  <martin@gnome.org>
31903
31904         * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
31905         include the `this' offset in the `param_offsets'.
31906
31907 2002-03-25  Martin Baulig  <martin@gnome.org>
31908
31909         * debug-symfile.c (mono_debug_update_symbol_file): Use a new
31910         mono_debug_get_class() function to get the classes. Added new
31911         relocation types for arrays and strings.
31912         (mono_debug_get_class): New static function to search in all
31913         referenced assemblies for a metadata token.
31914
31915         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
31916
31917 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
31918
31919         * reflection.h, reflection.c: use a gc-safe hash for hash tables that
31920         hold gc-allocated objects. Make the string heap a stream like the
31921         others. Removed duplicated code when writing stream info.
31922         Added asserts to catch possible buffer overflows. Set the sorted map
31923         for tables that need sorting. Added some documentation.
31924
31925 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
31926
31927         * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table 
31928         for interned strings and vtables.
31929
31930 2002-03-24  Martin Baulig  <martin@gnome.org>
31931
31932         * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
31933         it in the array since it was created with g_slist_prepend().
31934
31935 2002-03-24  Martin Baulig  <martin@gnome.org>
31936
31937         * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
31938         to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
31939         (mono_debug_method_from_token): Renamed to
31940         ves_icall_Debugger_MonoSymbolWriter_method_from_token().
31941         (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
31942
31943         * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
31944         relocation types.
31945
31946         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
31947
31948 2002-03-24  Martin Baulig  <martin@gnome.org>
31949
31950         * debug-symfile.c (mono_debug_local_type_from_signature): New func.
31951         (mono_debug_method_from_token): New func.
31952
31953         * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
31954         New interncall, calls mono_debug_local_type_from_signature().
31955         (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
31956         calls mono_debug_method_from_token().
31957
31958 2002-03-23  Martin Baulig  <martin@gnome.org>
31959
31960         * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
31961         specifies the number of bytes to be converted, not the array size.
31962         Return the number of chars, not the number of bytes.
31963         (ves_icall_iconv_get_chars): The `byteCount' argument
31964         specifies the number of bytes to be converted, not the array size.
31965
31966 2002-03-23  Martin Baulig  <martin@gnome.org>
31967
31968         * reflection.h (MonoReflectionSigHelper): New type.
31969
31970         * reflection.c (mono_reflection_sighelper_get_signature_local),
31971         (mono_reflection_sighelper_get_signature_local): New functions.
31972
31973         * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
31974         (System.Reflection.Emit.SignatureHelper::get_signature_field): New
31975         interncalls.
31976
31977 2002-03-23  Martin Baulig  <martin@gnome.org>
31978
31979         * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
31980         is_writeable is set.
31981         (mono_raw_buffer_update): New function to write the modified map
31982         back to disk.
31983
31984         * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
31985
31986         * debug-symfile.c (mono_debug_update_symbol_file): Call
31987         mono_raw_buffer_update() when done writing.
31988
31989 2002-03-23  Martin Baulig  <martin@gnome.org>
31990
31991         * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
31992
31993         * debug-symfile.c: Added support for arguments and local variables.
31994
31995 2002-03-23  Dick Porter  <dick@ximian.com>
31996
31997         * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
31998         protected by ifdefs, hence breaking the w32 build.
31999
32000 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32001
32002         * object.c: implement is_interned() the right way.
32003
32004 2002-03-21  Martin Baulig  <martin@gnome.org>
32005
32006         * debug-symfile.[ch]: New files to handle debugging information
32007         files. There's also support to dynamically update these symbol
32008         files to include machine dependent information.
32009
32010 2002-03-20  Dietmar Maurer  <dietmar@ximian.com>
32011
32012         * threads.c (mono_thread_create): new function to create thread
32013         from C
32014
32015 2002-03-20  Martin Baulig  <martin@gnome.org>
32016
32017         * icall.c (ves_icall_InternalInvoke): Create a new object if the
32018         method is a constructor.
32019         (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
32020         points to ves_icall_InternalInvoke().
32021
32022 2002-03-20  Dan Lewis <dihlewis@yahoo.co.uk>
32023
32024         * file-io.c: Flush shouldn't throw exceptions.
32025
32026 2002-03-19  Dan Lewis <dihlewis@yahoo.co.uk>
32027
32028         * file-io.c: FileStream flush support; FileSetLength now
32029         restores file pointer.
32030
32031 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32032
32033         * class.c: set image for pointer classes.
32034
32035 2002/03/19  Nick Drochak <ndrochak@gol.com>
32036
32037         * sysmath.c: Forgot one.
32038
32039 2002-03-18  Miguel de Icaza  <miguel@ximian.com>
32040
32041         * sysmath.c: Avoid redefining existing names.
32042
32043 2002-03-18  Dan Lewis <dihlewis@yahoo.co.uk>
32044
32045         * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
32046         handled by runtime as icall rather than dllimport from libm.so
32047         * file-io.c, file-io.h: fixed handle argument type.
32048
32049 2002-03-18  Dick Porter  <dick@ximian.com>
32050
32051         * reflection.c (mono_image_get_type_info): rename interface to
32052         iface, because of "#define interface struct" on windows.
32053
32054 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
32055
32056         * class.c, class.h: rename and export mono_ptr_class_get().
32057         * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
32058         * reflection.c, reflection.h, icall.c: better/saner type name
32059         parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
32060         method signatures.
32061
32062 2002-03-14  Dietmar Maurer  <dietmar@ximian.com>
32063
32064         * class.c (mono_class_init): removed hardcoded GHC_SLOT
32065
32066         * icall.c (ves_icall_InternalInvoke): impl.
32067
32068 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32069
32070         * reflection.c: output the interface map table, too.
32071
32072 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
32073
32074         * class.c (class_compute_field_layout): separate computation of 
32075         static field layout
32076
32077 2002-03-12  Dan Lewis <dihlewis@yahoo.co.uk>
32078
32079         * icall.c: added System.Buffer support.
32080         * file-io.c: moved file icalls from PAL to FileStream.
32081
32082 2002-03-12  Dietmar Maurer  <dietmar@ximian.com>
32083
32084         * icall.c (ves_icall_System_Object_GetHashCode): impl.
32085
32086 2002-03-11  Dietmar Maurer  <dietmar@ximian.com>
32087
32088         * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
32089
32090 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32091
32092         * verify.c, verify.h: moved here the corlib/runtime consistency checks.
32093
32094 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32095
32096         * debug-helpers.{c,h}: moved here from monograph some useful functions
32097         to locate a method by name/signature in a class or image. Included
32098         also a small and flexible IL disassembler.
32099
32100 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32101
32102         * reflection.c: fixup tokens in methods with small header size, too.
32103
32104 2002-03-08  Dietmar Maurer  <dietmar@ximian.com>
32105
32106         * object.c (mono_string_to_utf8): remove assert(!error), instead
32107         print a warning. 
32108
32109 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
32110
32111         * icall.c: update to the new mono_Array_class_get interface.
32112
32113 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32114
32115         * appdomain.c, object.c: Boehm-GC enable.
32116         * icall.c: make get_data_chunk() support split data requests.
32117         Ensure a class is initialized in more cases. Return only the first
32118         property found in GetProperties() or the compiler gets confused. 
32119         Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
32120         * reflection.h, reflection.c: add fixup mechanism for field and method
32121         tokens. Initialize assembly->typeref in a single place. Output
32122         properties after events. Support custom attributes for events, too.
32123         Typo fix for paramter custom attrs.
32124
32125 2002-03-07  Martin Baulig  <martin@gnome.org>
32126
32127         * icall.c (ves_icall_System_Array_FastCopy): Small fix.
32128
32129 2002-03-07  Dietmar Maurer  <dietmar@ximian.com>
32130
32131         * class.c (mono_array_class_get): fix. for multi. dim. arrays
32132
32133 2002-03-06  Martin Baulig  <martin@gnome.org>
32134
32135         * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
32136         non-zero lower bounds. See testcases #F10-#F13.
32137
32138 2002-03-05  Martin Baulig  <martin@gnome.org>
32139
32140         * exception.c (mono_get_exception_argument_out_of_range): New exception.
32141
32142         * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
32143         ves_icall_System_Array_GetValue(), only calculate the absolute array position
32144         here.
32145         (ves_icall_System_Array_SetValue): Likewise.
32146         (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
32147         as argument and does the actual work. This function is used when copying a
32148         multi-dimensional array.
32149         (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
32150         now do all the widening conversions of value types.
32151         (ves_icall_System_Array_CreateInstanceImpl): Implemented.
32152
32153 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32154
32155         * class.c: remove some magic numbers and use the smbolic names,
32156         instead. Added init_events() to load event info at class init time.
32157         * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
32158         and mono_metadata_methods_from_event().
32159         * reflection.h, reflection.c: added support for writing out the evnets
32160         related information.
32161
32162 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
32163
32164         * reflection.h, icall.c: use a different method (GetInterfaces)
32165         to gather interface info and add isbyref, isprimitive and
32166         ispointer to the ves_icall_get_type_info() return value.
32167
32168 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
32169
32170         * class.h: stared adding support for events.
32171         * icall.c: split find_members implementation. Added debug icall to get
32172         the address of an object.
32173         * reflection.c: handle TypeBuilders in mono_type_get_object().
32174
32175 2002-03-01  Martin Baulig  <martin@gnome.org>
32176
32177         * icall.c (ves_icall_System_Array_GetLength): This must throw an
32178         ArgumentOutOfRangeException(), not an ArgumentException().
32179         (ves_icall_System_Array_GetLowerBound): Likewise.
32180         (ves_icall_System_Array_GetValue): Improved argument checking.
32181         (ves_icall_System_Array_SetValue): Improved argument checking.
32182
32183 2002-03-01  Martin Baulig  <martin@gnome.org>
32184
32185         * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
32186         called with invalid arguments rather than just dying with g_assert().
32187         (ves_icall_System_Array_SetValue): Likewise.
32188         (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
32189         raise a NotImplementedException instead.
32190         (ves_icall_System_Array_GetLength): Added argument checking.
32191         (ves_icall_System_Array_GetLowerBound): Added argument checking.
32192
32193 2002-03-01  Dietmar Maurer  <dietmar@ximian.com>
32194
32195         * object.h (mono_assert): new macros mono_assert and
32196         mono_assert_not_reached
32197
32198 2002-02-28  Martin Baulig  <martin@gnome.org>
32199
32200         * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
32201         and "System::String::IsInterned" to "System::String::_IsInterned".
32202
32203 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
32204
32205         * icall.c: remove hacks for typebuilder. Added icall to create a
32206         modified type from a tybebuilder.
32207         * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
32208         in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
32209         to create a backing MonoClass for a TypeBuilder.
32210
32211 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32212
32213         * class.c, class.h: more refactoring of class init.
32214         Export mono_class_setup_mono_type() and mono_class_setup_parent().
32215
32216 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
32217
32218         * marshal.c, marshal.h: start of marshaling interface.
32219
32220 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32221
32222         * icall.c: fix order in assembly qualified name icall.
32223
32224 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32225
32226         * class.c: do not free str, since we store it in the hash table.
32227         * reflection.h: add label field to MonoILExceptionInfo.
32228         * reflection.c: handle references to more than one assembly. Handle
32229         case when there isn't a module created in the assembly.
32230
32231 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
32232
32233         * class.c: Fix typo. Start refactoring of class init code.
32234
32235 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
32236
32237         * appdomain.c: exit with 1 on error.
32238         * class.c: we already have the name in MonoClassField.
32239         * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
32240         MonoStreamHeader instead of an offset of image->raw_metadata.
32241
32242 2002-02-26  Miguel de Icaza  <miguel@ximian.com>
32243
32244         * appdomain.c (mono_init): Be even more descriptive about the error.
32245
32246 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
32247
32248         * appdomain.c: give the user an informative message when corlib can't
32249         be loaded.
32250
32251 2002-02-26  Martin Baulig  <martin@gnome.org>
32252
32253         * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
32254         New icall to get the time zone data.
32255
32256 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32257
32258         * reflection.c: set virtual and raw size of section correctly.
32259         * threads.c: transfer domain information to newly created threads.
32260
32261 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32262
32263         * class.c: when instancing a class in a domain, load the default
32264         vaules for static fields from the constant table. Fix System.Enum to
32265         not be an enum.
32266         * icall.c: implement Object::GetType() internalcall. Implemented
32267         MonoField::GetValue() internalcall. Avoid SEGV in search_method().
32268         Fixed checking of binding flags in find_members().
32269         * metadata.c, metadata.h: introduce mono_metadata_type_hash().
32270         * reflection.c: handle enumerations when writing to the constant
32271         table. Use a different object cache for types.
32272
32273
32274 2002-02-22  Dietmar Maurer  <dietmar@ximian.com>
32275
32276         * object.c (mono_object_isinst): fix for arrays
32277
32278         * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
32279
32280 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32281
32282         * object.c: don't use mprotect ()  and fix intern pool hash table
32283         lookup for big endian systems.
32284
32285 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32286
32287         * icall.c: change type_is_subtype_of () signature.
32288
32289 2002-02-21  Mark Crichton  <crichton@gimp.org>
32290
32291         * rand.c, rand.h: Added random number generator for
32292         System.Security.Cryptography classes.
32293
32294         * exception.c, exception.h: Added mono_get_exception_not_implemeted.
32295
32296         * icall.c: Added System.Security.Cryptography calls.
32297
32298 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32299
32300         * class.c, icall.c, metadata.c: better support for pointer types.
32301         Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
32302         * reflection.c: Add support for getting custom attrs for properties
32303         and simplify some code.
32304
32305 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
32306
32307         * icall.c: change getToken () and add custom attribute GetBlob()helper
32308         method.
32309         * reflection.h: add custom attrs array to the reflection builder structures.
32310         * reflection.c: encode and emit custom attributes for all the relevant
32311         reflection objects. Cache fieldref and methodref tokens. Change
32312         mono_image_create_token() interface to take a MonoDynamicAssembly.
32313         More complete custom attributes decoder. Load custom attributes for
32314         Assembly, Field, Method and Constructor objects, too. Make the
32315         returned array an Attribute[] one, not object[]. Added
32316         mono_reflection_get_custom_attrs_blob() to encode the arguments of a
32317         custom attribute constructor.
32318
32319 2002-02-20  Dick Porter  <dick@ximian.com>
32320
32321         * icall.c:
32322         * rawbuffer.c:
32323         * socket-io.c: Windows portability fixes (sometimes just ifdeffing
32324         problem code out for now).
32325
32326 2002-02-19  Radek Doulik  <rodo@ximian.com>
32327
32328         * object.c (mono_ldstr): use hash table to avoid multiple swapping
32329
32330 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
32331
32332         * icall.c: register the GetCustomAttributes method.
32333         * object.c, object.h: add mono_string_new_len ().
32334         * reflection.h, reflection.c: added mono_runtime_invoke(),
32335         mono_install_runtime_invoke(). Added
32336         mono_reflection_get_custom_attrs () to load custom attributes and
32337         create the attribute objects.
32338
32339 2002-02-19  Dick Porter  <dick@ximian.com>
32340         * threads-dummy-types.c:
32341         * threads-dummy-types.h:
32342         * threads-dummy.c:
32343         * threads-dummy.h:
32344         * threads-pthread-types.c:
32345         * threads-pthread-types.h:
32346         * threads-pthread.c:
32347         * threads-pthread.h:  Deleted obsolete files
32348
32349 2002-02-19  Dietmar Maurer  <dietmar@ximian.com>
32350
32351         * class.c (mono_class_vtable): runtime init the class when we
32352         allocate static class data.
32353
32354         * icall.c (ves_icall_System_Array_SetValue): check for null values.
32355
32356         * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
32357         and String - but we will need generic marshalling support in the
32358         future. 
32359         (mono_init): set the domain name in a ms compatible way
32360
32361         * object.c (mono_string_new_utf16): bug fix: use char[] instead of
32362         String[].
32363
32364 2002-02-18  Dietmar Maurer  <dietmar@ximian.com>
32365
32366         * object.c (mono_array_clone): use alloca() instead of g_malloc  
32367         for sizes
32368
32369         * appdomain.c (mono_domain_unload): impl.
32370
32371 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32372
32373         * appdomain.c, object.c: fix intern pool implementation.
32374         * class.c: fix alignment code.
32375
32376 2002-02-16  Radek Doulik  <rodo@ximian.com>
32377
32378         * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
32379         and s2 > s1, just copy lower bytes to be compatible with little
32380         endian (i.e. 64bit value & 0xffffffff --> 32bit value)
32381         (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
32382
32383         * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
32384         force big_endian to be 1 for big endian machines 
32385         (ves_icall_iconv_new_decoder): ditto
32386
32387 2002-02-16  Jeffrey Stedfast  <fejj@ximian.com>
32388
32389         * socket-io.c (convert_sockopt_level_and_name): If the system
32390         doesn't define SOL_IP or SOL_TCP, get them by hand using
32391         getprotobyname() and caching the values (because this could be a
32392         slow operation).
32393         (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
32394         Use the appropriate struct when the system does support it. Ie,
32395         not all systems have struct ip_mreqn so use struct ip_mreq when
32396         appropriate.
32397
32398 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
32399
32400         * reflection.c: handle finally clauses.
32401
32402 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
32403
32404         * socket-io.c: use g_snprintf() instead of snprintf.
32405
32406 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
32407
32408         * reflection.c (mono_param_get_objects): Cast second argument to
32409         mono_method_get_param_names to a const char** to silence the
32410         compiler warning.
32411
32412         * appdomain.c (mono_domain_assembly_open): Put parens around the
32413         truth statement in the for-loop.
32414
32415         * unicode.c (iconv_convert): Got rid of a compiler warning about
32416         int i being unused when the system has a new iconv.
32417         (iconv_get_length): Same.
32418
32419         * image.c (load_class_names): Cast the second argument to
32420         g_hash_table_insert() to char* to hush compiler warnings about the
32421         arg being a const.
32422         (mono_image_open): Same here.
32423
32424         * socket-io.c: Don't conditionally include sys/filio.h or
32425         sys/sockio.h here anymore since we now get them from
32426         io-layer/io-layer.h
32427         (inet_pton): If the system doesn't support inet_aton, implement
32428         using inet_addr and also #define INADDR_NONE if it isn't defined
32429         by the system.
32430
32431 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32432
32433         * metadata.c, metadata.h: added function to get packing and size info
32434         of a typedef.
32435         * reflection.h, reflection.c: handle field RVA data. Save info about
32436         the table layout if needed. Assign typedef indexes to all the types
32437         before dumping the info about them to avoid forward reference problems.
32438
32439 2002-02-14  Dietmar Maurer  <dietmar@ximian.com>
32440
32441         * socket-io.c (convert_sockopt_level_and_name): ifdef
32442         SO_ACCEPTCONN because it is not defined on my system (old debian)
32443
32444 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32445
32446         * opcode.c: use stddef.h to get NULL.
32447
32448 2002-02-14  Jeffrey Stedfast  <fejj@ximian.com>
32449
32450         * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
32451         for FIONBIO, FIONREAD and SIOCATMARK.
32452         (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
32453         define INADDR_NONE and besides, inet_addr() is deprecated and
32454         should not be used. Use inet_pton() instead - it also has the
32455         added bonus that it can easily handle IPv6 addresses as well.
32456         (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
32457
32458 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
32459
32460         * decimal.c: remove _MSC_VER conditional.
32461
32462 2002-02-13  Dick Porter  <dick@ximian.com>
32463
32464         * socket-io.c: 
32465         * icall.c: Internal calls for Blocking, Select, Shutdown,
32466         GetSocketOption and SetSocketOption
32467
32468 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32469
32470         * assembly.cs: better resolver: use it instead of some kludgy
32471         code.
32472
32473 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
32474
32475         * reflection.c: the best way to speed-up the compiler is to avoid
32476         infinite loops.
32477
32478 2002-02-13  Dietmar Maurer  <dietmar@ximian.com>
32479
32480         * class.c (mono_class_vtable): changed the object layout
32481         (obj->vtable->class). 
32482         (mono_class_create_from_typespec): consider MONO_TYPE_PTR
32483
32484 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32485
32486         * assembly.c: look for assemblies in the assembly dir, too.
32487
32488 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32489
32490         * class.c: fix thinko in mono_class_from_type().
32491
32492 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32493
32494         * exception.h, exception.c: added TypeLoadException.
32495         * object.h, object.c: added mono_array_clone ().
32496         * icall.c: handle throwOnError in AssemblyGetType().
32497         Added Array.Clone().
32498         * opcode.h, opcode.c: use a single value for the opcode val.
32499         Compile fix for non-gcc compilers.
32500
32501 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
32502
32503         * opcodes.c, opcodes.h: export interesting info about opcodes.
32504
32505 2002-02-05  Dietmar Maurer  <dietmar@ximian.com>
32506
32507         * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
32508         icalls. 
32509
32510         * class.c (class_compute_field_layout): set element_class for enums
32511         (mono_class_create_from_typedef): set element_class for normal classes
32512
32513         * icall.c (ves_icall_System_Enum_get_value): impl.
32514
32515         * class.c (mono_class_create_from_typedef): do not set valuetype
32516         flag for System.ValueType and System.Enum
32517
32518 2002-02-04  Dietmar Maurer  <dietmar@ximian.com>
32519
32520         * unicode.c (iconv_convert): fix big endian problem.
32521
32522 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32523
32524         * class.c: add asserts if we are ever going to scribble over memory.
32525         * socket-io.c: not all systems have AF_IRDA defined.
32526
32527 2002-01-31  Dietmar Maurer  <dietmar@ximian.com>
32528
32529         * class.c (class_compute_field_layout): do not consider static
32530         fields to compute alignment
32531
32532 2002-01-25  Dietmar Maurer  <dietmar@ximian.com>
32533
32534         * appdomain.c (mono_appdomain_get): impl.
32535         (ves_icall_System_AppDomain_ExecuteAssembly): impl.
32536
32537 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
32538
32539         * icall.c: ignore "file://" prefix when loading an assembly.
32540
32541 2002-01-23  Dick Porter  <dick@ximian.com>
32542
32543         * socket-io.c:
32544         * icall.c:
32545         * Makefile.am: Added socket support
32546
32547 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
32548
32549         * icall.c (ves_icall_appdomain_get_default_assemblies): put this
32550         code back.  This should return the assemblies that are loaded by
32551         the runtime on behalf of an application domain. 
32552
32553         The current implementation is still broken, it just returns every
32554         assembly loaded, but until we get real applications domain this
32555         will do.
32556
32557 2002-01-23  Dietmar Maurer  <dietmar@ximian.com>
32558
32559         * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
32560         AppDomain object.
32561
32562 2002-01-23  Miguel de Icaza  <miguel@ximian.com>
32563
32564         * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
32565         the mono_class_from_name lookup.
32566         (ves_icall_get_parameter_info): ditto.
32567         (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
32568         method.
32569         (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
32570
32571 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32572
32573         * class.c: load also nested classes on class init.
32574         System.ValueType instance methods gets passed boxed
32575         values, unless methods in derived classed that get a pointer to the
32576         data.
32577         * icall.c: use better name parsing code in GetType().
32578         * image.c, image.h: add mono_image_loaded ().
32579         * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
32580         * reflection.c, reflection.h: added mono_reflection_parse_type().
32581
32582 2002-01-22  Veronica De Santis <veron78@interfree.it>
32583
32584         * icall.c : Added mapping of internal calls for Manual and Auto reset events
32585         * threads.c : Added the implementation of internal calls for events
32586         * threads.h : Added prototypes of internal calls for events
32587         
32588 2002-01-21  Radek Doulik  <rodo@ximian.com>
32589
32590         * icall.c (ves_icall_InitializeArray): swap bytes on big endians
32591
32592 2002-01-21  Dietmar Maurer  <dietmar@ximian.com>
32593
32594         * class.c (mono_class_init): set min_align to 1 (instead of 0)
32595         (mono_class_value_size): use min_align
32596
32597 2002-01-20  Dick Porter  <dick@ximian.com>
32598
32599         * threads.h:
32600         * threads.c: Replaced all instances of WapiHandle * with HANDLE,
32601         so it compiles on w32.
32602
32603 2002-01-17  Dietmar Maurer  <dietmar@ximian.com>
32604
32605         * metadata.c (mono_type_stack_size): impl.
32606
32607         * class.c (mono_class_get_field): impl. memberref token
32608
32609 2002-01-16 Veronica De Santis <veron78@@interfree.it>
32610
32611         * icall.h : Added the internal calls mapping for CreateMutex_internal
32612                     and ReleaseMutex_internal.
32613         * threads.h : Added the prototype of mutexes internal calls.
32614         * threads.c : Added the implementations of mutexes internal calls.
32615
32616 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
32617
32618         * metaparse.h: removed unused file.
32619         * reflection.c, reflection.h: added stream_data_align () function 
32620         to align data in streams and keep stream aligned. Add support for
32621         exception support in method headers.
32622
32623 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
32624
32625         * unicode.c: make iconv_convert () return the number of bytess written
32626         in the output buffer.
32627
32628 2002-01-15  Dick Porter  <dick@ximian.com>
32629         * threads.c: Make the runtime's idea of infinite timeouts coincide
32630         with the class library's
32631
32632         Fix a particularly egregious bug in mono_thread_cleanup(). That
32633         code was so utterly bogus it must have been written on a Monday.
32634
32635 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
32636
32637         * reflection.h: add subtypes field to TypeBuilder.
32638         * reflection.c: encode constants for literal fields.
32639         Handle subtypes. Fix user string token (and add a zero byte)
32640         at the end.
32641         
32642 2002-01-14  Dietmar Maurer  <dietmar@ximian.com>
32643
32644         * class.c (mono_class_init): bug fix: assign slot numbers for
32645         abstract methods.
32646
32647 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32648
32649         * reflection.c: don't try to output a code RVA for abstract methods.
32650         Small fixes for method header format. Output parameter info to the
32651         ParamDef table. Save method overriding info to MethodImpl table.
32652         Fix property support. Allow typedef.extends to be a type in the
32653         building assembly.
32654         * verify.c: fix off-by-one error.
32655
32656 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
32657
32658         * class.c: fix mono_class_from_mono_type () for szarray types.
32659         Remove unused cache check in mono_class_from_type_spec().
32660         * icall.c: *type_from_name () functions handle simple arrays and byref.
32661         * reflection.c: handle byref and szarray types. Handle methods without
32662         body (gets P/Invoke compilation working). Handle types and fields in
32663         get_token ().
32664         * reflection.h: add rank to MonoTypeInfo.
32665
32666 2002-01-10  Dick Porter  <dick@ximian.com>
32667
32668         * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
32669         internal calls
32670
32671 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
32672
32673         * icall.c: initialize class in type_from_handle ().
32674         Loop also in parent classes for get_method ().
32675         * reflection.c: properly encode class and valuetype types.
32676         Start on encoding TypeBuilder types. Handle fieldrefs.
32677         Use correct length when registering a user string.
32678         Handle ConstructorBuilder and MonoMethod in get_token ().
32679         Make mono_type_get_object () aware of cached types.
32680         * object.c: back out change to mono_string_new ().
32681
32682 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
32683         * object.c: mono_string_new should return a NULL when the string 
32684         passed in is NULL -- not try to deference it.
32685         
32686 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
32687
32688         * icall.c: hack to make IsSubType work for TypeBuilders.
32689         * reflection.c: emit constructors before methods.
32690         Retrieve param names in mono_param_get_objects().
32691
32692 2002/01/05  Nick Drochak  <ndrochak@gol.com>
32693
32694         * Makefile.am: fix list of headers and sources so automake 1.5
32695         doesn't complain. Removed \# at end of list.
32696
32697 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
32698
32699         * reflection.c: get token for a method ref. Set return type of
32700         constructor to void.
32701         * loader.c: debug message.
32702         * class.c: typo fix.
32703
32704 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
32705
32706         * icall.c: fix array init with rank > 1. FindMembers
32707         loops in parent class as well.
32708         * image.c: do not insert nested types in name cache.
32709         * reflection.c: warning fix.
32710         * reflection.h: add override method (for interface impl).
32711
32712 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
32713
32714         * metadata.c: fix customattr decoding.
32715
32716 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
32717
32718         * rawbuffer.cs: Added native Win32 implementation, avoids using
32719         mmap on Cygwin.  This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
32720
32721 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
32722
32723         * class.c: make the low-level routines handle the cache.
32724
32725 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
32726
32727         * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
32728
32729 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
32730
32731         * class.c: fix mono_array_element_size() for objects.
32732         * class.h, class.c: add properties to MonoClass and load them
32733         at init time.
32734         * icall.c: check with isinst() when assigning a value to an array
32735         instead of requiring the classes to match exactly.
32736         Implemented icall for System.Type::GetType().
32737         Implemented icalls to get ParameterInfo, ProprtyInfo and info about
32738         enums. Handle bindingflags when looking for methods and fields.
32739         * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
32740         and mono_metadata_methods_from_property().
32741         * reflection.h, reflection.c: added structures for propreties,
32742         parameters and enums. Implemented mono_property_get_object() and
32743         mono_param_get_objects().
32744
32745 2001-12-18  Dick Porter  <dick@ximian.com>
32746
32747         * file-io.c: Use mono_string_to_utf16() instead of
32748         mono_string_chars()
32749
32750         * object.c: Added mono_string_to_utf16(), which copies the non
32751         NULL-terminated MonoString into a new double-null-terminated
32752         buffer.
32753
32754 2001-12-17  Dietmar Maurer  <dietmar@ximian.com>
32755
32756         * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
32757
32758 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
32759
32760         * file-io.c: raise exceptions if handle is invalid.
32761
32762 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
32763
32764         * assembly.c: yet another check for mscorlib.
32765         * class.c, class.h: load nesting info for classes.
32766         * icall.c: many new functions to support the Reflection classes.
32767         * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
32768         * reflection.h, reflection.c: mono_image_create_token(),
32769         mono_assembly_get_object(), mono_type_get_object(),
32770         mono_method_get_object(), mono_field_get_object(): methods to return
32771         objects that parallel the C representation of assemblies, types,
32772         methods, fields.
32773
32774 2001-12-11  Dick Porter  <dick@ximian.com>
32775
32776         * icall.c:
32777         * file-io.c: Internal calls for file IO.
32778
32779 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
32780
32781         * tabledefs.h: missing FileAttributes.
32782         * verify.h, verify.c: use is_valid_string () to simplify and check for
32783         valid strings more correctly. Fix warnings and speeling.
32784         Check more tables: Filed, File, ModuleRef, StandAloneSig.
32785         Check code: branches, maxstack, method calls.
32786
32787 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
32788
32789         * object.c (mono_object_allocate): removed static, so that the jit
32790         can allocate value types.
32791
32792         * icall.c (ves_icall_System_DateTime_GetNow): impl.
32793
32794 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
32795
32796         * class.c: init enum types right away and register the
32797         token->MonoClass map in mono_class_create_from_typedef ().
32798         * verify.h, verify.c: first cut of the verifier.
32799         * pedump.c: add --verify switch to verify metadata tables.
32800         * tabledefs.h: add some missing enums.
32801
32802 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
32803
32804         * class.c (mono_install_runtime_class_init): impl.
32805         (mono_class_init): renamed mono_class_metadata_init to
32806         mono_class_init, also removed the metadata_inited flag
32807
32808         * object.c (mono_object_isinst): use faster algorithm
32809
32810 2001-11-30  Radek Doulik  <rodo@ximian.com>
32811
32812         * mono-endian.h: reverted last change
32813         added function prototypes
32814
32815         * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
32816         add mono-endian.c back
32817
32818         * mono-endian.c: returned back, as Paolo pointed out, it's needed
32819         for unaligned access, I've mistaked it with endianess. I am
32820         sorry.
32821         (mono_read16): fix reverted endianess
32822         (mono_read64): ditto
32823         (mono_read32): ditto
32824
32825 2001-11-30  Dick Porter  <dick@ximian.com>
32826
32827         * exception.c: Implement mono_exception_from_name()
32828
32829 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
32830
32831         * metadata.h, metadata.c: remove params_size and locals_size and their
32832         calculation from the metadata code: they are only usefult to the
32833         interp.
32834
32835 2001-11-29  Radek Doulik  <rodo@ximian.com>
32836
32837         * object.c (mono_ldstr): swap bytes here, it's probably not the
32838         best place, but works for me now, I'll redo it once I know mono
32839         better, also note that I add PROT_WRITE and don't reset back, also
32840         note that it's only affects big endians, so x86 should be OK
32841
32842         * mono-endian.h (read16): use just glib macros for both endians
32843
32844         * mono-endian.c: removed as glib macros are used in in
32845         mono-endian.h so we don't need to care about endianess for read
32846         macros as glib does that for us already
32847
32848 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
32849
32850         * class.h, class.h: take minimum alignment into consideration so
32851         that the fields of a class remain aligned also when in an array.
32852
32853 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
32854
32855         * loader.h, loader.c: add mono_method_get_param_names().
32856         * class.c: 0-init class fields.
32857
32858 2001-11-26  Dick Porter  <dick@ximian.com>
32859
32860         * icall.c:
32861         * threads-types.h:
32862         * threads.c: New file that handles System.Threading on all platforms
32863
32864         * object.c: 
32865         * object.h: Remove the synchronisation struct from MonoObject,
32866         replace it with a pointer that gets initialised on demand
32867
32868         * Makefile.am: Replace all the system-specific threading code with
32869         a single file that uses the new wrapper library
32870
32871 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
32872
32873         * class.c, class.h: add mono_install_trampoline() so that the runtime
32874         can register a function to create a trampoline: removes the ugly
32875         requirement that a runtime needed to export arch_create_jit_trampoline.
32876         * object.h, object.c: added mono_install_handler() so that the runtime
32877         can install an handler for exceptions generated in C code (with
32878         mono_raise_exception()). Added C struct for System.Delegate.
32879         * pedump.c: removed arch_create_jit_trampoline.
32880         * reflection.c: some cleanups to allow registering user strings and
32881         later getting a token for methodrefs and fieldrefs before the assembly
32882         is built.
32883         * row-indexes.h: updates and fixes from the new ECMA specs.
32884
32885 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
32886
32887         * class.h, class.c: add enum_basetype field to MonoClass.
32888         * metadata.h, metadata.c: add mono_metadata_get_constant_index()
32889         to get index in the constant table reated to a field, param or
32890         property.
32891         * reflection.h, reflection.c: handle constructors. Set public-key and
32892         version number of the built assembly to 0.
32893         * row-indexes.h: update from new ECMA spec.
32894
32895 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
32896
32897         * class.h, class.c: add a max_interface_id to MonoClass.
32898         * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
32899         since it's used to do that. Added mono_type_type_from_obj().
32900         Make GetType() return NULL instead of segfaulting if the type was not
32901         found. Handle simple arrays in assQualifiedName.
32902         * object.h: add a struct to represent an Exception.
32903         * reflection.c: output call convention in method signature.
32904         Add code to support P/Invoke methods and fixed offsets for fields.
32905
32906 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
32907
32908         * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
32909         the value.
32910         * icall.c: use mono_array_addr instead of array->vector: fixes the
32911         reflection image writing.
32912         * reflection.c: init call convention byte to 0 in method signature.
32913         Encode the property signature. Don't output property-related methods
32914         twice. Really process the properties for a type (don't cast a field to
32915         a property, my mom always told me that).
32916         Fix 64 bit issues in pointer alignment in a different and more
32917         readable way.
32918
32919 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
32920
32921         * loader.h: Removed type class from MonoDefaults, added monotype
32922
32923         * loader.c: Loaded MonoType, removed loading of Type
32924
32925         * icall.c (my_mono_new_object): Now returns a System.MonoType,
32926         and fills in System.Type._impl with a RuntimeTypeHandle rather
32927         than the actual MonoClass *
32928
32929         (ves_icall_type_from_handle): change from type_class to
32930         monotype_class
32931
32932         (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
32933         implemented
32934
32935         (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
32936         implemented
32937
32938         (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
32939
32940         (ves_icall_System_Reflection_Assembly_GetType): implemented
32941
32942         (ves_icall_System_MonoType_assQualifiedName): implemented
32943
32944         (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
32945
32946 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
32947
32948         * assembly.c (mono_assembly_open): Implement a cache for the
32949         assemblies. 
32950
32951         (mono_assembly_close): only destroy the assembly when the last
32952         reference is gone.
32953         
32954 2001-11-09  Dick Porter  <dick@ximian.com>
32955
32956         * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
32957
32958 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
32959
32960         * class.c (mono_class_metadata_init): bug fix: compute the right slot
32961
32962 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
32963
32964         * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
32965         from Martin Weindel.
32966         * object.h: add mono_string_chars ().
32967
32968 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
32969
32970         * reflection.c (build_compressed_metadata): Eliminates warnings
32971         and uses 64-bit clean code.
32972
32973         * metadata.c (mono_type_hash): Change signature to eliminate warnings.
32974         (mono_type_equal): Change signature to eliminate warnings.
32975
32976 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
32977
32978         * icall.c, loader.c: remove the internalcall array constructors.
32979         Changes to match the new MonoArray structure.
32980         * object.h, object.c: an array object doesn't allocate an extra
32981         vector. Add mono_array_new_full () to create jagged arrays easily.
32982
32983 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
32984
32985         * metadata.h, metadata.c: add mono_metadata_field_info () to
32986         retreive all the info about a field from vairous tables.
32987         * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
32988         * class.h, class.c: augment MonoClassField with more info.
32989         Implemented mono_ldtoken for fields. Implemented ExplicitLayout
32990         policy and load a field's RVA if needed.
32991
32992 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
32993
32994         * class.c (mono_class_metadata_init): create a trampoline for all
32995         virtual functions instead of actually compiling them.
32996
32997 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
32998
32999         * class.h, class.c: include name in MonoClassField.
33000         * class.c: fix fundamental type of System.Object and System.String.
33001         Set the right fundamental type for SZARRAY, too. Handle TypeSpec
33002         tokens in ldtoken.
33003         * icall.c: remove internalcalls for the Reflection stuff that is now
33004         done in C# code.
33005         * loader.c: mono_field_from_memberref () implementation.
33006         * mono-endian.c: thinko (s/struct/union/g).
33007         * object.c, object.h: make the mono_string_* prototypes actually use
33008         MonoString instead of MonoObject.
33009         * reflection.c, reflection.h: updates for changes in the reflection
33010         code in corlib: we use C structures that map to the actual C# classes.
33011         Handle SZARRAYs when encoding types. Handle locals in methods. Use a
33012         fat method header if needed and use the info from the ILGenerator for
33013         methods. Handle fields in types. Misc fixes.
33014
33015 2001-10-17  Dietmar Maurer  <dietmar@ximian.com>
33016
33017         * class.c (mono_class_metadata_init): bug fix: always allocate
33018         space for static class data
33019
33020 2001-10-25  Dietmar Maurer  <dietmar@ximian.com>
33021
33022         * class.c (mono_compute_relative_numbering): use relative
33023         numbering to support fast runtime type checks.
33024
33025 2001-10-17  Sean MacIsaac  <macisaac@ximian.com>
33026
33027         * class.c (mono_class_create_from_typeref): added debugging output
33028         to print class name when MonoDummy is returned instead of real class
33029
33030 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
33031
33032         * class.c (mono_class_metadata_init): interface offset table now
33033         contains pointers into the vtable - this is more efficient for the jit
33034
33035 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
33036
33037         * class.c (mono_class_metadata_init): use a temporary vtable (the
33038         old algorithm only worked for the interpreter, but not for the jit)
33039
33040 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
33041
33042         * loader.c (method_from_memberref): use mono_class_get to get the
33043         class of an array instead of using System.Array directly.
33044         (mono_get_method): also add MEMBERREF methods to the method cache
33045         which usefull for arrays.
33046
33047 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
33048
33049         * pedump.c (arch_compile_method): added to compute vtable entry
33050
33051         * metadata.c (mono_metadata_interfaces_from_typedef): also return the
33052         number of interfaces.
33053         
33054         * class.h: merged MonoArrayClass into MonoClass
33055
33056         * class.c (mono_class_create_from_typedef): compute the vtable size and
33057         allocate space to include the vtable inside MonoClass
33058         (mono_class_metadata_init): initialize the vtable
33059
33060 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
33061
33062         * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
33063         Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
33064         * image.c: endian fixes by Laurent Rioux.
33065         * object.h, object.c: rename MonoStringObject to MonoString and
33066         MonoArrayObject to MonoArray. Change some function names to conform to
33067         the style mono_<object>_<action>. mono_string_new_utf16 () takes a
33068         guint16* as first argument, so don't use char*.
33069         Provide macros to do the interesting things on arrays in a portable way.
33070         * threads-pthread.c: updates for the API changes and #include <sched.h>
33071         (required for sched_yield()).
33072         * icall.c: updates for the API changes above.
33073         * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
33074         platforms that need them.
33075
33076 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33077
33078         * class.c: set the correct type for all the fundamental
33079         type when loading the class.
33080
33081 2001-10-05  Dick Porter  <dick@ximian.com>
33082
33083         * threads-pthread.c (pthread_mutex_timedlock): Simple
33084         compatibility version for C libraries that lack this call.
33085
33086 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33087
33088         * class.c: MonoTypes stored in MonoClass are stored as
33089         fundamental MonoTypes when the class represents a
33090         fundamental type (System.Int32, ...).
33091         The TypeHandle return by ldtoken is a MonoType*.
33092         * icall.c: ves_icall_get_data_chunk () write out all the
33093         PE/COFF stuff. Implement ves_icall_define_method (),
33094         ves_icall_set_method_body (), ves_icall_type_from_handle ().
33095         * image.c: properly skip unknown streams.
33096         * loader.h, loader.c: add type_class to mono_defaults.
33097         * metadata.c, metadata.h: export compute_size () as
33098         mono_metadata_compute_size () with a better interface.
33099         Typo and C&P fixes.
33100         * pedump.c: don't try to print the entry point RVA if there is no entry point.
33101         * reflection.c, reflection.h: many cleanups, fixes, output method
33102         signatures and headers, typedef and typeref info, compress the metadata
33103         tables, output all the heap streams, cli header etc.
33104         * row-indexes.h: typo fixes.
33105
33106 2001-10-04  Dick Porter  <dick@ximian.com>
33107
33108         * object.h: Add a synchronisation mutex struct to MonoObject
33109
33110         * object.c (mono_new_object): Initialise the object
33111         synchronisation mutexes
33112
33113         * icall.c: System.Threading.Monitor internal calls
33114         
33115         * threads-pthread.h:
33116         * threads-pthread.c: System.Threading.Monitor internal calls
33117
33118         * threads-types.h: New file, includes the system-specific thread
33119         structures
33120         
33121         * threads-pthread-types.h:
33122         * threads-pthread-types.c: New files, handle pthread-specific
33123         synchronisation types
33124
33125         * threads-dummy-types.h: 
33126         * threads-dummy-types.c: New files of dummy support for
33127         thread-specific types
33128
33129         * metadata.c:
33130         * image.c:
33131         * pedump.c: include mono-endian.h not endian.h
33132         
33133         * Makefile.am: More threads files.
33134         Name mono-endian.h not endian.h
33135
33136 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
33137
33138         * Makefile.am, reflection.h, reflection.c: move here the reflection related 
33139         stuff and implement a few more bits.
33140         * icall.c: a field needs to be dereferenced twice. Do not use the same
33141         name for two variables in the same scope.
33142         * image.c, image.h: cleanups.
33143
33144 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
33145
33146         * class.c (mono_class_metadata_init): bug fix: compute the right size
33147
33148 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
33149
33150         * icall.c: implemented some of the Reflection internalcalls.
33151         * image.c, image.h: start writing out the PE/COFF image.
33152         * metadata.h, metadata.c: implement mono_metadata_encode_value ()
33153         that does the reverse than decode_blob_size ().
33154         * object.c: use mono_metadata_encode_value (). Move here
33155         temporary implementation of mono_string_to_utf8 ().
33156         * rawbuffer.c: make malloc_map static.
33157
33158 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33159
33160         * metadata.c: fix type comparison for arrays.
33161         * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
33162         Added a couple of new classes to monodefaults.
33163         * icall.c: added a couple of Reflection-related internalcalls.
33164         * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
33165         Added a byval_arg MonoType to MonoClass.
33166
33167 2001-09-28  Dick Porter  <dick@ximian.com>
33168
33169         * icall.c:
33170         * threads-pthread.h: 
33171         * threads-pthread.c: Implemented internal calls for
33172         LocalDataStoreSlot operations.  Applied mutexes around all shared
33173         data.  Reworked the thread creation and Start() operations to
33174         avoid a race condition.
33175         
33176         * threads-dummy.h:
33177         * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
33178
33179 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
33180
33181         * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
33182
33183 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
33184
33185         * class.c, loader.c: warn and return NULL instead of erroring out.
33186         * icall.c: added System.AppDomain::getCurDomain().
33187         * loader.c: we don't need to lookup the typedef again for p/invoke calls.
33188
33189 2001-09-25  Dick Porter  <dick@ximian.com>
33190
33191         * threads-pthread.h:
33192         * threads-pthread.c: Implemented timed thread joining and added
33193         System.Threading.Thread::Join_internal internal call
33194
33195         * icall.c: Added System.Threading.Thread::Join_internal internal call
33196
33197         * threads-dummy.h:
33198         * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
33199
33200 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
33201
33202         * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
33203         mono_string_intern () to implement the semantics of the ldstr opcode
33204         and the interning of System.Strings.
33205         * icall.c: provide hooks to make String::IsIntern and String::Intern
33206         internalcalls.
33207
33208 2001-09-23  Dick Porter  <dick@ximian.com>
33209
33210         * threads-dummy.c: 
33211         * threads-dummy.h: New files of dummy threading routines
33212
33213         * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
33214         support code based on system specifics
33215
33216         Rename PTHREAD_LIBS to THREAD_LIBS
33217         
33218 2001-09-23  Dick Porter  <dick@ximian.com>
33219
33220         * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
33221         Schedule (called when asked to Sleep for 0 ms) and CurrentThread
33222         internal calls.
33223         (mono_thread_init): Set up a Thread object instance to return when
33224         the main thread calls Thread.CurrentThread
33225         (mono_thread_cleanup): Wait for all subthreads to exit
33226
33227         * icall.c: New internal calls for System.Threading.Thread::Sleep
33228         (including Schedule) and CurrentThread
33229
33230         * threads.h: New file, to insulate thread-specific stuff from the
33231         rest of the code
33232
33233 2001-09-21  Dick Porter  <dick@ximian.com>
33234
33235         * threads-pthread.h: 
33236         * threads-pthread.c: New file, for handling pthreads-style
33237         threading support.  Start() now starts a new thread and executes
33238         the ThreadStart delegate instance.
33239
33240         * icall.c: Added the internalcall for
33241         System.Threading.Thread::Start_internal
33242
33243         * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
33244
33245 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
33246
33247         * loader.c: work around the different signatures for delegates
33248         constructors csc generates in compiled code vs the ones compiled in mscorlib.
33249
33250 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33251
33252         * class.h, class.c: add mono_class_get_field_from_name ().
33253         * *: Fix C comments and other ANSI C issues.
33254
33255 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
33256
33257         * endian.h, assembly.c: fix some endianness issues.
33258
33259 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
33260
33261         * loader.h, load.c: add delegate_class to mono_defaults.
33262         Handle runtime provided methods in mono_get_method ().
33263
33264 2001-08-29  Dietmar Maurer  <dietmar@ximian.com>
33265
33266         * loader.c (mono_get_method): use pinvoke for internal call
33267
33268         * icall.c: use pinvoke for internal call
33269
33270         * loader.c (method_from_memberref): set the method name
33271
33272 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
33273
33274         * metadata.c: help the compiler generate better code for
33275         mono_class_from_mono_type ().
33276
33277 2001-08-28  Dietmar Maurer  <dietmar@ximian.com>
33278
33279         * class.c (mono_class_metadata_init): delayed computing of the
33280         class size to mono_class_metadata_init ()
33281
33282 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
33283
33284         * class.c, class.h: add an interfaces member to MonoClass.
33285         * image.c, image.h: add assembly_name field to MonoImage
33286         from the assembly table.
33287         * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
33288
33289 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33290
33291         * class.c: Handle Array in mono_class_from_mono_type ().
33292         * metadata.c, pedump.c: some endian fixes.
33293
33294 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
33295
33296         * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
33297         * metadata.c: fix small problem introduced with the latest commit.
33298
33299 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
33300
33301         * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
33302         We don't need a MonoMetadata pointer anymore to compare signatures in
33303         mono_metadata_signature_equal (), update callers.
33304         Reduced memory usage an number of allocations for MonoMethodHeader and
33305         MonoMethodSignature.
33306
33307 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
33308
33309         * metadata.c: added compare for szarray.
33310
33311 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
33312
33313         * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
33314         and add a couple more types to it and mono_defaults. Give an hint on
33315         classes that need implementing in our corlib and are referenced
33316         in mscorlib.
33317
33318 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
33319
33320         * class.h, class.c: keep track if a class is also an Enum.
33321         * loader.c: Implement a couple more types for use in libffi
33322         marshalling. Gives better diagnostics when failing to dlopen
33323         a library. Set method->klass for P/Invoke methods, too.
33324
33325 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
33326
33327         * class.c, class.h: add a MonoType this_arg to MonoClass that
33328         represents a pointer to an object of the class' type that
33329         can be used by the interpreter and later the type cache.
33330         Add best guess alignment info for valuetype objects.
33331
33332 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
33333
33334         * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
33335         into MonoType: one less level of indirection and allocation and
33336         simplifies quite a bit of code. Added cache for MonoTypes that are
33337         used frequently, so that we don't need to allocate them all the time.
33338
33339 2001-08-24  Dietmar Maurer  <dietmar@ximian.com>
33340
33341         * class.c (mono_class_create_from_typedef): System.Enum is also a
33342         value type, although it does not derive from System.ValueType
33343         (maybe a bug in the ms compiler?)
33344
33345         * metadata.c (mono_type_size): return the right size for value types
33346
33347         * loader.c (mono_get_method): only initialize method header if not abstract
33348
33349         * class.c (mono_class_from_mono_type): use mono_default values. 
33350
33351 2001-08-23  Dietmar Maurer  <dietmar@ximian.com>
33352
33353         * *: use MonoClass pointers instead of <type_tokens>
33354         
33355         * class.h: new flag: metadata_inited.
33356
33357         * class.c (mono_class_metadata_init): impl.
33358         (mono_class_instance_size): impl.
33359         (mono_class_data_size): impl.
33360
33361 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
33362
33363         * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
33364         MonoClass now has the name and name_space fields. 
33365         MonoMethod has a pointer to its MonoClass, instead of MonoImage.
33366         mono_get_method () takes and optional MonoClass as argument.
33367         Removed mono_typedef_from_name() and added mono_class_token_from_name()
33368         instead that takes advantage of a map from class names to typedef
33369         tokens in MonoImage.
33370
33371 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
33372
33373         * metadata.c: zero is not a valid alignment boundary.
33374         Merge MONO_TYPE_VOID in default decoding code.
33375
33376 2001-08-21  Dietmar Maurer  <dietmar@ximian.com>
33377
33378         * image.h: merged MonoMetadata into MonoImage
33379
33380         * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
33381         identify the type of elements.
33382
33383 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
33384
33385         * blob.h: fix MONO_TYPE_TYPEDBYREF value.
33386         * cil-coff.h: split MonoMSDOSHeader and add size info.
33387         * image.c: add some consistency checks.
33388         * metadata.c: fix row size computation: one programmer
33389         error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
33390         add explanation for the locator routine.
33391         Fix decoding of size in method header.
33392         
33393 2001-08-20  Miguel de Icaza  <miguel@ximian.com>
33394
33395         * assembly.c    (g_concat_dir_and_file): Use _S for string concat.
33396         (g_concat_dir_and_file): Bring g_concat_dir_and_file
33397         function from gnome-libs.  This uses the right path separator
33398         based on the OS, and also works around a bug in some systems where
33399         a double slash is not allowed. 
33400         (default_assembly_name_resolver): Use g_concat_dir_and_file
33401         (mono_assembly_open): ditto.
33402
33403 2001-08-20  Dietmar Maurer  <dietmar@ximian.com>
33404
33405         * metadata.c (mono_metadata_signature_equal): impl.
33406
33407         * *: void is now a realy MonoType (instead of using NULL)
33408         
33409         * metadata.c (do_mono_metadata_parse_type): use
33410         mono_metadata_parse_type to parse void value.
33411
33412 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
33413
33414         * metadata.c, metadata.h: in the signature and method header store
33415         only the space required for holding the loca vars and incoming arguments.
33416
33417 2001-08-15  Dietmar Maurer  <dietmar@ximian.com>
33418
33419         * metadata.c (do_mono_metadata_parse_type): treat void like any
33420         other type (instead of assigning NULL);
33421
33422 2001-08-14  Dietmar Maurer  <dietmar@ximian.com>
33423
33424         * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
33425
33426 2001-08-09  Dietmar Maurer  <dietmar@ximian.com>
33427
33428         * image.c (do_mono_image_open): added a cache for arrays.
33429
33430 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33431
33432         * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
33433         decode a single column from a row in a metadata table and changes
33434         to take advantage of it in the typedef locator (gives a nice speed up).
33435         Store offset info for function params.
33436
33437 2001-08-02  Dietmar Maurer  <dietmar@ximian.com>
33438
33439         * image.h (MONO_IMAGE_IS_CORLIB): removed 
33440
33441 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
33442
33443         * assembly.c: how could mono_assembly_close () had ever worked?
33444         * metadata.c, metadata.h: provide offset info for local vars.
33445         Implement mono_type_size () to take care of alignment as well
33446         as size (it was mono_field_type_size in cli/class.c before).
33447
33448 2001-08-01  Dietmar Maurer  <dietmar@ximian.com>
33449
33450         * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
33451
33452         * assembly.h (CORLIB_NAME): set to corlib.dll
33453
33454         * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
33455
33456 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
33457
33458         * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
33459         cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
33460         tokentype.h: massive namespace cleanup.
33461
33462 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
33463
33464         * metadata.h, metadata.c: decode exception clauses when parsing method header.
33465
33466 2001-07-27  Dietmar Maurer  <dietmar@ximian.com>
33467
33468         * metadata.c (mono_metadata_free_type): added check for type !=
33469         NULL (void) before calling mono_metadata_free_type()
33470
33471 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
33472
33473         * metadata.h, row_indexes.h: added header with enumerations to use
33474         to index in the columns from tables in metadata and to decode coded
33475         tokens: we should start using this instead of embedding magic numbers
33476         all over the code.
33477
33478 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
33479
33480         * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
33481         Move metadata_t info from cli_image_info_t to MonoImage, where
33482         it's easily accessible. Changed all the uses accordingly.
33483         Added the method and class caches to MonoImage.
33484         * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
33485         and mono_metadata_decode_value () signature to be more consistent
33486         with the other parse functions (and simplify code). Taken advantage
33487         of zero-length array allocation with GCC. Removed reduntant (and
33488         wrong) MonoFieldType struct and use MonoParam instead. Changed
33489         mono_metadata_parse_field_type () to use common code for parsing.
33490         Added mono_metadata_typedef_from_field () and
33491         mono_metadata_typedef_from_method () to lookup a typedef index from a
33492         field or method token.
33493         Pack the MonoRetType structure more tightly (fits in 8 bytes now).
33494
33495 2001-07-23  Miguel de Icaza  <miguel@ximian.com>
33496
33497         * metadata.c (mono_metadata_parse_field_type): Implement. 
33498         (do_mono_metadata_parse_type): Split engine from
33499         mono_metadata_parse_type, so that we can create smaller structures
33500         for things that just have one pointer to the MonoType (look at
33501         the MonoFieldType)
33502
33503 2001-07-20  Miguel de Icaza  <miguel@ximian.com>
33504
33505         * metadata.c (mono_metadata_parse_mh): Correct the implementation,
33506         as Jan Gray found out, it is incorrect. 
33507
33508 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
33509
33510         * assembly.c: Implement asssembly loading.  This loads an image
33511         and loads all the referenced assemblies.  Come to think of it, we
33512         could always do lazy loading of the assemblies. 
33513
33514         * image.c (mono_image_open): Keep loaded images in a hashtable.
33515
33516         * image.h (MonoImage): Add reference count.
33517
33518 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
33519
33520         * assembly.c (mono_assembly_open): Keep track of the file name in
33521         case the assembly has no ASSEMBLY table.
33522
33523         * metadata.h: Fixed Paolo's quick hack.  Put the documnentation
33524         from get.c here.
33525
33526 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
33527
33528         * metadata.c, metadata.h: decode local vars in method header
33529         parse function. Change callers accordingly.
33530
33531 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
33532
33533         * metadata.h, cil-coff.h: protect against multiple inclusion.
33534         Added some new structures to hold information decoded from metadata:
33535         MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
33536         and relevant decoding/free functions.
33537         * metadata.c: implement decoding functions. Add warning for out of bounds
33538         index in mono_metadata_locate(). Implement mono_get_method () to retreive
33539         all the info about a method signature and invocation. Remove check on
33540         uninitialized local var in parse_mh() and fix memory leak.
33541
33542 2001-07-12  Miguel de Icaza  <miguel@ximian.com>
33543
33544         * metadata.h: More macros.
33545
33546         * tokentype.h: New file.
33547
33548 Fri Jul  6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
33549
33550         * assembly.c: added a consistency check and initialize
33551         some structures with g_new0().
33552         * metadata.c: fixed a couple more bugs in table size computation
33553         and add other checks for out-of bound access to metadata.
33554
33555 Thu Jul  5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
33556
33557         * metatada.c: fix bugs computing table sizes. Spew a
33558         warning when index in string heap is out of bounds.
33559
33560 2001-07-04  Miguel de Icaza  <miguel@ximian.com>
33561
33562         * metadata.h: Add a couple of macros to manipulate tokens. 
33563
33564 Tue Jul  3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
33565
33566         * assembly.c: g_free(ii->cli_sections) (and avoid double free of
33567         cli_section_tables).
33568
33569 2001-07-01  Miguel de Icaza  <miguel@ximian.com>
33570
33571         * metadata.c (mono_metadata_user_string): New function, provides
33572         access to the UserString heap. 
33573
33574 2001-06-27  Miguel de Icaza  <miguel@ximian.com>
33575
33576         * metadata.c: Add inline documentation.
33577
33578 2001-06-26  Miguel de Icaza  <miguel@ximian.com>
33579
33580         * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
33581         files. 
33582
33583 2001-06-22  Miguel de Icaza  <miguel@ximian.com>
33584
33585         * typeattr.h: New file, TypeAttribute flags. 
33586
33587 2001-06-21  Miguel de Icaza  <miguel@ximian.com>
33588
33589         * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
33590         mono_assembly_ensure_section): Section loading code.
33591         (load_section_tables): Load the sections.
33592
33593         * mono/metadata/metadata.c (mono_metadata_locate_token,
33594         mono_metadata_locate): Functions to locate the information
33595         definition given a token or a table and an index.
33596         (mono_metadata_compute_table_bases): New.
33597         (compute_size): New function to compute the sizes of the various
33598         tables.
33599
33600         * mono/metadata/metadata.h: Finish listing the different index
33601         types. 
33602
33603         * mono/metadata/pedump.c: Improve to dump new information.
33604
33605 2001-06-19  Miguel de Icaza  <miguel@ximian.com>
33606
33607         * mono/metadata/metadata.c: Entered all the tables matching
33608         Beta2. 
33609
33610         * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2
33611
33612
33613
33614